lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
234 stars 290 forks source link

Can't compile explanatory.ini #226

Open messyt opened 6 years ago

messyt commented 6 years ago

Hi,

I'm trying to download CLASS, but I can't quite pass the executing ./class explanatory.ini stage. When I run this command, I get the following:

Reading input parameters -> matched budget equations by adjusting Omega_Lambda = 6.878622e-01 Running CLASS version v2.6.3 Computing background -> age = 13.795359 Gyr -> conformal age = 14165.045412 Mpc Computing thermodynamics with Y_He=0.2453 -> recombination at z = 1089.184869 corresponding to conformal time = 280.591903 Mpc with comoving sound horizon = 144.703150 Mpc angular diameter distance = 12.735871 Mpc and sound horizon angle 100*theta_s = 1.042196 -> baryon drag stops at z = 1059.089246 corresponding to conformal time = 286.504945 Mpc with comoving sound horizon rs = 147.384053 Mpc -> reionization with optical depth = 0.092664 corresponding to conformal time = 4255.316282 Mpc Computing sources dyld: lazy symbol binding failed: Symbol not found: _emutls_getaddress Referenced from: /usr/local/opt/gcc/lib/gcc/8/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: emutls_get_address Referenced from: /usr/local/opt/gcc/lib/gcc/8/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib Abort trap: 6

When I ran the command 'make' before './class explanatory', it seemed to output no errors, and finished by itself.

Details about my computer: -Running macOS High Sierra (10.13.5); I installed Anaconda with Python3, but I can use Python2 by writing 'python2' in the terminal (if I write 'python') in the terminal, I would be using Python3. (I have numpy, scipy, and cython installed for both Python2 and 3) -GCC version is 8.1.0, and when I type 'gcc --version', I get:

gcc (Homebrew GCC 8.1.0) 8.1.0 Copyright (C) 2018 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.

Additionally, if I open a Python2 environment, the line 'import classy' throws an error.

Is it possible that you could help me? Thanks in advance!

lesgourg commented 6 years ago

Hi @messyt, You are using the same system and compiler as most other users. For instance, I also do have "macOS High Sierra (10.13.5)" and "gcc (Homebrew GCC 8.1.0) 8.1.0". Nobody else gets problems. Thus it seems to be an issue with your gcc installation. Since you get the problem when you run ./class and not its python wrapper, the python installation is irrelevant at this point, only the gcc matters. Just to be sure, please redo first a clean compilation with: make clean make -j (the -j is there only for speedup). If you started to do the compilation with a bad gcc version, then updated gcc, and then typed "make" without "make clean", your executable comes from a mixture of different compilers. The "make clean" will force the compilation to be redone from scratch. Then retry ./class explanatory.ini I bet it will work. If not, it would suggest that for some reason, the Makefile wants to use another version of gcc than the one you think, or that your gcc installation is problematic, with maybe missing dependencies; but this would not be a problem of class. Good luck.

messyt commented 6 years ago

Hi @lesgourg, Thanks for the reply! I tried to do make clean make -j

but I got the same error message as before. I'm not sure if my gcc installation was problematic. Is there a procedure that I can follow to reinstall the latest gcc version? I simply installed my current gcc by using Homebrew, which I believe was simply 'brew install gcc'

Thanks!