Closed lyang54 closed 6 years ago
As this does not seem to be a CRPropa problem, I suggest you follow the instructions on how to install gfortran available here. If CRPropa doesn't install after you have all compilers installed, please let us know.
Thanks, after installing gfortran, the error disappeared and I got the same error as asavelie
conversion from 'const crpropa::Variant' to 'size_t' (aka 'unsigned long')
is ambiguous
index = c->getProperty(DI);
~~~^~~~~~~~~~~~~~~
This is being investigated. Please follow this issue: https://github.com/CRPropa/CRPropa3/issues/146
Sorry for more errors here with the newest version of CRPropa, now it's complaining about clang again?
cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_FLAGS="-stdlib=libstdc++"
make
ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [libcrpropa.dylib] Error 1 make[1]: [CMakeFiles/crpropa.dir/all] Error 2
I cannot reproduce this error. Which version of clang are you using?
Here is the information
Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin17.2.0 Thread model: posix
That’s exactly what I’m using (also on OSX) and I cannot reproduce the problem. Are you sure this is CRPropa-related?
I successfully installed CRPropa before with your help. And last Friday, I upgrade my OSX to high Sierra and after that CRPropa can not be imported in python. That's why I have to reinstall it. It looks there is something wrong with linker, but I am not sure about this... Sorry for so many troubles I bring. Thanks.
[ 75%] Linking CXX shared library libcrpropa.dylib
clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
ld: warning: could not create compact unwind for lushow: stack subq instruction is too different from dwarf stack size
Undefined symbols for architecture x86_64:
"concat_path(std::1::basic_string<char, std::__1::char_traits
I assume that this issue was resolved by now, if not please reopen. If the issue has been resolved, it would be great if you could post the final solution for further reference.
I've just ran into a similar problem. I updated to python 3.5 and high sierra 10.13.6 and I'm getting a linker error during installation. This is the last part of 'make':
ld: warning: could not create compact unwind for lushow: stack subq instruction is too different from dwarf stack size Undefined symbols for architecture x86_64: "crpropa::Random::getSeed_base64() const", referenced from: crpropa::NuclearDecay::betaDecay(crpropa::Candidate, bool) const in NuclearDecay.cpp.o crpropa::NuclearDecay::nucleonEmission(crpropa::Candidate, int, int) const in NuclearDecay.cpp.o crpropa::PhotoDisintegration::performInteraction(crpropa::Candidate, int) const in PhotoDisintegration.cpp.o crpropa::PhotoPionProduction::performInteraction(crpropa::Candidate, bool) const in PhotoPionProduction.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [libcrpropa.dylib] Error 1 make[1]: [CMakeFiles/crpropa.dir/all] Error 2 make: *** [all] Error 2
The config output:
avanvliet@s92dyn215:~/Documents/Werk/software/CRPropa3_master/CRPropa3/build% cmake .. -DPYTHON_EXECUTABLE=/Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/bin/python -DPYTHON_INCLUDE_PATH=/Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/include/python3.5m/Python.h -DPYTHON_LIBRARY=/Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/python3.5/config-3.5m/libpython3.5m.dylib
-- The Fortran compiler identification is GNU 5.1.0
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Check for working Fortran compiler: /usr/local/bin/gfortran
-- Check for working Fortran compiler: /usr/local/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/local/bin/gfortran supports Fortran 90
-- Checking whether /usr/local/bin/gfortran supports Fortran 90 -- yes
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build Type: Release
-- CRPropa version: 3.1-268-gcc0baa1 cc0baa12fafa07296cc4ef2a9e8e966b04e0eb93 refs/heads/master
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
Using provided EIGEN
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP Fortran flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
-- Google perftools: NOT Found!
-- Include: GOOGLE_PERFTOOLS_INCLUDE_DIR-NOTFOUND
-- FFTW3 with single precision (FFTW3F): Found!
-- Include: /usr/local/include
-- Library: /usr/local/lib/libfftw3f.a
-- Quimby: NOT Found!
-- Include: QUIMBY_INCLUDE_DIR-NOTFOUND
-- Library: QUIMBY_LIBRARY-NOTFOUND
-- SAGA: NOT Found!
-- Include: SAGA_INCLUDE_DIR-NOTFOUND
-- Library: SAGA_LIBRARY-NOTFOUND
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- muParser: NOT Found!
-- Include: MUPARSER_INCLUDE_DIR-NOTFOUND
-- Library: MUPARSER_LIBRARY-NOTFOUND
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11")
-- Found HDF5: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/libhdf5.dylib (found version "1.8.16")
-- Use absolute RPATH /usr/local/lib
-- Downloading data file from crpropa.desy.de ~ 50 MB
-- Extracting data file
-- Found PythonInterp: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/bin/python (found version "3.5.2")
-- Found PythonLibs: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/python3.5/config-3.5m/libpython3.5m.dylib
-- Found SWIG: /usr/local/bin/swig (found version "3.0.12")
-- Using user provided Python library: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/python3.5/config-3.5m/libpython3.5m.dylib
-- Python: Found!
-- Version: 3.5/35
-- Executeable: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/bin/python
-- Include: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/include/python3.5m
-- Library: /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/python3.5/config-3.5m/libpython3.5m.dylib
-- Site-package directory: /usr/local/lib/python3.5/site-packages
-- Found numpy headers in /Users/avanvliet/Library/Enthought/Canopy/edm/envs/User/lib/python3.5/site-packages/numpy/core/include
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/avanvliet/Documents/Werk/software/CRPropa3_master/CRPropa3/build
I confirm this issue when linking to Apple's LLVM in OSX Mojave. I have compiled using GCC 7 and Clang 3.9 and it works.
I downloaded clang3.9 with macports and it works just fine with it.
I believe that the bug is fixed now in the master branch. Could you please check? Also, as that issue is not related to the original ancient bug a new issue would have been better. Please note that we now also have a osx build on travis. Somehow there are strange errors on the test I do not understand. I would appreciate if someone with a mac could check if there is something missing in the travis build on osx.
As long as I switch off HDF5 and set the python library path by hand it works now. Thank you very much for looking at this!
Also, as that issue is not related to the original ancient bug a new issue would have been better.
Sorry about that. As I got the same error message as mentioned above I thought the problems might be related.
The issue was in the new random-seed storage and only occured if OpenMP was not available.
@rafaelab Yeah, that's what I did. brew install gfortran Error: No available formula with the name "gfortran" GNU Fortran is now provided as part of GCC, and can be installed with: brew install gcc
brew install gcc Warning: gcc 7.2.0 is already installed, it's just not linked. You can use
brew link gcc
to link this version.brew link gcc Linking /usr/local/Cellar/gcc/7.2.0... Error: Could not symlink include/c++/7.2.0 /usr/local/include/c++ is not writable.