CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
71 stars 69 forks source link

Linker errors on OSX after update to high sierra #147

Closed lyang54 closed 6 years ago

lyang54 commented 6 years ago

@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.

rafaelab commented 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.

lyang54 commented 6 years ago

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);
                            ~~~^~~~~~~~~~~~~~~
rafaelab commented 6 years ago

This is being investigated. Please follow this issue: https://github.com/CRPropa/CRPropa3/issues/146

lyang54 commented 6 years ago

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

rafaelab commented 6 years ago

I cannot reproduce this error. Which version of clang are you using?

lyang54 commented 6 years ago

Here is the information

Apple LLVM version 9.0.0 (clang-900.0.38) Target: x86_64-apple-darwin17.2.0 Thread model: posix

rafaelab commented 6 years ago

That’s exactly what I’m using (also on OSX) and I cannot reproduce the problem. Are you sure this is CRPropa-related?

lyang54 commented 6 years ago

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, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::getDataPath(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >) in Common.cpp.o "is_directory(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::getDataPath(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >) in Common.cpp.o "DintEMCascade::DintEMCascade(int, int, std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, double, double, double, double)", referenced from: crpropa::DintPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int, int, double, double) in PhotonPropagation.cpp.o crpropa::DintElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, double) in PhotonPropagation.cpp.o crpropa::EMCascade::runCascade(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int, int, double, double) in EMCascade.cpp.o "kiss::trim(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::XmlExecute::loadGridMagneticField(pugi::xml_node&) in XmlExecute.cpp.o crpropa::XmlExecute::loadOutput(pugi::xml_node&) in XmlExecute.cpp.o "kiss::ends_with(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::TextOutput::TextOutput(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in TextOutput.cpp.o crpropa::TextOutput::TextOutput(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, crpropa::Output::OutputType) in TextOutput.cpp.o crpropa::TextOutput::load(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, crpropa::ParticleCollector) in TextOutput.cpp.o "eleca::Propagation::ReadTables(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::ElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in PhotonPropagation.cpp.o crpropa::DintElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, double) in PhotonPropagation.cpp.o crpropa::PhotonEleCa::PhotonEleCa(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in PhotonEleCa.cpp.o "eleca::Propagation::InitBkgArray(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&)", referenced from: crpropa::ElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in PhotonPropagation.cpp.o crpropa::DintElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, double) in PhotonPropagation.cpp.o crpropa::PhotonEleCa::PhotonEleCa(std::1::basic_string<char, std::__1::char_traits, std::1::allocator >, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in PhotonEleCa.cpp.o "eleca::Propagation::WriteOutput(std::1::basic_ostream<char, std::__1::char_traits >&, eleca::Particle&, std::1::vector<eleca::Particle, std::__1::allocator >&) const", referenced from: crpropa::PhotonEleCa::process(crpropa::Candidate) const in PhotonEleCa.cpp.o "eleca::Propagation::Propagate(eleca::Particle&, std::1::vector<eleca::Particle, std::1::allocator >&, std::1::vector<eleca::Particle, std::1::allocator >&, bool) const", referenced from: crpropa::ElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in PhotonPropagation.cpp.o crpropa::DintElecaPropagation(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, bool, double, double, double) in PhotonPropagation.cpp.o crpropa::PhotonEleCa::process(crpropa::Candidate) const in PhotonEleCa.cpp.o "std::string::find_first_of(char const, unsigned long, unsigned long) const", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) "std::string::find_first_not_of(char const, unsigned long, unsigned long) const", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) "std::string::compare(char const) const", referenced from: eleca::GetEvolution(double, std::string) in libeleca.a(Propagation.cpp.o) eleca::CBR(double, double, std::string) in libeleca.a(Propagation.cpp.o) eleca::Propagation::InitBkgArray(std::string const&) in libeleca.a(Propagation.cpp.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) healpix::planck_failure(char const, int, char const, std::string const&) in libhealpix_base.a(error_handling.cc.o) eleca::Process::SetBackground(std::string) in libeleca.a(Process.cpp.o) "std::basic_file::is_open() const", referenced from: eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) "std::basic_stringbuf<char, std::char_traits, std::allocator >::str() const", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) "std::basic_ios<char, std::char_traits >::widen(char) const", referenced from: kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) ... "std::basic_string<wchar_t, std::char_traits, std::allocator >::_M_leak_hard()", referenced from: pugi::impl::(anonymous namespace)::as_wide_impl(char const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::basic_string<wchar_t, std::char_traits, std::allocator >::_Rep::_M_destroy(std::allocator const&)", referenced from: pugi::impl::(anonymous namespace)::as_wide_impl(char const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::basic_string<wchar_t, std::char_traits, std::allocator >::_Rep::_S_empty_rep_storage", referenced from: pugi::impl::(anonymous namespace)::as_wide_impl(char const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::basic_string<wchar_t, std::char_traits, std::allocator >::resize(unsigned long, wchar_t)", referenced from: pugi::impl::(anonymous namespace)::as_wide_impl(char const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::istream& std::istream::_M_extract(double&)", referenced from: eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) "std::istream::read(char, long)", referenced from: pugi::xml_document::load(std::istream&, unsigned int, pugi::xml_encoding) in libpugixml.a(pugixml.cpp.o) "std::istream::seekg(std::fpos<__mbstate_t>)", referenced from: pugi::xml_document::load(std::istream&, unsigned int, pugi::xml_encoding) in libpugixml.a(pugixml.cpp.o) "std::istream::seekg(long long, std::_Ios_Seekdir)", referenced from: pugi::xml_document::load(std::istream&, unsigned int, pugi::xml_encoding) in libpugixml.a(pugixml.cpp.o) "std::istream::tellg()", referenced from: pugi::xml_document::load(std::istream&, unsigned int, pugi::xml_encoding) in libpugixml.a(pugixml.cpp.o) "std::istream::operator>>(int&)", referenced from: HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::ostream::put(char)", referenced from: kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) ... "std::ostream::flush()", referenced from: kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::~Logger() in libkiss.a(logger.cpp.o) kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) ... "std::ostream::write(char const, long)", referenced from: pugi::xml_writer_stream::write(void const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::ostream& std::ostream::_M_insert(double)", referenced from: eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::Propagate(eleca::Particle&, std::vector<eleca::Particle, std::allocator >&, std::vector<eleca::Particle, std::allocator >&, bool) const in libeleca.a(Propagation.cpp.o) eleca::dSigmadE_ICS(double, double, double, double) in libeleca.a(EnergyLoss.cpp.o) eleca::dSigmadE_PPx(double, double) in libeleca.a(EnergyLoss.cpp.o) eleca::PPSecondariesEnergyDistribution::sample(double, double, double) in libeleca.a(EnergyLoss.cpp.o) eleca::PPSecondariesEnergyDistribution::PPSecondariesEnergyDistribution(double, double, unsigned long, unsigned long) in libeleca.a(EnergyLoss.cpp.o) ... "std::ostream& std::ostream::_M_insert(unsigned long)", referenced from: eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) "std::ostream::operator<<(int)", referenced from: kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) ... "std::string::_M_leak_hard()", referenced from: concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) pugi::impl::(anonymous namespace)::as_utf8_impl(wchar_t const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::string::_Rep::_M_destroy(std::allocator const&)", referenced from: list_directory(std::string const&, std::vector<std::string, std::allocator >&) in libkiss.a(path.cpp.o) create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) std::vector<std::string, std::allocator >::_M_insert_aux(gnu_cxx::__normal_iterator<std::string*, std::vector<std::string, std::allocator > >, std::string const&) in libkiss.a(path.cpp.o) DintEMCascade::DintEMCascade(int, int, std::string, double, double, double, double) in libdint.a(DintEMCascade.cpp.o) DintEMCascade::~DintEMCascade() in libdint.a(DintEMCascade.cpp.o) ... "std::string::_Rep::_S_terminal", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) pugi::xml_node::path(char) const in libpugixml.a(pugixml.cpp.o) "std::string::_Rep::_S_empty_rep_storage", referenced from: list_directory(std::string const&, std::vector<std::string, std::allocator >&) in libkiss.a(path.cpp.o) create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) std::vector<std::string, std::allocator >::_M_insert_aux(gnu_cxx::normal_iterator<std::string, std::vector<std::string, std::allocator > >, std::string const&) in libkiss.a(path.cpp.o) DintEMCascade::DintEMCascade(int, int, std::string, double, double, double, double) in libdint.a(DintEMCascade.cpp.o) DintEMCascade::~DintEMCascade() in libdint.a(DintEMCascade.cpp.o) ... "std::string::swap(std::string&)", referenced from: pugi::xml_node::path(char) const in libpugixml.a(pugixml.cpp.o) "std::string::append(char const, unsigned long)", referenced from: LoadICSTables(RawTotalRate, RawDiffRate, RawDiffRate, int, std::string) in libdint.a(load.cpp.o) LoadPPTables(RawTotalRate, RawDiffRate, int, std::string) in libdint.a(load.cpp.o) LoadTPPTables(RawTotalRate, RawDiffRate, int, std::string) in libdint.a(load.cpp.o) LoadDPPTables(RawTotalRate, int, std::string) in libdint.a(load.cpp.o) LoadPPPNucleonTables(RawTotalRate, RawTotalRate, RawDiffRate, RawDiffRate, RawDiffRate, int, std::string) in libdint.a(load.cpp.o) LoadPPPEMTables(RawDiffRate, RawDiffRate, RawDiffRate, RawDiffRate, int, std::string) in libdint.a(load.cpp.o) LoadNPPNucleonTables(RawTotalRate, int, std::string) in libdint.a(load.cpp.o) ... "std::string::append(std::string const&)", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) pugi::xml_node::path(char) const in libpugixml.a(pugixml.cpp.o) "std::string::append(unsigned long, char)", referenced from: concat_path(std::string const&, std::string const&) in libkiss.a(path.cpp.o) "std::string::assign(char const*, unsigned long)", referenced from: eleca::Process::Process() in libeleca.a(Process.cpp.o) eleca::Process::Process(eleca::Particle&, eleca::Particle&) in libeleca.a(Process.cpp.o) eleca::Process::Process(eleca::Particle&, eleca::Particle&, eleca::Process::Name) in libeleca.a(Process.cpp.o) "std::string::assign(std::string const&)", referenced from: std::vector<std::string, std::allocator >::_M_insert_aux(__gnu_cxx::normal_iterator<std::string, std::vector<std::string, std::allocator > >, std::string const&) in libkiss.a(path.cpp.o) eleca::Propagation::InitBkgArray(std::string const&) in libeleca.a(Propagation.cpp.o) eleca::Process::Process(eleca::Process const&) in libeleca.a(Process.cpp.o) eleca::Process::SetBackground(std::string) in libeleca.a(Process.cpp.o) "std::string::resize(unsigned long, char)", referenced from: pugi::impl::(anonymous namespace)::as_utf8_impl(wchar_t const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::string::reserve(unsigned long)", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) pugi::xml_node::path(char) const in libpugixml.a(pugixml.cpp.o) "std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const, std::allocator const&)", referenced from: list_directory(std::string const&, std::vector<std::string, std::allocator >&) in libkiss.a(path.cpp.o) pugi::xml_node::path(char) const in libpugixml.a(pugixml.cpp.o) pugi::xpath_query::evaluate_string(pugi::xpath_node const&) const in libpugixml.a(pugixml.cpp.o) HepPID::getParticleNameMap() in libHepPID.a(ParticleName.cc.o) HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) healpix::PlanckError::PlanckError(char const) in libhealpix_base.a(error_handling.cc.o) ... "std::basic_string<char, std::char_traits, std::allocator >::basic_string(char const, unsigned long, std::allocator const&)", referenced from: executable_path() in libkiss.a(path.cpp.o) "std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&)", referenced from: list_directory(std::string const&, std::vector<std::string, std::allocator >&) in libkiss.a(path.cpp.o) create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&) in libkiss.a(path.cpp.o) concat_path(std::string const&, std::string const&, std::string const&) in libkiss.a(path.cpp.o) std::vector<std::string, std::allocator >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string, std::vector<std::string, std::allocator > >, std::string const&) in libkiss.a(path.cpp.o) DintEMCascade::DintEMCascade(int, int, std::string, double, double, double, double) in libdint.a(DintEMCascade.cpp.o) DintEMCascade::propagate(double, double, Spectrum, Spectrum, double) in libdint.a(DintEMCascade.cpp.o) ... "std::basic_string<char, std::char_traits, std::allocator >::basic_string(std::string const&, unsigned long, unsigned long)", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::basic_istream<wchar_t, std::char_traits >::read(wchar_t, long)", referenced from: pugi::xml_document::load(std::basic_istream<wchar_t, std::char_traits >&, unsigned int) in libpugixml.a(pugixml.cpp.o) "std::basic_istream<wchar_t, std::char_traits >::seekg(std::fpos<__mbstate_t>)", referenced from: pugi::xml_document::load(std::basic_istream<wchar_t, std::char_traits >&, unsigned int) in libpugixml.a(pugixml.cpp.o) "std::basic_istream<wchar_t, std::char_traits >::seekg(long long, std::_Ios_Seekdir)", referenced from: pugi::xml_document::load(std::basic_istream<wchar_t, std::char_traits >&, unsigned int) in libpugixml.a(pugixml.cpp.o) "std::basic_istream<wchar_t, std::char_traits >::tellg()", referenced from: pugi::xml_document::load(std::basic_istream<wchar_t, std::char_traits >&, unsigned int) in libpugixml.a(pugixml.cpp.o) "std::basic_ostream<wchar_t, std::char_traits >::write(wchar_t const, long)", referenced from: pugi::xml_writer_stream::write(void const, unsigned long) in libpugixml.a(pugixml.cpp.o) "std::runtime_error::runtime_error(std::string const&)", referenced from: eleca::PPSecondariesEnergyDistribution::sample(double, double, double) in libeleca.a(EnergyLoss.cpp.o) eleca::ICSSecondariesEnergyDistribution::sample(double, double) in libeleca.a(EnergyLoss.cpp.o) "std::basic_ifstream<char, std::char_traits >::basic_ifstream(char const, std::_Ios_Openmode)", referenced from: eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) "std::basic_ifstream<char, std::char_traits >::~basic_ifstream()", referenced from: eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) "std::basic_istringstream<char, std::char_traits, std::allocator >::basic_istringstream(std::string const&, std::_Ios_Openmode)", referenced from: HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::basic_ostringstream<char, std::char_traits, std::allocator >::basic_ostringstream(std::_Ios_Openmode)", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) "std::locale::~locale()", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::ios_base::Init::Init()", referenced from: GLOBALsub_I_DintEMCascade.cpp in libdint.a(DintEMCascade.cpp.o) GLOBALsub_I_logger.cpp in libkiss.a(logger.cpp.o) GLOBALsub_I_Propagation.cpp in libeleca.a(Propagation.cpp.o) GLOBALsub_I_Common.cpp in libeleca.a(Common.cpp.o) GLOBALsub_I_ParticleName.cc in libHepPID.a(ParticleName.cc.o) GLOBALsub_I_ParticleIDMethods.cc in libHepPID.a(ParticleIDMethods.cc.o) GLOBALsub_I_healpix_base.cc in libhealpix_base.a(healpix_base.cc.o) ... "std::ios_base::Init::~Init()", referenced from: GLOBALsub_I_DintEMCascade.cpp in libdint.a(DintEMCascade.cpp.o) GLOBALsub_I_logger.cpp in libkiss.a(logger.cpp.o) GLOBALsub_I_Propagation.cpp in libeleca.a(Propagation.cpp.o) GLOBALsub_I_Common.cpp in libeleca.a(Common.cpp.o) GLOBALsub_I_ParticleName.cc in libHepPID.a(ParticleName.cc.o) GLOBALsub_I_ParticleIDMethods.cc in libHepPID.a(ParticleIDMethods.cc.o) GLOBALsub_I_healpix_base.cc in libhealpix_base.a(healpix_base.cc.o) ... "std::ios_base::~ios_base()", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::basic_ios<char, std::char_traits >::clear(std::_Ios_Iostate)", referenced from: kiss::Logger::Logger(kiss::eLogLevel) in libkiss.a(logger.cpp.o) healpix::planck_failure(char const, int, char const, std::string const&) in libhealpix_base.a(error_handling.cc.o) "std::basic_ostream<char, std::char_traits >& std::ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const, long)", referenced from: kiss::Logger::Logger(kiss::eLogLevel) in libkiss.a(logger.cpp.o) kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::WriteOutput(std::ostream&, eleca::Particle&, std::vector<eleca::Particle, std::allocator >&) const in libeleca.a(Propagation.cpp.o) ... "std::_Rb_tree_decrement(std::_Rb_tree_node_base)", referenced from: HepPID::getParticleNameMap() in libHepPID.a(ParticleName.cc.o) std::_Rb_tree<std::string, std::pair<std::string const, int>, std::_Select1st<std::pair<std::string const, int> >, std::less, std::allocator<std::pair<std::string const, int> > >::_M_insert_unique(std::pair<std::string const, int> const&) in libHepPID.a(ParticleName.cc.o) std::_Rb_tree<int, std::pair<int const, double>, std::_Select1st<std::pair<int const, double> >, std::less, std::allocator<std::pair<int const, double> > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<int const, double> >, std::pair<int const, double> const&) in libdint.a(gauleg.cpp.o) std::_Rb_tree<int, std::pair<int const, double>, std::_Select1st<std::pair<int const, double> >, std::less, std::allocator<std::pair<int const, double> > >::_M_insert_unique(std::pair<int const, double> const&) in libdint.a(gauleg.cpp.o) "std::_Rb_tree_increment(std::_Rb_tree_node_base)", referenced from: std::_Rb_tree<int, std::pair<int const, double>, std::_Select1st<std::pair<int const, double> >, std::less, std::allocator<std::pair<int const, double> > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<int const, double> >, std::pair<int const, double> const&) in libdint.a(gauleg.cpp.o) "std::__throw_length_error(char const)", referenced from: std::vector<double, std::allocator >::_M_fill_insert(gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator > >, unsigned long, double const&) in libeleca.a(Propagation.cpp.o) healpix::T_Healpix_Base::query_multidisc_general(healpix::arr<healpix::vec3_t > const&, healpix::arr const&, bool, std::vector<int, std::allocator > const&, healpix::rangeset&) const in libhealpix_base.a(healpix_base.cc.o) void healpix::T_Healpix_Base::query_disc_internal(healpix::pointing, double, int, healpix::rangeset&) const in libhealpix_base.a(healpix_base.cc.o) void healpix::T_Healpix_Base::query_disc_internal(healpix::pointing, double, int, healpix::rangeset&) const in libhealpix_base.a(healpix_base.cc.o) healpix::rangeset::toVector(std::vector<int, std::allocator >&) const in libhealpix_base.a(healpix_base.cc.o) healpix::T_Healpix_Base::query_multidisc_general(healpix::arr<healpix::vec3_t > const&, healpix::arr const&, bool, std::vector<int, std::allocator > const&, healpix::rangeset&) const in libhealpix_base.a(healpix_base.cc.o) void healpix::T_Healpix_Base::query_disc_internal(healpix::pointing, double, int, healpix::rangeset&) const in libhealpix_base.a(healpix_base.cc.o) ... "std::throw_out_of_range(char const)", referenced from: create_directory_recursive(std::string const&, unsigned long, unsigned long, unsigned long) in libkiss.a(path.cpp.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base, std::_Rb_tree_node_base, std::_Rb_tree_node_base&)", referenced from: std::_Rb_tree<int, std::pair<int const, std::string>, std::_Select1st<std::pair<int const, std::string> >, std::less, std::allocator<std::pair<int const, std::string> > >::_M_insert(std::_Rb_tree_node_base, std::_Rb_tree_node_base, std::pair<int const, std::string> const&) in libHepPID.a(ParticleName.cc.o) std::_Rb_tree<std::string, std::pair<std::string const, int>, std::_Select1st<std::pair<std::string const, int> >, std::less, std::allocator<std::pair<std::string const, int> > >::_M_insert(std::_Rb_tree_node_base, std::_Rb_tree_node_base, std::pair<std::string const, int> const&) in libHepPID.a(ParticleName.cc.o) std::_Rb_tree<int, std::pair<int const, double>, std::_Select1st<std::pair<int const, double> >, std::less, std::allocator<std::pair<int const, double> > >::_M_insert_unique(std::_Rb_tree_iterator<std::pair<int const, double> >, std::pair<int const, double> const&) in libdint.a(gauleg.cpp.o) std::_Rb_tree<int, std::pair<int const, double>, std::_Select1st<std::pair<int const, double> >, std::less, std::allocator<std::pair<int const, double> > >::_M_insert_unique(std::pair<int const, double> const&) in libdint.a(gauleg.cpp.o) "std::cerr", referenced from: kiss::Logger::loadEnvLogLevel() in libkiss.a(logger.cpp.o) kiss::Logger::stream in libkiss.a(logger.cpp.o) eleca::Propagation::ReadTables(std::string const&) in libeleca.a(Propagation.cpp.o) eleca::Propagation::ExtractMinDist(eleca::Process&, int, double, double, std::vector<double, std::allocator >&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::Propagate(eleca::Particle&, std::vector<eleca::Particle, std::allocator >&, std::vector<eleca::Particle, std::allocator >&, bool) const in libeleca.a(Propagation.cpp.o) ... "std::cout", referenced from: eleca::Propagation::GetLambdaTab(eleca::Process const&, eleca::Process::Name) const in libeleca.a(Propagation.cpp.o) eleca::Propagation::GetEtarget(eleca::Process&, eleca::Particle const&) const in libeleca.a(Propagation.cpp.o) eleca::ExtractDPPSecondariesEnergy(double) in libeleca.a(EnergyLoss.cpp.o) eleca::Process::SetLimits(eleca::Particle&, eleca::Process::Name) in libeleca.a(Process.cpp.o) HepPID::version() in libHepPID.a(Version.cc.o) "VTT for std::basic_istringstream<char, std::char_traits, std::allocator >", referenced from: HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) "VTT for std::basic_ostringstream<char, std::char_traits, std::allocator >", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) "vtable for std::basic_streambuf<char, std::char_traits >", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::basic_stringbuf<char, std::char_traits, std::allocator >", referenced from: HepPID::particleName(int const&) in libHepPID.a(ParticleName.cc.o) HepPID::particleName(std::string const&) in libHepPID.a(ParticleName.cc.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. 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

TobiasWinchen commented 6 years ago

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.

avvliet commented 6 years ago

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

rafaelab commented 6 years ago

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.

TobiasWinchen commented 6 years ago

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.

avvliet commented 6 years ago

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.

TobiasWinchen commented 6 years ago

The issue was in the new random-seed storage and only occured if OpenMP was not available.