Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Packaging

This thread is locked; no one can reply to it. rss feed Print
Packaging
adamk kromm
Member #5,432
January 2005

How do i go about packaging a game for distribution once I've finished it? More specifically how do i know what libraries my game depends on (other than the allegro ones) and what the chances are that the average person will have those libraries on their computer (for windows and Linux)? I remember under linux there is a command you can run that will tell you what libraries your program uses, but i cant quite remember what it is.

Now lets say that i got all the dependencies and files, in one location, is it easy to make .deb or .rpm files? How about windows installer files?

Thanks a tonne for the help guys!

----------
-Adam Kromm

My Website

Audric
Member #907
January 2001

About windows, DLLs like allegro's should be in the same directory as executable - don't try to place them in the user's Windows directory. To see what is used by your program at runtime, you can use for example Process Explorer (a third-party software, not a tool of Windows).

Some people prefer a zip archive, but an installer/deinstaller can be nice too. You can use for example NSIS.

kazzmir
Member #1,786
December 2001
avatar

I remember under linux there is a command you can run that will tell you what libraries your program uses, but i cant quite remember what it is.

$ ldd someprogram

You can statically link your program if you don't want to bundle libraries or pray the user has them. If you are giving out a linux binary then statically linking is basically the only option, but a lot of linux executables are generated from source code so its ok to just give users some build scripts.

adamk kromm
Member #5,432
January 2005

if i where to statically link the program under linux, how do i know what libraries to link to? eg, under windows you need to link to kernel32.lib and a bunch of other ones... what are they under linux?

----------
-Adam Kromm

My Website

kazzmir
Member #1,786
December 2001
avatar

Sometimes you can just pass -static to gcc. Otherwise look where the dynamic libraries are and search for .a versions of those.

$ ldd myprogram
        linux-gate.so.1 =>  (0xb8065000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb8030000)
        liballeg.so.4.2 => /usr/lib/liballeg.so.4.2 (0xb7ee8000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7e70000)
        libz.so.1 => /lib/libz.so.1 (0xb7e5a000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7e34000)

The dynamic libraries are in /usr/lib so can look in there for libz.a and libpng12.a.

/usr/lib $ ls libz.a
libz.a
$ ls libpng*
libpng12.a  libpng12.so@  libpng12.so.0@  libpng12.so.0.27.0  libpng.a@  libpng.so@

So if you link to the .a files instead of the .so then it will be statically linked.

Sometimes you have to trick gcc into using the .a file, it will try to use the .so by default even with -static. What I do is copy the .a file to my own directory then use that directory for finding the library.

$ cp /usr/lib/libz.a my-directory
$ gcc my-program -L my-directory -lz

Thomas Fjellstrom
Member #476
June 2000
avatar

kazzmir said:

Sometimes you have to trick gcc into using the .a file, it will try to use the .so by default even with -static. What I do is copy the .a file to my own directory then use that directory for finding the library.

The easiest way is just to use -static, but if you want to only link a few things static, try this:

gcc foo.c -o foo.o -lsharedlib1 -Wl,-Bstatic -lstaticlib -Wl,-Bdynamic -lsharedlib2 

I think that'll do what you want.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

using -static doesnt seem to work for me (im using netbeans and i put it under additional options for the linker) Also i get this error on the allegro side of things

