Re: [AD] static link

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, 2004-03-10 at 02:09, Jon Rafkind wrote:
> making a new thread at Elias's request.
> 
> Allegro appears to shutdown on line 2819 of xwin.c:
> pass = getpwuid(geteuid());
> 

Hm, for some reason, I get the following now:

> gcc -static -DALLEGRO_STATICLINK -o demo demo.c `allegro-config --static`
/usr/local/lib/liballeg.a(umodules.o)(.text+0x1d9): In function `_unix_load_modules':
: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/liballeg.a(file.o)(.text+0x5be): In function `canonicalize_filename':
: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/liballeg.a(xwin.o)(.text+0xabf9): In function `_xdga_private_create_screen':
: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/liballeg.a(file.o)(.text+0x5b9): In function `canonicalize_filename':
: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/local/lib/liballeg.a(file.o)(.text+0x5fe): In function `canonicalize_filename':
: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x995): In function `_X11TransSocketINETConnect':
: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/X11R6/lib/libX11.a(x11trans.o)(.text+0x76a): In function `_X11TransSocketINETConnect':
: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc 

I also tried the same when you first posted - and there were no warnings
then. I did some re-confugrations and re-installations of Allegro in the
meantime though - so I must have activated the right thing to now get
it.. :) The odd thing is, I can't get rid of it anymore now :P

For me, the resulting executable is huge, but still, it works. I guess I
have that "shared libraries from the glibc version used for linking"
installed - so that explains why it works. You probably don't have them,
so it just aborts. (Just a guess.)

I don't really know what to do about it. Disabling modules should get
rid of the first warning. Disabling X11 (and therefore DGA) should get
rid of the last 2 (they are in X11 it seems, and not in Allegro) and the
DGA one.

So, the only required change in Allegro would be a new configure switch,
to make canonicalize_filename not use the offending functions.

I'm still puzzled why I could use -static in the past and even 2 days
ago, and now get these warnings. I even remember sending a -static
executable to someone once, to test binary compatibility of Allegro in
linux, and it worked. Maybe someone else here can shed some light on the
issue.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/