[SunHELP] Unable to ' -static' compile programs with gcc
fabio
fabio at crearium.com
Wed Oct 26 19:58:47 CDT 2005
Sandwich Maker wrote:
>" From: fabio <fabio at crearium.com>
>"
>" Sandwich Maker wrote:
>"
>" >" From: fabio <fabio at crearium.com>
>" >"
>" >" hello,
>" >"
>" >" -bash-3.00$ cat 1.c;\gcc -static -ggdb 1.c -o 1
>" >" main(){
>" >" printf("hello world\n");
>" >" }
>" >" ld: fatal: library -lc: not found
>" >" ld: fatal: library -lc: not found
>" >" ld: fatal: File processing errors. No output written to 1
>" >" collect2: ld returned 1 exit status
>" >"
>" >" -bash-3.00$ find / -name "libc.so.1" -print 2>/dev/null
>" >" /usr/lib/sparcv9/libc.so.1
>" >" /usr/lib/libc.so.1
>" >" /usr/lib/libp/libc.so.1
>" >" /usr/lib/libp/sparcv9/libc.so.1
>" >" /lib/sparcv9/libc.so.1
>" >" /lib/libc.so.1
>" >
>" >these are dynamic; static would be libc.a
>" >
>" >" -bash-3.00$ uname -srm
>" >" SunOS 5.10 sun4u
>" >"
>" >" The option -g works fine but I need the option ggdb. Option -static
>" >" doesnt work either. But It compiles ok if no option is given.
>" >
>" >sun's position on late-model solarii is that static binaries and
>" >static linking are passe'. unless gcc comes with its own libc you're
>" >out of luck. i don't think sun's forte compiler comes with static
>" >libs either.
>" >
>" >
>" I dont understand, we cant build static binaries in Solaris sparc ?
>
>not any more.
>
>" Any workaround?
>
>build in an earlier solaris environmant that still supports static. i
>posted that in my first reply.
>
>
Would you or anyone in the list to explain what are the steps to
statically build a C program on Solaris 10? If it is only possible
building a 'ealier solaris environment', what is exactly that and how to
do it?
fabio.
More information about the SunHELP
mailing list