/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:37: undefined reference to `al_lock_mutex'

what library do i link to to get al_lock_mutex?

also what do i link to for opengl? libGL.a?? if so where do i get it? I cant find it on my computer.

----------
-Adam Kromm

My Website

Thomas Fjellstrom
Member #476
June 2000
avatar

using -static doesnt seem to work for me

What does that mean? What errors did you get? We can't read minds :P

Also, please see my last post on the right options to selectively control lib types.

Quote:

what library do i link to to get al_lock_mutex?

the core allegro library.

Quote:

also what do i link to for opengl?

Typically libGL.so I'm not sure if there even is a static version of GL. It probably isn't possible on a modern system.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

i tried using -static but, as far as i can tell it gave me just as many errors as before i used it. So i used ldd to find what i needed to link to.

I found libGL.a it was in a mesa package of some sort. That fixed all the gl... linking errors. I tried linking to libGL.so but it didnt like it.

Also I'm linking to liballegro-static-4.9.17.a and it still says that it cant find the mutex functions.

here's to be a bit more specific:

#SelectExpand
1/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:37: undefined reference to `al_lock_mutex' 2/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `maybe_unlock_mutex': 3/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:45: undefined reference to `al_unlock_mutex' 4/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `maybe_lock_mutex': 5/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:37: undefined reference to `al_lock_mutex' 6/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `maybe_unlock_mutex': 7/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:45: undefined reference to `al_unlock_mutex' 8/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `maybe_lock_mutex': 9/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:37: undefined reference to `al_lock_mutex' 10/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `maybe_unlock_mutex': 11/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:45: undefined reference to `al_unlock_mutex' 12/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_mixer.c.o): In function `al_attach_sample_to_mixer': 13/home/adam/allegro-4.9/addons/audio/kcm_mixer.c:766: undefined reference to `al_unlock_mutex' 14/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_stream.c.o): In function `maybe_lock_mutex': 15/home/adam/allegro-4.9/addons/audio/kcm_stream.c:23: undefined reference to `al_lock_mutex' 16/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_stream.c.o): In function `maybe_unlock_mutex': 17/home/adam/allegro-4.9/addons/audio/kcm_stream.c:31: undefined reference to `al_unlock_mutex' 18/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_detach_voice': 19/home/adam/allegro-4.9/addons/audio/kcm_voice.c:354: undefined reference to `al_lock_mutex' 20/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_attach_mixer_to_voice': 21/home/adam/allegro-4.9/addons/audio/kcm_voice.c:315: undefined reference to `al_lock_mutex' 22/home/adam/allegro-4.9/addons/audio/kcm_voice.c:338: undefined reference to `al_unlock_mutex' 23/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `_al_voice_update': 24/home/adam/allegro-4.9/addons/audio/kcm_voice.c:43: undefined reference to `al_lock_mutex' 25/home/adam/allegro-4.9/addons/audio/kcm_voice.c:48: undefined reference to `al_unlock_mutex' 26/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_attach_audio_stream_to_voice': 27/home/adam/allegro-4.9/addons/audio/kcm_voice.c:260: undefined reference to `al_lock_mutex' 28/home/adam/allegro-4.9/addons/audio/kcm_voice.c:290: undefined reference to `al_unlock_mutex' 29/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_attach_sample_to_voice': 30/home/adam/allegro-4.9/addons/audio/kcm_voice.c:143: undefined reference to `al_lock_mutex' 31/home/adam/allegro-4.9/addons/audio/kcm_voice.c:174: undefined reference to `al_unlock_mutex' 32/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_destroy_voice': 33/home/adam/allegro-4.9/addons/audio/kcm_voice.c:101: undefined reference to `al_destroy_mutex' 34/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_create_voice': 35/home/adam/allegro-4.9/addons/audio/kcm_voice.c:75: undefined reference to `al_create_mutex' 36/home/adam/allegro-4.9/addons/audio/kcm_voice.c:81: undefined reference to `al_destroy_mutex' 37/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_voice.c.o): In function `al_detach_voice': 38/home/adam/allegro-4.9/addons/audio/kcm_voice.c:374: undefined reference to `al_unlock_mutex' 39/usr/local/lib/liballegro_audio-static-4.9.17.a(oss.c.o): In function `oss_deallocate_voice': 40/home/adam/allegro-4.9/addons/audio/oss.c:288: undefined reference to `al_join_thread' 41/home/adam/allegro-4.9/addons/audio/oss.c:289: undefined reference to `al_destroy_thread' 42/usr/local/lib/liballegro_audio-static-4.9.17.a(oss.c.o): In function `oss_allocate_voice': 43/home/adam/allegro-4.9/addons/audio/oss.c:580: undefined reference to `al_create_thread' 44/home/adam/allegro-4.9/addons/audio/oss.c:581: undefined reference to `al_start_thread' 45/usr/local/lib/liballegro_audio-static-4.9.17.a(alsa.c.o): In function `alsa_stop_voice': 46/home/adam/allegro-4.9/addons/audio/alsa.c:464: undefined reference to `al_wait_cond' 47/usr/local/lib/liballegro_audio-static-4.9.17.a(alsa.c.o): In function `alsa_deallocate_voice': 48/home/adam/allegro-4.9/addons/audio/alsa.c:602: undefined reference to `al_join_thread' 49/home/adam/allegro-4.9/addons/audio/alsa.c:607: undefined reference to `al_destroy_thread' 50/home/adam/allegro-4.9/addons/audio/alsa.c:608: undefined reference to `al_destroy_cond' 51/usr/local/lib/liballegro_audio-static-4.9.17.a(alsa.c.o): In function `alsa_allocate_voice': 52/home/adam/allegro-4.9/addons/audio/alsa.c:572: undefined reference to `al_create_thread' 53/home/adam/allegro-4.9/addons/audio/alsa.c:579: undefined reference to `al_create_cond' 54/home/adam/allegro-4.9/addons/audio/alsa.c:580: undefined reference to `al_start_thread' 55/home/adam/allegro-4.9/addons/audio/alsa.c:577: undefined reference to `al_create_thread' 56/usr/local/lib/liballegro_audio-static-4.9.17.a(alsa.c.o): In function `alsa_update_rw': 57/home/adam/allegro-4.9/addons/audio/alsa.c:347: undefined reference to `al_lock_mutex' 58/home/adam/allegro-4.9/addons/audio/alsa.c:349: undefined reference to `al_signal_cond' 59/home/adam/allegro-4.9/addons/audio/alsa.c:350: undefined reference to `al_unlock_mutex' 60/usr/local/lib/liballegro_audio-static-4.9.17.a(alsa.c.o): In function `alsa_update_mmap': 61/home/adam/allegro-4.9/addons/audio/alsa.c:250: undefined reference to `al_lock_mutex' 62/home/adam/allegro-4.9/addons/audio/alsa.c:252: undefined reference to `al_signal_cond' 63/home/adam/allegro-4.9/addons/audio/alsa.c:253: undefined reference to `al_unlock_mutex' 64/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_instance.c.o): In function `maybe_lock_mutex': 65/home/adam/allegro-4.9/addons/audio/kcm_instance.c:22: undefined reference to `al_lock_mutex' 66/usr/local/lib/liballegro_audio-static-4.9.17.a(kcm_instance.c.o): In function `maybe_unlock_mutex': 67/home/adam/allegro-4.9/addons/audio/kcm_instance.c:30: undefined reference to `al_unlock_mutex'

