nixcloud / ip2unix

Turn IP sockets into Unix domain sockets
GNU Lesser General Public License v3.0
361 stars 10 forks source link

Link Failed #3

Closed z2665 closed 6 years ago

z2665 commented 6 years ago

In system centos 7 x64 The last step Link failed with relocation the ldflag -fPIC in meson.build may not work

[18/18] Linking target ip2unix.
FAILED: ip2unix 
c++  -o ip2unix 'ip2unix@exe/meson-generated_.._src_dynports.cc.o' 'ip2unix@exe/meson-generated_.._src_errno_list.cc.o' 'ip2unix@exe/src_ip2unix.cc.o' 'ip2unix@exe/src_blackhole.cc.o' 'ip2unix@exe/src_preload.cc.o' 'ip2unix@exe/src_realcalls.cc.o' 'ip2unix@exe/src_rules_match.cc.o' 'ip2unix@exe/src_rules_parse.cc.o' 'ip2unix@exe/src_socket.cc.o' 'ip2unix@exe/src_sockaddr.cc.o' 'ip2unix@exe/src_sockopts.cc.o' -Wl,--no-undefined -Wl,--as-needed -fPIC -pie -Wl,-E -Wl,--version-script,/data/pro/ip2unix/build/symbols.map -Wl,--start-group /home/z2665/vcpkg/packages/yaml-cpp_x64-linux/lib/libyaml-cpp.a -ldl /usr/lib64/libsystemd.so -Wl,--end-group  
/usr/bin/ld: ip2unix@exe/meson-generated_.._src_dynports.cc.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/meson-generated_.._src_errno_list.cc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_ip2unix.cc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_blackhole.cc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_preload.cc.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_rules_match.cc.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_rules_parse.cc.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_socket.cc.o: relocation R_X86_64_32 against symbol `_ZN6Socket8registryE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_sockaddr.cc.o: relocation R_X86_64_32 against symbol `__gxx_personality_v0@@CXXABI_1.3' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: ip2unix@exe/src_sockopts.cc.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
aszlig commented 6 years ago

This should be fixed with 29c0e8ffd3667e694de407124069897feb930a4f.