Open IsaacMvmv opened 2 years ago
xash3d-fwgs as well
[404/404] Linking build/mainui/libmenu.so
/usr/bin/ld: /tmp/ccf3qi5r.ltrans0.ltrans.o: relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/tmp/ccf3qi5r.ltrans0.ltrans.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status```
Oh, how it's even missing -fPIC
:confused:
What's the target you're compiling for?
Ah, I missed that. Debian Jessie, ok.
I can't update debian because its on a TV box, and its internal c library can't chroot into stretch+
just specify it in CFLAGS globally. Other way is force large code model (-mcmodel=large in CFLAGS) to make text relocations work (this will make library loading slower, binaries bigger, but may even improve performance in some cases)
The variable? Like CFLAGS+=-fPIC?
Waf: Entering directory `/root/.tmp/hl/build' [ 64/169] Linking build/cl_dll/client_mipsel.so [167/169] Linking build/dlls/hl_mipsel.so ../cl_dll/cl_util.h:169:15: warning: type of 'vec3_origin' does not match original declaration extern vec3_t vec3_origin; ^ ../cl_dll/cl_util.h:169:15: warning: type of 'vec3_origin' does not match original declaration ../pm_shared/pm_math.c:34:8: note: previously declared here vec3_t vec3_origin = { 0, 0, 0 }; ^ /usr/bin/ld: /tmp/ccyw0UHB.ltrans0.ltrans.o: relocation R_MIPS_HI16 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /tmp/ccyw0UHB.ltrans0.ltrans.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status
How can I add -fPIC?