----------
-Adam Kromm

My Website

Thomas Fjellstrom
Member #476
June 2000
avatar

Also I'm linking to liballegro-static-4.9.17.a and it still says that it cant find the mutex functions.

In gcc/ld, the order the libs are in matters. Try swapping the order of liballegro and liballegro_audio.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

thats odd. Linking to the audio before the core of allegro removes the link errors.

now i have these to deal with... but they're a bit more difficult, because they dont say what the problem is...

#SelectExpand
1/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketOpen': 2/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketUNIXConnect': 3/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketINETConnect': 4/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor': 5/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor': 6/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor': 7/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor': 8/usr/lib/libXcursor.a(cursor.o): In function `XcursorImagesLoadCursor': 9/usr/lib/libXcursor.a(cursor.o): In function `XcursorImagesLoadCursor': 10/usr/lib/libXcursor.a(display.o): In function `_XcursorGetDisplayInfo': 11/usr/lib/libXcursor.a(display.o): In function `_XcursorGetDisplayInfo': 12/usr/lib/libasound.a(dlmisc.o): In function `snd_dlsym_verify': 13/usr/lib/libasound.a(dlmisc.o): In function `snd_dlsym': 14/usr/lib/libasound.a(dlmisc.o): In function `snd_dlclose': 15/usr/lib/libasound.a(dlmisc.o): In function `snd_dlopen': 16/usr/lib/libX11.a(ClDisplay.o): In function `XCloseDisplay': 17/usr/lib/libX11.a(CrGlCur.o): In function `open_library': 18/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': 19/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': 20/usr/lib/libX11.a(locking.o): In function `_XUserLockDisplay': 21/usr/lib/libX11.a(locking.o): In function `_XDisplayLockWait': 22/usr/lib/libX11.a(locking.o): In function `_Xthread_self': 23/usr/lib/libX11.a(OpenDis.o): In function `OutOfMemory': 24/usr/lib/libX11.a(OpenDis.o): In function `XOpenDisplay': 25/usr/lib/libX11.a(OpenDis.o): In function `XOpenDisplay': 26/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 27/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 28/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 29/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 30/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 31/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 32/usr/lib/libX11.a(xcb_io.o): In function `require_socket': 33/usr/lib/libX11.a(xcb_io.o): In function `wait_or_poll_for_event': 34/usr/lib/libX11.a(xcb_io.o): In function `process_responses': 35/usr/lib/libX11.a(xcb_io.o): In function `process_responses': 36/usr/lib/libX11.a(xcb_io.o): In function `_XAllocIDs': 37/usr/lib/libX11.a(xcb_io.o): In function `_XIDHandler': 38/usr/lib/libX11.a(xcb_io.o): In function `_XSend': 39/usr/lib/libX11.a(xcb_io.o): In function `_XReply': 40/usr/lib/libX11.a(xcb_io.o): In function `wait_or_poll_for_event': 41/usr/lib/libGL.a(glthread.o): In function `_glthread_GetID': 42/usr/lib/libGL.a(fakeglx.o): In function `_kw_ungrab_all': 43/usr/lib/libGL.a(fakeglx.o): In function `_kw_ungrab_all': 44/usr/lib/libGL.a(xfonts.o): In function `Fake_glXUseXFont': 45/usr/lib/libGL.a(xm_api.o): In function `XMesaBindTexImage': 46/usr/lib/libGL.a(xm_api.o): In function `XMesaCopySubBuffer': 47/usr/lib/libGL.a(xm_api.o): In function `XMesaCopySubBuffer': 48/usr/lib/libGL.a(xm_api.o): In function `XMesaSwapBuffers': 49/usr/lib/libGL.a(xm_api.o): In function `XMesaSwapBuffers': 50/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 51/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 52/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 53/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 54/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 55/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 56/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_delete_framebuffer': 57/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_delete_framebuffer': 58/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 59/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 60/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 61/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 62/usr/lib/libGL.a(xm_dd.o): In function `xmesa_CopyPixels': 63/usr/lib/libGL.a(xm_dd.o): In function `color_mask': 64/usr/lib/libGL.a(xm_dd.o): In function `index_mask': 65/usr/lib/libGL.a(xm_line.o): In function `xor_line': 66/usr/lib/libGL.a(xm_line.o): In function `xor_line': 67/usr/lib/libGL.a(xm_span.o): In function `read_pixel': 68/usr/lib/libGL.a(xm_span.o): In function `get_row_rgba': 69/usr/lib/libGL.a(xm_span.o): In function `get_row_ci': 70/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlclose': 71/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlsym': 72/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlopen': 73collect2: ld returned 1 exit status 74make[2]: *** [dist/static/GNU-Linux-x86/roadblock] Error 1 75make[2]: Leaving directory `/home/adam/NetBeansProjects/RoadBlock' 76make[1]: *** [.build-conf] Error 2 77make[1]: Leaving directory `/home/adam/NetBeansProjects/RoadBlock' 78make: *** [.build-impl] Error 2 79BUILD FAILED (exit value 2, total time: 9s)

