Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gtest(?) Linking issue #32

Closed
matt-chan opened this issue Nov 15, 2017 · 4 comments
Closed

Gtest(?) Linking issue #32

matt-chan opened this issue Nov 15, 2017 · 4 comments
Assignees

Comments

@matt-chan
Copy link
Member

Another linking problem. At least it's on linux this time...

I don't know what's going on here. I think there's undefined symbols in some of these programs (although the error suggests there's some libraries compiled with debug symbols, there aren't. I checked with readelf).

The error is at ln 1621-1649. https://travis-ci.org/theochem/qcgrids/jobs/302337015

I'm not sure if we're getting this issue because we're using gtest in conda as opposed to gtest from the github repo. Cellcutoff works fine (and it uses gtest from github). Another possibility is that the gtest package in conda is borked, but that's somewhat unlikely. I did take a look at the meta.yml from the package though, and it's always using gcc/g++, and the versions aren't specified. There's a possibility that we're running into issues because anaconda gtest is linked with an old version of libstdc++. Anaconda was supposed to update their builds, but I guess not all of them switched over (Python did already, which was why we had to do all these rebuilds in the first place).

@matt-chan
Copy link
Member Author

matt-chan commented Nov 16, 2017

Well, I checked that hypothesis I think. The build scripts are identical now but it still doesn't work. Can't figure out what's going on.

The error is in linking at ln2026. It's an unresolved memcpy, which makes no sense to me. https://travis-ci.org/theochem/qcgrids/jobs/302864551. Moreover, conda-build works locally on my machine so I can't figure out what's going on. The build flags are different though somehow. Travis doesn't link against /lib?

This is the offending line (with some stuff cleaned up).
Mine:

/bin/x86_64-conda_cos6-linux-gnu-c++  -std=c++11 -Wall -Wconversion -Wextra -O3 -DNDEBUG  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/lib -L/lib -rdynamic CMakeFiles/test_qcgrids.dir/test_supergrid.cpp.o CMakeFiles/test_qcgrids.dir/common.cpp.o  -o test_qcgrids -Wl,-rpath,/work/build/qcgrids: ../libqcgrids.so -lcellcutoff ../../googletest-build/googlemock/gtest/libgtest.a ../../googletest-build/googlemock/gtest/libgtest_main.a -lgcov -lpthread ../../googletest-build/googlemock/gtest/libgtest.a -lpthread

Travis:

/bin/x86_64-conda_cos6-linux-gnu-c++  -std=c++11 -Wall -Wconversion -Wextra -O3 -DNDEBUG  -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -rdynamic CMakeFiles/test_qcgrids.dir/test_supergrid.cpp.o CMakeFiles/test_qcgrids.dir/common.cpp.o  -o test_qcgrids -Wl,-rpath,/home/travis/miniconda/conda-bld/qcgrids_1510808838359/work/build/qcgrids:/lib: ../libqcgrids.so /lib/libcellcutoff.so ../../googletest-build/googlemock/gtest/libgtest.a ../../googletest-build/googlemock/gtest/libgtest_main.a -lgcov -lpthread ../../googletest-build/googlemock/gtest/libgtest.a -lpthread 

@tovrstra
Copy link
Member

I'll look into this soon. A few other urgent things need to be taken care of... Sorry.

@matt-chan
Copy link
Member Author

matt-chan commented Nov 19, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants