Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Dynamic libs and distributing program in linux

Credits go to kazzmir and Peter Wang for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
Dynamic libs and distributing program in linux
Milan Mimica
Member #3,877
September 2003
avatar

You need a package which provides libXfixes.so file. This is part of Xorg server, 6.9.0 or newer.

Michael Faerber
Member #4,800
July 2004
avatar

Thanks Milan, your answer brought me to the right track - it works now!

Quote:

Well, although you are statically linking, some drivers will be built as dynamically linked modules. You can distribute them and set ALLEGRO_MODULES env. variable as appropriate, or pass --enable-modules=no option to ./configure but then you might not be able to run your program where for example alsa is not present.

Hmmm ... are you sure there is no other way?

Because GCC doesn't complain only about Allegro, but also about X11!

GCC said:

michi@tux ~ $ gcc test.c `allegro-config --static` -static -lXrender -lXau -lXdmcp -lXfixes
/usr/lib/liballeg.a(umodules.o): 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/lib/liballeg.a(file.o): 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/lib/liballeg.a(file.o): 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/lib/liballeg.a(file.o): 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/lib/libX11.a(GetDflt.o): In function `GetHomeDir':
: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir':
: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketOpen':
: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketUNIXConnect':
: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketINETConnect':
: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

--
"The basic of informatics is Microsoft Office." - An informatics teacher in our school
"Do you know Linux?" "Linux? Isn't that something for visually impaired people?"

Milan Mimica
Member #3,877
September 2003
avatar

I think this warnings would go away if you link your programs statically to libc, or distribute your libc (libc.so.6 file) with the app.

Strange I never got such warnings though.

EDIT:
But you need to distribute allegro modules if you want them to be used.

Kitty Cat
Member #2,815
October 2002
avatar

GCC's -static attempts to statically link all libs into the program. Quite a bit of the time, this is unnecessarry and troublesome. Using --static with allegro-config will link in the staticlink Allegro libs, if you have them built, which should be enough for people to play.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Milan Mimica
Member #3,877
September 2003
avatar

+ you might allegro modules

 1   2 


Go to: