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

pkg-config produces invalid output: -l-pthread #3719

Closed
yurivict opened this issue Feb 24, 2019 · 5 comments

Comments

Projects
None yet
3 participants
@yurivict
Copy link

commented Feb 24, 2019

$ pkg-config --cflags --libs hpx_application
-std=c++17 -I/usr/local/include -I/usr/local/include/hpx/external -DHPX_APPLICATION_EXPORTS -DHPX_ENABLE_ASSERT_HANDLER -std=c++17 -L/usr/local/lib /usr/local/lib/libhpx_init.a /usr/local/lib/libhpx.so -lrt /usr/local/lib/libboost_context.so /usr/local/lib/libboost_thread.so -l-pthread /usr/local/lib/libboost_chrono.so /usr/local/lib/libboost_atomic.so /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_date_time.so /usr/lib/libpthread.so /usr/local/lib/libboost_context.so /usr/local/lib/libboost_thread.so -l-pthread /usr/local/lib/libboost_chrono.so /usr/local/lib/libboost_atomic.so /usr/local/lib/libboost_filesystem.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_regex.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_date_time.so /usr/local/lib/libhwloc.so 

OS: FreeBSD

@hkaiser hkaiser added this to the 1.3.0 milestone Feb 24, 2019

@msimberg

This comment has been minimized.

Copy link
Contributor

commented Apr 1, 2019

@yurivict pkg-config is working correctly for me on linux, but that's not FreeBSD, so this could be CMake treating flags differently on different platforms. Could you try changing -pthread on this line: https://github.com/STEllAR-GROUP/hpx/blob/master/cmake/HPX_SetupBoost.cmake#L80 to either pthread or -lpthread and see what happens? Considering you have /usr/lib/libpthread.so in there as well, I'm guessing this line is working: https://github.com/STEllAR-GROUP/hpx/blob/master/CMakeLists.txt#L1254.

@msimberg

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

@yurivict would you mind posting your compiler, cmake, and boost versions here as well?

@yurivict

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

clang-6.0.1
cmake-3.14.1
boost-1.70

@msimberg

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

Thanks @yurivict. Oddly enough we're getting now -l-lpthread on some configurations on rostam as well (http://rostam.cct.lsu.edu/builders/hpx_gcc_6_boost_1_64_centos_x86_64_debug/builds/287/steps/build_unit_tests/logs/stdio) after #3629. This needs to be sorted out before the release.

@msimberg

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2019

@yurivict I think I've fixed your problem with #3823. Would be able to confirm that it does so for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.