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

Find pthread in CMakeLists.txt #1714

merged 2 commits into from Feb 16, 2019


3 participants
Copy link

commented Feb 8, 2019

When using gcc 8.2 with Eclipse generated Makefiles on Linux I get unresolved pthread symbols. It appears to only be a gcc error where -lpthread is explicitly required. The recommendation is to use find_package (Threads):

Tested on Mac/clang, Fedora/gcc, and appveyor (Windows) seems to build it ok as well.

@wezrule wezrule added the build-error label Feb 8, 2019

@wezrule wezrule self-assigned this Feb 8, 2019

@wezrule wezrule requested a review from argakiig Feb 8, 2019

Copy link

left a comment

beat me to it man, I just discovered this but had not gotten to the fix yet

@argakiig argakiig added this to the V18.0 milestone Feb 8, 2019


This comment has been minimized.

Copy link

commented Feb 9, 2019

I think we might actually need those two lines just uncommented for cross-platform builds.


This comment has been minimized.

Copy link
Collaborator Author

commented Feb 9, 2019

I'm not sure as we only call ${PLATFORM_LIBS} in nano_node so the target_link_libraries would need changing elsewhere. boost::thread has a dependency on the import target Thread::Thread which is called in the target_link_libraries of the node library's CMakeList.txt file, so I think that should resolve it for us (could be wrong)

@zhyatt zhyatt added this to During RC in V18 Feb 11, 2019

@wezrule wezrule merged commit a055ad7 into nanocurrency:master Feb 16, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@wezrule wezrule deleted the wezrule:gcc_pthread_issue branch Feb 16, 2019

argakiig added a commit that referenced this pull request Feb 18, 2019

Find pthread in CMakeLists.txt (#1714)
* Add threads package

* Don't make it required as per the website source

@zhyatt zhyatt moved this from RC2 to RC3 in V18 Feb 18, 2019

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.