----------
-Adam Kromm

My Website

Thomas Fjellstrom
Member #476
June 2000
avatar

now i have these to deal with... but they're a bit more difficult, because they dont say what the problem is...

Static linking on linux is pretty pointless these days, you can't get a true static exe anymore, at the very least your app is going to absolutely depend on a shared glibc, and a shared nss (if you use networking, or at least hostname lookups).

That said, can you paste the ACTUAL errors? It looks like you left out a large number of lines.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

here is the complete output:

#SelectExpand
1/usr/bin/make -f nbproject/Makefile-static.mk SUBPROJECTS= .build-conf 2make[1]: Entering directory `/home/adam/NetBeansProjects/RoadBlock' 3/usr/bin/make -f nbproject/Makefile-static.mk dist/static/GNU-Linux-x86/roadblock 4make[2]: Entering directory `/home/adam/NetBeansProjects/RoadBlock' 5mkdir -p build/static/GNU-Linux-x86 6rm -f build/static/GNU-Linux-x86/a_star.o.d 7g++ -static -c -g -MMD -MP -MF build/static/GNU-Linux-x86/a_star.o.d -o build/static/GNU-Linux-x86/a_star.o a_star.cpp 8mkdir -p build/static/GNU-Linux-x86 9rm -f build/static/GNU-Linux-x86/main.o.d 10g++ -static -c -g -MMD -MP -MF build/static/GNU-Linux-x86/main.o.d -o build/static/GNU-Linux-x86/main.o main.cpp 11mkdir -p build/static/GNU-Linux-x86 12rm -f build/static/GNU-Linux-x86/Game.o.d 13g++ -static -c -g -MMD -MP -MF build/static/GNU-Linux-x86/Game.o.d -o build/static/GNU-Linux-x86/Game.o Game.cpp 14mkdir -p build/static/GNU-Linux-x86 15rm -f build/static/GNU-Linux-x86/NPC.o.d 16g++ -static -c -g -MMD -MP -MF build/static/GNU-Linux-x86/NPC.o.d -o build/static/GNU-Linux-x86/NPC.o NPC.cpp 17mkdir -p build/static/GNU-Linux-x86 18rm -f build/static/GNU-Linux-x86/UserInterface.o.d 19g++ -static -c -g -MMD -MP -MF build/static/GNU-Linux-x86/UserInterface.o.d -o build/static/GNU-Linux-x86/UserInterface.o UserInterface.cpp 20mkdir -p dist/static/GNU-Linux-x86 21g++ -static -static -o dist/static/GNU-Linux-x86/roadblock build/static/GNU-Linux-x86/alInput.o build/static/GNU-Linux-x86/alAudio.o build/static/GNU-Linux-x86/a_star.o build/static/GNU-Linux-x86/main.o build/static/GNU-Linux-x86/alBase.o build/static/GNU-Linux-x86/Game.o build/static/GNU-Linux-x86/NPC.o build/static/GNU-Linux-x86/UserInterface.o /usr/local/lib/liballegro_audio-static-4.9.17.a /usr/local/lib/liballegro-static-4.9.17.a /usr/local/lib/liballegro_font-static-4.9.17.a /usr/local/lib/liballegro_image-static-4.9.17.a /usr/local/lib/liballegro_ttf-static-4.9.17.a /usr/lib/libXinerama.a /usr/lib/libpthread.a /usr/lib/libXcursor.a /usr/lib/libSM.a /usr/lib/libICE.a /usr/lib/libXext.a /usr/lib/libasound.a /usr/lib/libpng12.a /usr/lib/libz.a /usr/lib/libfreetype.a /usr/lib/libjpeg.a /usr/lib/libX11.a /usr/lib/libGL.a /usr/lib/libXau.a /usr/lib/libXfixes.a /usr/lib/libXrender.a 22/usr/local/lib/liballegro-static-4.9.17.a(upath.c.o): In function `_unix_find_home': 23/home/adam/allegro-4.9/src/unix/upath.c:252: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking 24/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir': 25/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir': 26/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketOpen': 27/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketUNIXConnect': 28/usr/lib/libX11.a(xim_trans.o): In function `_XimXTransSocketINETConnect': 29/usr/lib/libasound.a(dlmisc.o): In function `snd_dlsym_verify': 30/usr/lib/libasound.a(dlmisc.o): In function `snd_dlsym': 31/usr/lib/libasound.a(dlmisc.o): In function `snd_dlclose': 32/usr/lib/libasound.a(dlmisc.o): In function `snd_dlopen': 33/usr/lib/libX11.a(ClDisplay.o): In function `XCloseDisplay': 34/usr/lib/libX11.a(CrGlCur.o): In function `open_library': 35/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': 36/usr/lib/libX11.a(CrGlCur.o): In function `fetch_symbol': 37/usr/lib/libX11.a(locking.o): In function `_XUserLockDisplay': 38/usr/lib/libX11.a(locking.o): In function `_XDisplayLockWait': 39/usr/lib/libX11.a(locking.o): In function `_Xthread_self': 40/usr/lib/libX11.a(OpenDis.o): In function `OutOfMemory': 41/usr/lib/libX11.a(OpenDis.o): In function `XOpenDisplay': 42/usr/lib/libX11.a(OpenDis.o): In function `XOpenDisplay': 43/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 44/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 45/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 46/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 47/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 48/usr/lib/libX11.a(xcb_disp.o): In function `_XConnectXCB': 49/usr/lib/libX11.a(xcb_io.o): In function `require_socket': 50/usr/lib/libX11.a(xcb_io.o): In function `wait_or_poll_for_event': 51/usr/lib/libX11.a(xcb_io.o): In function `process_responses': 52/usr/lib/libX11.a(xcb_io.o): In function `process_responses': 53/usr/lib/libX11.a(xcb_io.o): In function `_XAllocIDs': 54/usr/lib/libX11.a(xcb_io.o): In function `_XIDHandler': 55/usr/lib/libX11.a(xcb_io.o): In function `_XSend': 56/usr/lib/libX11.a(xcb_io.o): In function `_XReply': 57/usr/lib/libX11.a(xcb_io.o): In function `wait_or_poll_for_event': 58/usr/lib/libGL.a(glthread.o): In function `_glthread_GetID': 59/usr/lib/libGL.a(fakeglx.o): In function `_kw_ungrab_all': 60/usr/lib/libGL.a(fakeglx.o): In function `_kw_ungrab_all': 61/usr/lib/libGL.a(xfonts.o): In function `Fake_glXUseXFont': 62/usr/lib/libGL.a(xm_api.o): In function `XMesaBindTexImage': 63/usr/lib/libGL.a(xm_api.o): In function `XMesaCopySubBuffer': 64/usr/lib/libGL.a(xm_api.o): In function `XMesaCopySubBuffer': 65/usr/lib/libGL.a(xm_api.o): In function `XMesaSwapBuffers': 66/usr/lib/libGL.a(xm_api.o): In function `XMesaSwapBuffers': 67/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 68/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 69/usr/lib/libGL.a(xm_api.o): In function `noFaultXAllocColor': 70/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 71/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 72/usr/lib/libGL.a(xm_api.o): In function `initialize_visual_and_buffer': 73/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_delete_framebuffer': 74/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_delete_framebuffer': 75/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 76/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 77/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 78/usr/lib/libGL.a(xm_buffer.o): In function `xmesa_alloc_back_storage': 79/usr/lib/libGL.a(xm_dd.o): In function `xmesa_CopyPixels': 80/usr/lib/libGL.a(xm_dd.o): In function `color_mask': 81/usr/lib/libGL.a(xm_dd.o): In function `index_mask': 82/usr/lib/libGL.a(xm_line.o): In function `xor_line': 83/usr/lib/libGL.a(xm_line.o): In function `xor_line': 84/usr/lib/libGL.a(xm_span.o): In function `read_pixel': 85/usr/lib/libGL.a(xm_span.o): In function `get_row_rgba': 86/usr/lib/libGL.a(xm_span.o): In function `get_row_ci': 87/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlclose': 88/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlsym': 89/usr/lib/libGL.a(dlopen.o): In function `_mesa_dlopen': 90/usr/lib/libXrender.a(Xrender.o): In function `XRenderFindDisplay': 91collect2: ld returned 1 exit status 92make[2]: *** [dist/static/GNU-Linux-x86/roadblock] Error 1 93make[2]: Leaving directory `/home/adam/NetBeansProjects/RoadBlock' 94make[1]: *** [.build-conf] Error 2 95make[1]: Leaving directory `/home/adam/NetBeansProjects/RoadBlock' 96make: *** [.build-impl] Error 2 97BUILD FAILED (exit value 2, total time: 4s)

