Hi
I have built the core gcc-3.3.3 and gpc-20041218 to see whether they will run on Smoothwall (yes, I know that Smoothwal is a security appliance and you shouldn't run compilers on it, etc., etc. - but I have my own reasons).
Anyway, I built the compilers on Fedora Core 1. The gcc compiler compiles and links simple programs okay. The gpc compiler working on an "hello world" program on the other hand produces this:
"/usr/gnu/lib/gcc-lib/i386-redhat linux/3.3.3/libgpc.a(rts.o) (.text+0x21d1): In function `_p_CGetP wEnt': : Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/gnu/lib/gcc-lib/i386-redhat- linux/3.3.3/libgpc.a(rts.o)(.text+0x215b): In function `_p_CGetP wNam': : Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
and such other complaints about 'getpwuid' and 'setpwent'.
Any simple solution? Thanks.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
I have built the core gcc-3.3.3 and gpc-20041218 to see whether they will run on Smoothwall (yes, I know that Smoothwal is a security appliance and you shouldn't run compilers on it, etc., etc. - but I have my own reasons).
Anyway, I built the compilers on Fedora Core 1. The gcc compiler compiles and links simple programs okay. The gpc compiler working on an "hello world" program on the other hand produces this:
"/usr/gnu/lib/gcc-lib/i386-redhat linux/3.3.3/libgpc.a(rts.o) (.text+0x21d1): In function `_p_CGetP wEnt': : Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/gnu/lib/gcc-lib/i386-redhat- linux/3.3.3/libgpc.a(rts.o)(.text+0x215b): In function `_p_CGetP wNam': : Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
and such other complaints about 'getpwuid' and 'setpwent'.
Any simple solution? Thanks.
I've got the same warnings (at least, in my case these were warnings, here they look like errors) when trying to link statically on Debian.
As far as I can make any sense of it, apparently current versions of glibc don't really support static linking anymore. :-(
Did you give `-static' explicitly?
Frank
On 31 Dec 2004 at 3:44, Frank Heckenbach wrote:
Prof A Olowofoyeku (The African Chief) wrote:
I have built the core gcc-3.3.3 and gpc-20041218 to see whether they will run on Smoothwall (yes, I know that Smoothwal is a security appliance and you shouldn't run compilers on it, etc., etc. - but I have my own reasons).
Anyway, I built the compilers on Fedora Core 1. The gcc compiler compiles and links simple programs okay. The gpc compiler working on an "hello world" program on the other hand produces this:
"/usr/gnu/lib/gcc-lib/i386-redhat linux/3.3.3/libgpc.a(rts.o) (.text+0x21d1): In function `_p_CGetP wEnt': : Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/gnu/lib/gcc-lib/i386-redhat- linux/3.3.3/libgpc.a(rts.o)(.text+0x215b): In function `_p_CGetP wNam': : Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking"
and such other complaints about 'getpwuid' and 'setpwent'.
Any simple solution? Thanks.
I've got the same warnings (at least, in my case these were warnings, here they look like errors) when trying to link statically on Debian.
As far as I can make any sense of it, apparently current versions of glibc don't really support static linking anymore. :-(
Did you give `-static' explicitly?
No, I didn't. It seems that the linker is attempting to link statically because all the necessary .so files are not on Smoothwall (for obvious reasons - the only things that are there are those necessary to run a firewall, web proxy, VPN, etc.). Even gcc appears to link statically because the size of a "hello world" C program is over 300k (even with "- s"). I could always copy the .so files over and see ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
On 31 Dec 2004 at 3:44, Frank Heckenbach wrote:
[...]
I've got the same warnings (at least, in my case these were warnings, here they look like errors) when trying to link statically on Debian.
As far as I can make any sense of it, apparently current versions of glibc don't really support static linking anymore. :-(
I don't think so. GCC seems to work with static linking. Perhaps you might want to investigate that with Debian? I can now build GCC itself on Smoothwall (huge executables, because of the static linking), but GPC won't link a "hello world" program. It seem that this might be a GPC issue.
Happy New Year to all ...
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/
Prof A Olowofoyeku (The African Chief) wrote:
On 31 Dec 2004 at 3:44, Frank Heckenbach wrote:
[...]
I've got the same warnings (at least, in my case these were warnings, here they look like errors) when trying to link statically on Debian.
As far as I can make any sense of it, apparently current versions of glibc don't really support static linking anymore. :-(
I don't think so. GCC seems to work with static linking. Perhaps you might want to investigate that with Debian? I can now build GCC itself on Smoothwall (huge executables, because of the static linking), but GPC won't link a "hello world" program. It seem that this might be a GPC issue.
No, I think it's rather that those C programs just don't happen to use the problematic functions.
Frank
Prof A Olowofoyeku (The African Chief) wrote:
I have built the core gcc-3.3.3 and gpc-20041218 to see whether they will run on Smoothwall (yes, I know that Smoothwal is a security appliance and you shouldn't run compilers on it, etc., etc. - but I have my own reasons).
Anyway, I built the compilers on Fedora Core 1. The gcc compiler compiles and links simple programs okay. The gpc compiler working on an "hello world" program on the other hand produces this:
"/usr/gnu/lib/gcc-lib/i386-redhat linux/3.3.3/libgpc.a(rts.o) (.text+0x21d1): In function `_p_CGetP wEnt': : Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/gnu/lib/gcc-lib/i386-redhat-
[...]
I have solved this problem now. The solution was to copy /usr/lib/libc* from Fedora Core 1 over to the Smoothwall box ..
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/