Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

can compile,. but can't link! #64

Open
wangdongxuking61 opened this issue Jul 3, 2018 · 0 comments
Open

can compile,. but can't link! #64

wangdongxuking61 opened this issue Jul 3, 2018 · 0 comments

Comments

@wangdongxuking61
Copy link

Scanning dependencies of target thpp
[ 5%] Building CXX object CMakeFiles/thpp.dir/Storage.cpp.o
[ 10%] Building CXX object CMakeFiles/thpp.dir/StorageSerialization.cpp.o
[ 15%] Building CXX object CMakeFiles/thpp.dir/detail/StorageDefs.cpp.o
[ 20%] Building CXX object CMakeFiles/thpp.dir/TensorSerialization.cpp.o
[ 25%] Building CXX object CMakeFiles/thpp.dir/detail/TensorDefs.cpp.o
[ 30%] Building CXX object CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_data.cpp.o
[ 35%] Building CXX object CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_types.cpp.o
[ 40%] Building CXX object CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_constants.cpp.o
[ 45%] Linking CXX shared library libthpp.so
/usr/bin/ld: /usr/local/lib/libfolly.a(Conv.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libfolly.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/thpp.dir/build.make:304: recipe for target 'libthpp.so' failed
make[2]: *** [libthpp.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/thpp.dir/all' failed
make[1]: *** [CMakeFiles/thpp.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

i recompile folly by adding
set(CMAKE_CXX_FLAGS "-fPIC")

but no use.
i think the project is not maintained by facebook....f**c...

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