doesn't give much information. So what else could i do to package it all together rather than statically linking everything?

----------
-Adam Kromm

My Website

Thomas Fjellstrom
Member #476
June 2000
avatar

So what else could i do to package it all together rather than statically linking everything?

Learn how to make Debian (.deb) and RedHat/Fedora (.rpm) packages. Or let the distros package it themselves.

Otherwise you generally just release the source and let people compile it, if you can.

I really can't explain those errors.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

alright, thanks for your help! I'll see what i can do about the .deb and .rpm packages, i found one tutorial for .deb packages, but it wasnt that great.

----------
-Adam Kromm

My Website

Peter Wang
Member #23
April 2000

Don't static link everything. For closed source programs you can provide copies of 'uncommon' shared libraries and set LD_LIBRARY_PATH in a shell script to let your executable find them. This also allows the user to replace those copies with newer versions in the future if they need to. You can reasonably expect users to have X and OpenGL libraries installed, as well as zlib, libpng, vorbis, etc.

adamk kromm
Member #5,432
January 2005

ok, that makes sense. But a small problem... i think i killed something in my mad drive to find libGL.a After searching and installing random packages (i know dumb idea) for synaptec i tried running my game again (debug dynamic linking). Before it ran at ~200fps now it runs at ~10 fps. Also, i know have a thick black line around menus... eg, if i right click the menu comes up, but with a thick black line around it, if i press on applications or any other menu, the same thing happens, also some windows have it too... the problem is i dont know what package messed it all up :(

----------
-Adam Kromm

My Website

Thomas Fjellstrom
Member #476
June 2000
avatar

If you have closed source drivers installed for your graphics card (fglrx/ati or nvidia), when you installed some of the mesa packages you probably overwrote some critical files. You're going to want to reinstall your gfx drivers.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

adamk kromm
Member #5,432
January 2005

i think the problem is that its lost the ability to deal with transparency.

----------
-Adam Kromm

My Website

Go to: