Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

compilation error occured at "make -j 2" #8

Open
trustyred opened this issue Mar 10, 2020 · 0 comments
Open

compilation error occured at "make -j 2" #8

trustyred opened this issue Mar 10, 2020 · 0 comments

Comments

@trustyred
Copy link

I'm new to wavefront, but fail at first steps unfortunately.
env:

ubuntu 16.04
cmake 3.12.4

I compiling the sdk according to README, but encountered a error about cpr.
error:

bash# make -j 2
Scanning dependencies of target cpr
[ 9%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/cookies.cpp.o
[ 9%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/auth.cpp.o
[ 13%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/cprtypes.cpp.o
[ 18%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/digest.cpp.o
[ 22%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/error.cpp.o
[ 27%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/multipart.cpp.o
[ 31%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/parameters.cpp.o
[ 36%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/payload.cpp.o
[ 40%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/proxies.cpp.o
[ 45%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/session.cpp.o
[ 50%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/ssl_options.cpp.o
[ 54%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/timeout.cpp.o
[ 59%] Building CXX object CMakeFiles/cpr.dir/third_party/cpr/cpr/util.cpp.o
[ 59%] Built target cpr
Scanning dependencies of target wavefront-sdk
[ 63%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/common/SocketException.cpp.o
[ 68%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/common/Socket.cpp.o
[ 72%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/proxy/ProxyConnectionHandler.cpp.o
[ 77%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/proxy/WavefrontProxyClient.cpp.o
[ 81%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/direct_ingestion/DirectIngesterService.cpp.o
[ 86%] Building CXX object src/CMakeFiles/wavefront-sdk.dir/direct_ingestion/WavefrontDirectIngestionClient.cpp.o
[ 90%] Linking CXX shared library libwavefront-sdk.so
/usr/bin/ld: ../CMakeFiles/cpr.dir/third_party/cpr/cpr/cookies.cpp.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
../CMakeFiles/cpr.dir/third_party/cpr/cpr/cookies.cpp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/CMakeFiles/wavefront-sdk.dir/build.make:187: recipe for target 'src/libwavefront-sdk.so.1.0.0' failed
make[2]: *** [src/libwavefront-sdk.so.1.0.0] Error 1
CMakeFiles/Makefile2:129: recipe for target 'src/CMakeFiles/wavefront-sdk.dir/all' failed
make[1]: *** [src/CMakeFiles/wavefront-sdk.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

From the error, it seems that we should change cpr from static to shared, right?
Could you please help to address this issue?
Thank you first of all!

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

No branches or pull requests

1 participant