eggplantbren / DNest3

Diffusive Nested Sampling
GNU General Public License v3.0
20 stars 6 forks source link

Compiling DNest3 on MacBook pro 10.9.1 #9

Open suvenduat opened 10 years ago

suvenduat commented 10 years ago

Hello,

I am very interested to try DNest3. I installed it in my Macbook pro OSX 10.9. It has successfully installed but I can not compile it. After typing "make" in home directory, I got the following errors: ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: *\ [shared] Error 1

Could you please tell me what should I do to compile it? Thank you very much.

eggplantbren commented 10 years ago

Hello. Is this the only output of 'make'? I'm wondering which library cannot be found. Do you have all the dependencies installed?

suvenduat commented 10 years ago

Thanks. No, I just wrote the error that I got. I tried in two different MacBook Pro but both have osx 10.9.1 Here is the detail of the make:


g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/CommandLineOptions.o -c src/CommandLineOptions.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/Level.o -c src/Level.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/LikelihoodType.o -c src/LikelihoodType.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/Model.o -c src/Model.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/Options.o -c src/Options.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/RandomNumberGenerator.o -c src/RandomNumberGenerator.cpp

g++ -fPIC -O2 -Wall -Wextra -ansi -pedantic -DNDEBUG -Wno-unused-parameter -Iinclude -o src/Utils.o -c src/Utils.cpp

mkdir -p lib

g++ -shared -o lib/libdnest3.so src/CommandLineOptions.o src/Level.o src/LikelihoodType.o src/Model.o src/Options.o src/RandomNumberGenerator.o src/Utils.o

Undefined symbols for architecture x86_64:

"boost::detail::get_tss_data(void const*)", referenced from:

  DNest3::RandomNumberGenerator::initialise_instance()      in

RandomNumberGenerator.o

  DNest3::randomU()     in RandomNumberGenerator.o

  DNest3::randn()     in RandomNumberGenerator.o

  DNest3::randInt(int)  in RandomNumberGenerator.o

"boost::detail::set_tssdata(void const, boost::shared_ptrboost::detail::tss_cleanupfunction, void, bool)", referenced from:

  DNest3::RandomNumberGenerator::initialise_instance()      in

RandomNumberGenerator.o

boost::thread_specific_ptrDNest3::RandomNumberGenerator::~thread_specific_ptr() in RandomNumberGenerator.o

"_gsl_ran_gaussian", referenced from:

  DNest3::RandomNumberGenerator::randn() const in

RandomNumberGenerator.o

  DNest3::randn()     in RandomNumberGenerator.o

"_gsl_rng_alloc", referenced from:

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

"_gsl_rng_free", referenced from:

  DNest3::RandomNumberGenerator::~RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::~RandomNumberGenerator() in

RandomNumberGenerator.o

boost::thread_specific_ptrDNest3::RandomNumberGenerator::delete_data::operator()(void*) in RandomNumberGenerator.o

"_gsl_rng_mt19937", referenced from:

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

"_gsl_rng_set", referenced from:

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator() in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::set_seed(int)  in

RandomNumberGenerator.o

"_gsl_rng_taus", referenced from:

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::RandomNumberGenerator(unsigned long)

in RandomNumberGenerator.o

"_gsl_rng_uniform_pos", referenced from:

  DNest3::RandomNumberGenerator::randomU() const in

RandomNumberGenerator.o

  DNest3::RandomNumberGenerator::randInt(int) const in

RandomNumberGenerator.o

  DNest3::randomU()     in RandomNumberGenerator.o

ld: symbol(s) not found for architecture x86_64

collect2: error: ld returned 1 exit status

make: *\ [shared] Error 1


On Sun, Feb 23, 2014 at 5:46 AM, Brendon J. Brewer <notifications@github.com

wrote:

Hello. Is this the only output of 'make'? I'm wondering which library cannot be found. Do you have all the dependencies installed?

Reply to this email directly or view it on GitHubhttps://github.com/eggplantbren/DNest3/issues/9#issuecomment-35819671 .

eggplantbren commented 10 years ago

Do you have boost_system, boost_thread, and gsl installed?

suvenduat commented 10 years ago

Yes. If you see the output, it is written boost, gsl...

On Sun, Feb 23, 2014 at 5:58 AM, Brendon J. Brewer <notifications@github.com

wrote:

Do you have boost_system, boost_thread, and gsl installed?

Reply to this email directly or view it on GitHubhttps://github.com/eggplantbren/DNest3/issues/9#issuecomment-35819892 .

eggplantbren commented 10 years ago

It looks like it is finding the libraries but not some of the functions in them. I don't know why, sorry. What versions of the libraries do you have?