You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xmake f -p cross -a aarch64 -c --cross=aarch64-linux-gnu- -m release
很多依赖都出现了下面的错误
[ 89%]: linking.release libplugin_socks5.so
/usr/bin/aarch64-linux-gnu-g -o build/cross/aarch64/release/libplugin_socks5.so build/.objs/plugin_socks5/cross/aarch64/release/src/plugin/socks5/dllmain.cpp.o -shared -fPIC -L/home/cat/.xmake/packages/c/cpp-ipc/1.3.0/a5f38dad456340db88e770c8da0c2ff1/lib -L/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib -L/home/cat/.xmake/packages/s/spdlog/v1.15.0/cbfcb8dbd3714ff789c197958e006950/lib -L/home/cat/.xmake/packages/f/fmt/11.0.2/796d602e931f45448ce7549a2659bf55/lib -s -lipc -ljsoncpp -lspdlog -lfmt
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json9ExceptionE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): in function `Json::Exception::~Exception()':
json_value.cpp:(.text 0x18): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json9ExceptionE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): in function `Json::Exception::~Exception()':
json_value.cpp:(.text 0x58): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZN4Json5ValueD1Ev' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): in function `Json::Value::nullSingleton()':
json_value.cpp:(.text 0x848): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json9ExceptionE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_value.cpp.o): in function `Json::Exception::Exception(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json10FastWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::FastWriter::~FastWriter()':
json_writer.cpp:(.text._ZN4Json10FastWriterD2Ev[_ZN4Json10FastWriterD5Ev] 0xc): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json10FastWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::FastWriter::~FastWriter()':
json_writer.cpp:(.text._ZN4Json10FastWriterD0Ev[_ZN4Json10FastWriterD5Ev] 0x8): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json12StyledWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::StyledWriter::~StyledWriter()':
json_writer.cpp:(.text._ZN4Json12StyledWriterD2Ev[_ZN4Json12StyledWriterD5Ev] 0x8): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json12StyledWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::StyledWriter::~StyledWriter()':
json_writer.cpp:(.text._ZN4Json12StyledWriterD0Ev[_ZN4Json12StyledWriterD5Ev] 0x8): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json23BuiltStyledStreamWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::BuiltStyledStreamWriter::~BuiltStyledStreamWriter()':
json_writer.cpp:(.text._ZN4Json23BuiltStyledStreamWriterD2Ev[_ZN4Json23BuiltStyledStreamWriterD5Ev] 0x8): dangerous relocation: unsupported relocation
/usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: /home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZTVN4Json23BuiltStyledStreamWriterE' which may bind externally can not be used when making a shared object; recompile with -fPIC
/home/cat/.xmake/packages/j/jsoncpp/1.9.6/a35f4306b8d04c22ba0951436f5774dc/lib/libjsoncpp.a(json_writer.cpp.o): in function `Json::BuiltStyledStreamWriter::~BuiltStyledStreamWriter()':
json_writer.cpp:(.text._ZN4Json23BuiltStyledStreamWriterD0Ev[_ZN4Json23BuiltStyledStreamWriterD5Ev] 0x8): dangerous relocation: unsupported relocation
Xmake 版本
v2.9.5 dev.6c2929b
操作系统版本和架构
ubuntu 24
描述问题
ubuntu 24上交叉编译时
很多依赖都出现了下面的错误
但是pic应该是默认启用了才对
期待的结果
交叉编译时,依赖默认没有启用pic
工程配置
附加信息和错误日志
1
The text was updated successfully, but these errors were encountered: