cmbant / CAMB

Code for Anisotropies in the Microwave Background
https://camb.info/
Other
203 stars 149 forks source link

Fail installation of CAMB #97

Closed rickypang0219 closed 3 years ago

rickypang0219 commented 3 years ago

Hi, everyone. I am a student doing research on cosmology and astrophysics and I need to use camb. However, I cannot install camb in my MacBook with python (ver. 3.9.1) . Below is the response of terminal while installing camb. May I ask how to deal with the current problem in order to install camb successfully. Thank you. Besides, I apologise for pasting the whole terminal output in here.

  Downloading camb-1.2.0.tar.gz (1.6 MB)
     |████████████████████████████████| 1.6 MB 5.3 MB/s 
Requirement already satisfied: scipy>=1.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from camb) (1.5.4)
Requirement already satisfied: sympy>=1.0 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from camb) (1.7.1)
Requirement already satisfied: numpy>=1.14.5 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from scipy>=1.0->camb) (1.19.4)
Requirement already satisfied: mpmath>=0.19 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from sympy>=1.0->camb) (1.1.0)
Building wheels for collected packages: camb
  Building wheel for camb (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/tmp/pip-wheel-_wzpoil9
       cwd: /private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/
  Complete output (54 lines):
  running bdist_wheel
  running build
  running build_py
  Compiling source...
  /Library/Developer/CommandLineTools/usr/bin/make -C Releaselib --no-print-directory -f../Makefile FORUTILS_SRC_DIR=.. libforutils.a
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o MiscUtils.o -c ../MiscUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o MpiUtils.o -c ../MpiUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o StringUtils.o -c ../StringUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o ArrayUtils.o -c ../ArrayUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o FileUtils.o -c ../FileUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o IniObjects.o -c ../IniObjects.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o RandUtils.o -c ../RandUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o ObjectLists.o -c ../ObjectLists.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o MatrixUtils.o -c ../MatrixUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o RangeUtils.o -c ../RangeUtils.f90
  gfortran -cpp -ffree-line-length-none -fmax-errors=4 -MMD -fopenmp -fPIC -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -o Interpolation.o -c ../Interpolation.f90
  ar -r libforutils.a MiscUtils.o MpiUtils.o StringUtils.o ArrayUtils.o FileUtils.o IniObjects.o RandUtils.o ObjectLists.o MatrixUtils.o RangeUtils.o Interpolation.o
  ar: creating archive libforutils.a
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../constants.f90 -o constants.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../config.f90 -o config.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../classes.f90 -o classes.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../MathUtils.f90 -o MathUtils.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../subroutines.f90 -o subroutines.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkAge21cm.f90 -o DarkAge21cm.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyInterface.f90 -o DarkEnergyInterface.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SourceWindows.f90 -o SourceWindows.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../massive_neutrinos.f90 -o massive_neutrinos.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../model.f90 -o model.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../results.f90 -o results.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../bessels.f90 -o bessels.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../recfast.f90 -o recfast.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyFluid.f90 -o DarkEnergyFluid.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyPPF.f90 -o DarkEnergyPPF.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../PowellMinimize.f90 -o PowellMinimize.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyQuintessence.f90 -o DarkEnergyQuintessence.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../equations.f90 -o equations.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../reionization.f90 -o reionization.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../InitialPower.f90 -o InitialPower.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../halofit.f90 -o halofit.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SecondOrderPK.f90 -o SecondOrderPK.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../lensing.f90 -o lensing.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SeparableBispectrum.f90 -o SeparableBispectrum.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../cmbmain.f90 -o cmbmain.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../camb.f90 -o camb.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../camb_python.f90 -o camb_python.o
  gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -JReleaselib -IReleaselib/ -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/"  \
        Releaselib/constants.o Releaselib/config.o Releaselib/classes.o Releaselib/MathUtils.o Releaselib/subroutines.o Releaselib/DarkAge21cm.o Releaselib/DarkEnergyInterface.o Releaselib/SourceWindows.o Releaselib/massive_neutrinos.o Releaselib/model.o Releaselib/results.o Releaselib/bessels.o Releaselib/recfast.o Releaselib/DarkEnergyFluid.o Releaselib/DarkEnergyPPF.o Releaselib/PowellMinimize.o Releaselib/DarkEnergyQuintessence.o Releaselib/equations.o Releaselib/reionization.o Releaselib/InitialPower.o Releaselib/halofit.o Releaselib/SecondOrderPK.o Releaselib/lensing.o Releaselib/SeparableBispectrum.o Releaselib/cmbmain.o Releaselib/camb.o Releaselib/camb_python.o  -L"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -lforutils -o Releaselib/camblib.so
  ld: library not found for -lSystem
  collect2: error: ld returned 1 exit status
  make[2]: *** [Releaselib/camblib.so] Error 1
  make[1]: *** [camblib.so] Error 2
  make: *** [python] Error 2
  chmod: ../camb/camblib.so: No such file or directory
  Compilation failed
  ----------------------------------------
  ERROR: Failed building wheel for camb
  Running setup.py clean for camb
Failed to build camb
Installing collected packages: camb
    Running setup.py install for camb ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1lvr61s2/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/camb
         cwd: /private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/
    Complete output (41 lines):
    running install
    running build
    running build_py
    Compiling source...
    /Library/Developer/CommandLineTools/usr/bin/make -C Releaselib --no-print-directory -f../Makefile FORUTILS_SRC_DIR=.. libforutils.a
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../constants.f90 -o constants.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../config.f90 -o config.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../classes.f90 -o classes.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../MathUtils.f90 -o MathUtils.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../subroutines.f90 -o subroutines.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkAge21cm.f90 -o DarkAge21cm.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyInterface.f90 -o DarkEnergyInterface.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SourceWindows.f90 -o SourceWindows.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../massive_neutrinos.f90 -o massive_neutrinos.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../model.f90 -o model.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../results.f90 -o results.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../bessels.f90 -o bessels.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../recfast.f90 -o recfast.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyFluid.f90 -o DarkEnergyFluid.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyPPF.f90 -o DarkEnergyPPF.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../PowellMinimize.f90 -o PowellMinimize.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../DarkEnergyQuintessence.f90 -o DarkEnergyQuintessence.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../equations.f90 -o equations.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../reionization.f90 -o reionization.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../InitialPower.f90 -o InitialPower.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../halofit.f90 -o halofit.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SecondOrderPK.f90 -o SecondOrderPK.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../lensing.f90 -o lensing.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../SeparableBispectrum.f90 -o SeparableBispectrum.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../cmbmain.f90 -o cmbmain.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../camb.f90 -o camb.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -c ../camb_python.f90 -o camb_python.o
    gfortran -dynamiclib  -O3 -MMD -cpp -ffree-line-length-none -fmax-errors=4 -fopenmp -JReleaselib -IReleaselib/ -I"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/"  \
            Releaselib/constants.o Releaselib/config.o Releaselib/classes.o Releaselib/MathUtils.o Releaselib/subroutines.o Releaselib/DarkAge21cm.o Releaselib/DarkEnergyInterface.o Releaselib/SourceWindows.o Releaselib/massive_neutrinos.o Releaselib/model.o Releaselib/results.o Releaselib/bessels.o Releaselib/recfast.o Releaselib/DarkEnergyFluid.o Releaselib/DarkEnergyPPF.o Releaselib/PowellMinimize.o Releaselib/DarkEnergyQuintessence.o Releaselib/equations.o Releaselib/reionization.o Releaselib/InitialPower.o Releaselib/halofit.o Releaselib/SecondOrderPK.o Releaselib/lensing.o Releaselib/SeparableBispectrum.o Releaselib/cmbmain.o Releaselib/camb.o Releaselib/camb_python.o  -L"/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/fortran/../forutils/Releaselib/" -lforutils -o Releaselib/camblib.so
    ld: library not found for -lSystem
    collect2: error: ld returned 1 exit status
    make[2]: *** [Releaselib/camblib.so] Error 1
    make[1]: *** [camblib.so] Error 2
    make: *** [python] Error 2
    chmod: ../camb/camblib.so: No such file or directory
    Compilation failed
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-c0k_8lkt/camb_82b4bf3a84d04092924cd180aa4616f5/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-1lvr61s2/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/camb Check the logs for full command output.
rickypang0219 commented 3 years ago

Thank you for your comment, Alexander-mead. I have looked to #96 and I installed forutils (ver.0.1) via git. However, I still cannot download the camb.

alexander-mead commented 3 years ago

I saw the same ld: library not found for -lSystem error after recently updating my Mac OS to v11 (big Sur) and updating to gfortran 10.2. I installed gfortran via homebrew using brew install gcc, but then saw the same error whenever I tried to compile *any*Fortrancode, not justCAMB`.

I was able to solve the problem using brew install gfortran, in addition to brew install gcc, but I don't know why this works.

rickypang0219 commented 3 years ago

Thank you, Alexander-mead. This method perfectly works fine for me.

reneehlozek commented 3 years ago

Just a note @alexander-mead that apparently this is because in Big Sur they moved the library locations. See e.g. this issue https://github.com/ponylang/ponyc/issues/3684 for a solution!