-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Linking problem with redisserversample #244
Comments
I was able to solve the problem by adding -pthread at the end of the command line in redisserversample.dir/link.txt. I ran into a similar problem again and fixed it for filedescriptorserversample.dir/link.txt the same way. But these files are built by cmake. Shouldn't the generated files already include the -pthread option? The next error I am encountering is: Any suggestions? |
I was able to close all my issues. It appears the latest code has not been built tested on Linux:
After solving all these issues the whole code builds. I'll be happy to submit the change to test_integration.cpp. I don't know enough of CMake to know where to change the generating files that build the link.txt files that are missing the pthread flag. In any case, I'll now go and play with the code. Thanks, |
Could you prepare a PullRequest for that? |
I was able to figure out the problem with CMake. The following line was missing in CMakeDependencies.cmake: find_package(Threads REQUIRED) Now, the whole package builds in RedHat REL 7 (which is what I'm using). Thanks, |
There are no code changes made. Three files were changed: CMakeDependencies.cmake was missing the command find_package(Threads REQUIRED) The test file test_integration.cpp was missing an include file: <unistd.h> The third file that I modified, CMakeLists.txt, should be restored to its original form. I changed it so I could build withou HTTP, which I don't need. The code was built and tested on RedHat REL 7 (with HTTP disabled in CMake).
* Fixes to issue #244: libjson-rpc-cpp does not build on Linux. There are no code changes made. Three files were changed: CMakeDependencies.cmake was missing the command find_package(Threads REQUIRED) The test file test_integration.cpp was missing an include file: <unistd.h> The third file that I modified, CMakeLists.txt, should be restored to its original form. I changed it so I could build withou HTTP, which I don't need. The code was built and tested on RedHat REL 7 (with HTTP disabled in CMake). * Re-enable HTTP libs
Thanks! |
I would like to try out libjson-rpc-cpp. I am using Red Hat 7, so I pulled the project from github and I am following the instructions to build it. Everything compiles, but I am running into the following link error:
[ 66%] Linking CXX executable ../../bin/redisserversample
../../lib/libjsonrpccpp-server.so.1.0.0: undefined reference to
pthread_create' ../../lib/libjsonrpccpp-server.so.1.0.0: undefined reference to
pthread_join'collect2: error: ld returned 1 exit status
make[2]: *** [bin/redisserversample] Error 1
make[1]: *** [src/examples/CMakeFiles/redisserversample.dir/all] Error 2
make: *** [all] Error 2
Do you have any suggestions as to how to proceed?
Thanks,
Marcos
The text was updated successfully, but these errors were encountered: