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

CentOS linker issue #395

Closed
dselivanov opened this issue Dec 24, 2015 · 19 comments
Closed

CentOS linker issue #395

dselivanov opened this issue Dec 24, 2015 · 19 comments

Comments

@dselivanov
Copy link
Contributor

On CentOS 7 I got following:

[ 99%] Building CXX object src/bigartm/CMakeFiles/bigartm.dir//artm/cpp_interface.cc.o
[100%] Building CXX object src/bigartm/CMakeFiles/bigartm.dir/
/artm/messages.pb.cc.o
Linking CXX executable bigartm
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: cannot find -lboost_program_options-mt
/usr/bin/ld: cannot find -lboost_date_time-mt
/usr/bin/ld: cannot find -lboost_filesystem-mt
/usr/bin/ld: cannot find -lboost_iostreams-mt
/usr/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_chrono-mt
/usr/bin/ld: cannot find -lboost_timer-mt
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[2]: *** [src/bigartm/bigartm] Error 1
make[1]: *** [src/bigartm/CMakeFiles/bigartm.dir/all] Error 2
make: *** [all] Error 2

Actually I have all this files, but they start with lib instead of l.
I'm not make/cmake expert, so can't figure out how to fix this.

@dselivanov
Copy link
Contributor Author

I can manually create symlink, but probably this will be ugly solution.

@sashafrey
Copy link
Contributor

@dselivanov bigartm executable by default builds with static linkage - it might be the reason... Could you try disable this as follows?

cmake -DBUILD_STATIC_BIGARTM=OFF ..

(and then build bigartm as usual)

@dselivanov
Copy link
Contributor Author

this helps! thank you. Closing now?

@sashafrey
Copy link
Contributor

before closing let's discuss whether we should set static linkage to OFF by default.
@romovpa @JeanPaulShapo What do you think? By now we know that static linkage fails on Mac OS X and Cent OS. To me it sounds like an extra option that users should manually switch ON if they care...
@JeanPaulShapo Recently you implemented make install for Linux. Would it still install enough dependencies if we switch static linkage to OFF by default?

@dselivanov
Copy link
Contributor Author

Before installing on centos server, I installed bigartm on my Macbook. It
works out of the box without any problems ( with static linkage).
24 дек. 2015 г. 7:44 PM пользователь "sashafrey" notifications@github.com
написал:

before closing let's discuss whether we should set static linkage to OFF
by default.
@romovpa https://github.com/romovpa @JeanPaulShapo
https://github.com/JeanPaulShapo What do you think? By now we know that
static linkage has issues on Mac OS X and Cent OS. To me it sounds like an
extra option that users should manually switch ON if they care...
@JeanPaulShapo https://github.com/JeanPaulShapo Recently you
implemented make install for Linux. Would it still install enough
dependencies if we switch static linkage to OFF by default?


Reply to this email directly or view it on GitHub
#395 (comment).

@sashafrey
Copy link
Contributor

Hm.. I'm fairly sure someone reported a similar issue on latest Mac OS X (presumably 10.11.1). Nice to know it worked for you!

@dselivanov
Copy link
Contributor Author

I'm on 10.10 :-) there always issues on new systems :-)
24 дек. 2015 г. 8:06 PM пользователь "sashafrey" notifications@github.com
написал:

Hm.. I'm fairly sure someone reported a similar issue on latest Mac OS X
(presumably 10.11.1). Nice to know it worked for you!


Reply to this email directly or view it on GitHub
#395 (comment).

@JeanPaulShapo
Copy link
Contributor

@dselivanov Could you write here all boost-* packages installed on your CentOS 7?

@JeanPaulShapo
Copy link
Contributor

@sashafrey As I can see from running cmake -DBUILD_STATIC_BIGARTM=OFF ./ && make && make install, it's ok to switch static linkage to OFF by default. But let's make decisions after receiving response from @dselivanov.

@dselivanov
Copy link
Contributor Author

@JeanPaulShapo see here.

@JeanPaulShapo
Copy link
Contributor

@dselivanov Thanks, although I expected to see filtered output from your package manager :) Nevertheless, it's likely that you don't have package boost-static installed on your CentOS 7 machine. It contains static analogues for boost dynamic libraries. And the word static in the name of the package implies ability for static linkage.
Could you have patience and necessary permisions to install boost-static package and run rm -rf CMakeCahe.txt && cmake ../ && make to check whether you have the error or not?

@dselivanov
Copy link
Contributor Author

Linking CXX executable bigartm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lm
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[2]: *** [src/bigartm/bigartm] Error 1
make[1]: *** [src/bigartm/CMakeFiles/bigartm.dir/all] Error 2
make: *** [all] Error 2

@JeanPaulShapo
Copy link
Contributor

@dselivanov Try to install glibc-static and libstdc++-static. Hope it works. If not, it's rather serious problem.

@dselivanov
Copy link
Contributor Author

@JeanPaulShapo thx, now it works fine with static linker. I suppose we need to add this steps to manual.

@JeanPaulShapo
Copy link
Contributor

@dselivanov Of course, we do need.
But how do you know that you need boost?
After brief search I did't find any information about requirements (e.g. boost packages) neither in README nor on http://docs.bigartm.org. Am I missing sometihing?

@dselivanov
Copy link
Contributor Author

cmake suggest to install it :-)

2015-12-25 14:47 GMT+03:00 Nikita Shapovalov notifications@github.com:

@dselivanov https://github.com/dselivanov Of course, we do need.
But how do you know that you need boost?
After brief search I did't find any information about requirements (e.g.
boost packages) neither in README nor in documentation
http://docs.bigartm.org. Am I missing sometihing?


Reply to this email directly or view it on GitHub
#395 (comment).

Regards
Dmitriy Selivanov

@sashafrey
Copy link
Contributor

@JeanPaulShapo Could you fix this in the documentation and then close this ticket?

@JeanPaulShapo JeanPaulShapo self-assigned this Feb 9, 2016
@JeanPaulShapo
Copy link
Contributor

@dselivanov I think now instructions looks OK. Check them and tell us, whether to close this issue or not? :-)

@dselivanov
Copy link
Contributor Author

looks ok for me! sorry for the long response.

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

No branches or pull requests

3 participants