I added the two flags:
make USE_LOCAL_HEADERS=0 CFLAGS='-fopenmp -Wall -D_GNU_SOURCE=1 -D_REENTRANT
-fno-PIC -static' USE_VOIP=0 BUILD_CLIENT=0 BUILD_MISSIONPACK=0
Errors:
/usr/lib/libc.a(dl-tsd.o): TLS local exec code cannot be linked into shared
objects
/usr/lib/libc.a: could not read symbols: Success
collect2: ld returned 1 exit status
---
https://bugs.gentoo.org/show_bug.cgi?id=122665
I guess this is the deadline for static building, no?
Warnings:
build/release-linux-sh4a/ded/sys_main.o: In function `Sys_TryLibraryLoad':
sys_main.c:(.text+0x160): warning: Using 'dlopen' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
build/release-linux-sh4a/ded/sys_unix.o: In function `Sys_GetCurrentUser':
sys_unix.c:(.text+0x988): warning: Using 'getpwuid' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
build/release-linux-sh4a/ded/net_ip.o: In function `Sys_StringToSockaddr':
net_ip.c:(.text+0xb70): warning: Using 'getaddrinfo' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
build/release-linux-sh4a/ded/net_ip.o: In function `NET_OpenSocks':
net_ip.c:(.text+0x1628): warning: Using 'gethostbyname' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
---
>________________________________
> From: Patrick Baggett <baggett.patr...@gmail.com>
>To: Yasir I. Al-Dosary - zgzg2020™ <yasiraldos...@yahoo.com>
>Cc: ioquake3 <ioquake3@lists.ioquake.org>
>Sent: Tuesday, December 4, 2012 7:49 AM
>Subject: Re: [ioquake3] How do I build ioquake3 with static libraries?
>
>
>figgles@sunnyd:~$ cat test.c
>int main() { return 0; }
>figgles@sunnyd:~$ gcc -static test.c -o test
>figgles@sunnyd:~$ ./test
>figgles@sunnyd:~$
>
>
>My empty program in 644KB static, 4.7KB dynamically linked. If you're getting
>that error below, it means you're mixing PIC and non PIC objects. I'd check to
>make sure everything is compiled with -fno-PIC / -static
>
>
>Patrick
>
>
>
>On Mon, Dec 3, 2012 at 4:36 PM, Yasir I. Al-Dosary - zgzg2020™
><yasiraldos...@yahoo.com> wrote:
>
>Thanx for the reply.
>>I tried in GCC the -static flag, but I got the:
>>
>>relocation R_X86_64_32 can not be used when making a shared object; recompile
>>with -fPIC
>>error. That's why I added the -fPIC flag.
>>What's missing here?
>>
>>
>>
>>
>>>________________________________
>>> From: Patrick Baggett <baggett.patr...@gmail.com>
>>>To: Yasir I. Al-Dosary - zgzg2020™ <yasiraldos...@yahoo.com>; Primary
>>>ioquake3 Discussion/Development list <ioquake3@lists.ioquake.org>
>>>Sent: Monday, December 3, 2012 11:21 PM
>>>
>>>Subject: Re: [ioquake3] How do I build ioquake3 with static libraries?
>>>
>>>
>>>-fPIC is for position independent code, which should not be necessary when
>>>building an executable program (or at least, not explicitly). Also, for GCC,
>>>I used "gcc -static"
>>>
>>>
>>>Patrick
>>>
>>>
>>>On Mon, Dec 3, 2012 at 4:55 AM, Yasir I. Al-Dosary - zgzg2020™
>>><yasiraldos...@yahoo.com> wrote:
>>>
>>>Hi
>>>>
>>>>I would like to cross-compile ioquake3 with static libraries. I tried
>>>>-static and -fPIC, but got an error:
>>>>relocation R_X86_64_32 can not be used when making a shared object;
>>>>recompile with -fPIC
>>>>Then, I also tried -Bstatic, and NOSHARED=0, which didn't do anything.
>>>>What are the correct flags?
>>>>Mine:
>>>>make USE_LOCAL_HEADERS=0 CFLAGS='-fopenmp -Wall -D_GNU_SOURCE=1
>>>>-D_REENTRANT' USE_VOIP=0 BUILD_CLIENT=0 BUILD_MISSIONPACK=0 BUILD_GAME_QVM=0
>>>>
>>>>The story:
>>>>
>>>>After doing the cross-compiling, the library versions were different
>>>>between the cross-compiling machine, and the executing machine.
>>>>I don't have authority to up/downgrade any of the libraries. Furthermore, I
>>>>tried to build the glibc library, which took FOREVER. But, kept failing
>>>>because the GCC was too old.
>>>>Anyway to make a long story short, someone suggested that I should try to
>>>>statically cross-compile ioquake3, so that it would run regardless of the
>>>>version discrepancies.
>>>>Version error:
>>>>./ioq3ded.sh4a: /lib/libc.so.6: version `GLIBC_2.11' not found (required by
>>>>./ioq3ded.sh4a)
>>>>_______________________________________________
>>>>ioquake3 mailing list
>>>>ioquake3@lists.ioquake.org
>>>>http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
>>>>By sending this message I agree to love ioquake3 and libsdl.
>>>>
>>>
>>>
>>>
>
>
>
_______________________________________________
ioquake3 mailing list
ioquake3@lists.ioquake.org
http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org
By sending this message I agree to love ioquake3 and libsdl.