First off, I have the latest version of gfortran installed
Code: Select all
GNU Fortran (GCC) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
When I run from inside the camb/pycamb folder:
Code: Select all
sudo python setup.py install --user
I get the following error:
Code: Select all
mkdir -p Releaselib
gfortran -shared -fPIC -O3 -fopenmp -ffast-math -fmax-errors=4 -JReleaselib -IReleaselib/ -c constants.f90 -o Releaselib/constants.o
FATAL:/opt/local/bin/../libexec/as/x86_64/as: I don't understand 'm' flag!
That ends up running Makefile, which gets to the end and starts running Makefile_main.
When gfortran ($(F90C)) is called in the line ,
Code: Select all
$(DLL_DIR)/%.o: %.f90
$(F90C) $(SF90FLAGS) -c $*.f90 -o $(DLL_DIR)/$*.o
If anyone know why this is happening, please let me know.
After trying to get around this I finally took Caldwell's advice and installed gfortran v5.3.
Running setup.py no longer pops us the 'm' flag error, but now I get a strange:
Code: Select all
gfortran -dynamiclib -fPIC -O3 -fopenmp -ffast-math -fmax-errors=4 -JReleaselib -IReleaselib/ -c utils.F90 -o Releaselib/utils.o
/var/tmp//ccijfDb9.s:9224:suffix or operands invalid for `movq'
/var/tmp//ccijfDb9.s:9328:suffix or operands invalid for `movq'
make: *** [Releaselib/utils.o] Error 1
Code: Select all
---------------------------------------------------------------------------
SystemExit Traceback (most recent call last)
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/IPython/utils/py3compat.py in execfile(fname, glob, loc, compiler)
184 with open(fname, 'rb') as f:
185 compiler = compiler or compile
--> 186 exec(compiler(f.read(), fname, 'exec'), glob, loc)
187
188 # Refactor print statements in doctests.
/Users/Omnius/Desktop/CAMB-Jan2017/pycamb/setup.py in <module>()
122 packages=['camb', 'camb_tests'],
123 package_data={'camb': [DLLNAME, 'HighLExtrapTemplate_lenspotentialCls.dat']},
--> 124 test_suite='camb_tests',
125 classifiers=['Programming Language :: Python :: 2','Programming Language :: Python :: 2.7','Programming Language :: Python :: 3','Programming Language :: Python :: 3.4','Programming Language :: Python :: 3.5'],
126 keywords=['cosmology', 'CAMB'],
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py in setup(**attrs)
146 if ok:
147 try:
--> 148 dist.run_commands()
149 except KeyboardInterrupt:
150 raise SystemExit("interrupted")
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py in run_commands(self)
953 """
954 for cmd in self.commands:
--> 955 self.run_command(cmd)
956
957 # -- Methods that operate on its Commands --------------------------
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py in run_command(self, command)
972 cmd_obj = self.get_command_obj(command)
973 cmd_obj.ensure_finalized()
--> 974 cmd_obj.run()
975 self.have_run[command] = 1
976
/Users/Omnius/Desktop/CAMB-Jan2017/pycamb/setup.py in run(self)
97 subprocess.call("make camblib.so", shell=True)
98 print(" end make camblib.so")
---> 99 if not osp.isfile(os.path.join('Releaselib', 'camblib.so')): sys.exit('Compilation failed')
100 print(" chmod 755 Releaselib/camblib.so")
101 subprocess.call("chmod 755 Releaselib/camblib.so", shell=True)
SystemExit: Compilation failed
If anyone can help with either the prior issue or the present one, that would be great.