Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesnt link hl.so on debian jessie #320

Open
IsaacMvmv opened this issue Aug 26, 2022 · 8 comments
Open

Doesnt link hl.so on debian jessie #320

IsaacMvmv opened this issue Aug 26, 2022 · 8 comments

Comments

@IsaacMvmv
Copy link

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?

@IsaacMvmv
Copy link
Author

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```

@a1batross
Copy link
Member

Oh, how it's even missing -fPIC

@IsaacMvmv
Copy link
Author

😕

@a1batross
Copy link
Member

What's the target you're compiling for?

@a1batross
Copy link
Member

Ah, I missed that. Debian Jessie, ok.

@IsaacMvmv
Copy link
Author

I can't update debian because its on a TV box, and its internal c library can't chroot into stretch+

@mittorn
Copy link
Member

mittorn commented Aug 27, 2022

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)

@IsaacMvmv
Copy link
Author

The variable? Like CFLAGS+=-fPIC?

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

No branches or pull requests

3 participants