Skip to content

Fixed libraries to link, so ld will not fail on Linux with missing DSO #583

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

Merged
merged 1 commit into from
Jan 10, 2016

Conversation

susnux
Copy link

@susnux susnux commented Jan 9, 2016

At least on openSUSE building of cpp-netlib (tests) fails with:
missing DSO on commandline.

This happens due to missing pthread on target_link_libraries for cpp-netlib-http-server_async_run_stop_concurrency test.

@@ -95,7 +95,7 @@ if (Boost_FOUND)
ws2_32 wsock32)
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency rt)
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency pthread rt)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is partially correct, but I think the more correct change would be to add ${CMAKE_THREAD_LIBS_INIT} to line 87 instead. Can you make that change to see whether that fixes it?

Fixed libraries to link, so ld will not fail on Linux with:
'missing DSO' because of missing libpthread.
@susnux
Copy link
Author

susnux commented Jan 10, 2016

@deanberris You were right, that worked.
Fixed it in this pull request.

@deanberris
Copy link
Member

LGTM

Awesome, thanks @susnux -- I'll wait for the integration tests to finish then merge this in.

Cheers

deanberris added a commit that referenced this pull request Jan 10, 2016
Fixed libraries to link, so ld will not fail on Linux with missing DSO
@deanberris deanberris merged commit c70f268 into cpp-netlib:master Jan 10, 2016
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

Successfully merging this pull request may close these issues.

2 participants