Topic: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Hi there,
Recently reinstalled my linux partition and picked up the bleeding edge version of the game.  Tried running it within my folder that contained the windows version of the game I have been working on and it crashes without so much as a warning message.  I tried checking the logfile, here is what it says:

Open Surge Engine version 0.2.0 build 698
logfile_init()
preferences_init()
Loaded user preferences - read 1 field(s)
game arguments:
argv[0]: '/home/dalton/Dropbox/Ashara/opensurge_bin'
timer_init()
Installing Allegro timers...
video_init()
Initializing JPGalleg...
Initializing loadpng...
video_changemode(2,0,0)
creating the backbuffer...
creating the window surface...
creating the auxiliary window surface...
setting up the window...
video_changemode() ok
audio_init(): using OpenAL for audio playback...

Then I tried running it from the terminal, here is what it gave me as far as errors:

./opensurge: line 48:  2950 Aborted                 (core dumped) ./${GAME_BIN}

I'm pretty sure this is a bug in the linux copy of the bleeding edge, the windows copy runs just fine, not only from my own computer, but from any windows machine I attempt to run it from.  Can you help me find the problem?

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

What happens if you run

export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
./opensurge_bin

Also, what happens if you run

sudo apt-get install libopenal-dev

?

lunarrush wrote:

Can you help me find the problem?

Are you able to compile the game?

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Can a windows version even work on a linux?

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Alexandre wrote:

export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
./opensurge_bin

When I do that, running it results in this:

Shutting down Allegro due to signal #11
Segmentation fault (core dumped)
Alexandre wrote:

Also, what happens if you run
sudo apt-get install libopenal-dev

I ran the install, the game still gives the above error.

I cannot compile the game yet, this was the prepackaged binaries.

@S32X: It could, if I installed wine, the problem is that the native linux binaries aren't running and that is just weird.

Edit:Ran the first line again, now it's giving me the following error on command line:

Aborted (core dumped)

And the same thing in the logfile as before.

Last edited by lunarrush (2012-05-15 00:01:32)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Problem Glitch/Bug. Glitches sometimes are very simple to fix or can't be fixed at all. Like when the internet kept loading a bunch of tabs at a time. The best case scenario is to reboot the computer.

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

I suppose that a clean copy of the bleeding edge isn't working either, is that right?

What's the output of

uname -a

By the way, try this

sudo apt-get install ia32-libs

and run the game again.

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Output of uname -a:

Linux Dalton-PC 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Output of install ia32-libs:

ia32-libs is already the newest version.

Clean version gives me the same issue.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

lunar, I don't know the answer. sad

Did it work correctly on your previous Linux installation?

I suspected that there could be a 32 x 64 bit incompatibility, but it seems there is not such a thing. Unlike yours, my installation is a 32 bit one, and the bleeding edge works just fine.

It would help if you could compile the game somehow. There could be something wrong with OpenAL, but I'm not sure. Binary distribution under Linux is always a pain. What happens if you disable OpenAL during compilation? (run "ccmake ." before "./configure")

If you can figure it out, please share your solution with us.

This might help (there's A4.4).

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

It worked correctly on my previous install, but that was also an older version of the bleeding edge.  My previous install was 11.10 x64, I do not remember the last bleeding edge update I did though.  Anyway, I do not currently understand how to compile the game, though I have tried on several past occasions.  I believe it is that modified library that always gives me the hardest time.  Anyway, I find this to be a very weird problem, I have never had a problem running the binary except on kde.  I'm thinking of swapping over to unity real quick and seeing if it's a gnome 3 problem...
Anyway, thank you for attempting to help me, I appreciate the time and effort you put into making this engine great.
Update: Tried on unity, it doesn't work any better than the try under Gnome 3.
Edit 2: Is there any way to get my hands on the core dump thing that it talks about when I run it from the command line, and if there is would it help you?

Last edited by lunarrush (2012-05-16 03:53:06)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

10

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

tried on my 11.10 x64, it won't even start. marked as executable, given full permissions, and the logfile... doesn't even change...

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Ok, just tried this with build 640 and it ran properly (save for a font error, but that's a different problem entirely in the folder in which it was ran).  Therefore, the conclusion I have reached is that this is a problem with recent builds.  Not sure what it is though...

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

12

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

@Alex

i was looking in the revision log. last major change was in 689 when execute was introduced. then there are several consecutive changes on osspec.c and .h

on an earlier build there's "an obscure bugfix"

could any of those things be related?

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

KZR wrote:

@Alex
i was looking in the revision log. last major change was in 689 when execute was introduced. then there are several consecutive changes on osspec.c and .h
on an earlier build there's "an obscure bugfix"
could any of those things be related?

Don't know, but I don't think so.

lunarrush wrote:

Ok, just tried this with build 640 and it ran properly (save for a font error, but that's a different problem entirely in the folder in which it was ran).  Therefore, the conclusion I have reached is that this is a problem with recent builds.  Not sure what it is though...

640 was available just before we introduced OpenAL on the Linux build. Curiously, the logfile tells us that the game crashes when initializing OpenAL.

Try putting this in the game folder:

http://dl.dropbox.com/u/24671497/libopenal.so.1.13.0

Also, make two symbolic links to it (or just copies), also in the open surge folder, named libopenal.so and libopenal.so.1

Does it work?

lunarrush wrote:

Edit 2: Is there any way to get my hands on the core dump thing that it talks about when I run it from the command line, and if there is would it help you?

I don't know, but you can certainly get more data if you compile it. Alternatively, if after you do what's described above does not result in success, I can try to provide you a build that doesn't use OpenAL.

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Ok, firstly I will attempt to compile it before asking for a non-openAL version because that might fix my audio issues on Linux.  Tried adding the lib to the folder with the links and the copies and the result was the same in both cases.  So, I am going to look into getting the dependencies installed later tonight and seeing what results from it.  Am I right in that these are the current dependencies to compile this game for Linux?

gcc
Allegro 4.4.2
JPGalleg
loadPNG
LOGG
Modified AlFont 2.0.9
OpenAL
ALURE
If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Ok, had a problem compiling loadpng:

gcc -W -Wall -O3 -I.   -c -o loadpng.o loadpng.c
loadpng.c:22:30: error: ‘Z_BEST_COMPRESSION’ undeclared here (not in a function)
loadpng.c: In function ‘really_load_png’:
loadpng.c:89:9: warning: variable ‘tRNS_to_alpha’ set but not used [-Wunused-but-set-variable]
loadpng.c: In function ‘load_png_pf’:
loadpng.c:279:9: error: dereferencing pointer to incomplete type
loadpng.c: In function ‘load_memory_png’:
loadpng.c:375:9: error: dereferencing pointer to incomplete type
make: *** [loadpng.o] Error 1

Installed all the dependencies, still getting this error.  Can you help?

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Try this binary instead (replace opensurge_bin with it):

http://dl.dropbox.com/u/24671497/opensurge_bin

It's the non-OpenAL version.

lunarrush wrote:

Installed all the dependencies, still getting this error.  Can you help?

http://www.allegro.cc/forums/thread/606591

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Ok, allegro successfully compiled and I think it had all the proper addons this time.  Now I get to the modified font library.  I try to compile and get the following error:

/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.

Not sure what I'm doing wrong here, the bits/predefs.h doesn't exist anywhere in this thing...

The other binary works...but I think I may have screwed up when I was installing allegro or something because I have to export the library paths using the command you gave me earlier before it will run...

Edit: This is the error I get when I attempt to run the binary without specifying the export thing, not sure why, I checked usr/local/libs and found the library it is telling me isn't there right in the thing...

./opensurge_bin: error while loading shared libraries: liballeg.so.4.4: cannot open shared object file: No such file or directory

I installed both the runtime and the debug versions of the library...not sure what the big problem here is.

Moar Edits:Tried setting the shared option to off, didn't work.
Another Edit: Linked some libs to usr/lib and got the following error:

./opensurge_bin: error while loading shared libraries: liballeg.so.4.4: wrong ELF class: ELFCLASS64

Last edited by lunarrush (2012-05-19 03:54:10)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

lunarrush wrote:

Ok, allegro successfully compiled and I think it had all the proper addons this time.  Now I get to the modified font library.  I try to compile and get the following error:

/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.

Not sure what I'm doing wrong here, the bits/predefs.h doesn't exist anywhere in this thing...

I also have no idea what these errors are all about, but it's usually a good idea to google them. You'll come up with a few results.

Try this: sudo apt-get install libc6-dev-i386

By the way, take off the "-m32" parameter from the compiler options if you're using it when dealing with alfont.

lunarrush wrote:

The other binary works...but I think I may have screwed up when I was installing allegro or something because I have to export the library paths using the command you gave me earlier before it will run...

Great! It works! Does it have sound?

We now know for sure that the problem is really about OpenAL. lunar, please try compiling the game anyway, so we can figure out what exactly is wrong.

Instead of running opensurge_bin directly, run opensurge. This is a script that does all the export stuff for you already.

lunarrush wrote:
./opensurge_bin: error while loading shared libraries: liballeg.so.4.4: wrong ELF class: ELFCLASS64

The libraries I provide in the binary package are 32-bits. You're using a 64 bit version of them.

Try compiling stuff with the source package instead (download it in the nightlybuilds page).

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

I am very close, here was the thing the engine gave me at the end of the compile:

/usr/bin/ld: cannot find -lalfont
collect2: ld returned 1 exit status
make[2]: *** [opensurge] Error 1
make[1]: *** [CMakeFiles/opensurge.dir/all] Error 2
make: *** [all] Error 2

Also got lots of errors when building the modified library, will post them below in case it will help.  I'm close, and if we can get this it will help us toward solving the problem.

dalton@Dalton-PC:~/Downloads/alfont$ patch -p1 < alfont-2.0.9-linux.patch
patching file include/alfont.h
patching file src/alfont.c
patching file src/alfont.c
dalton@Dalton-PC:~/Downloads/alfont$ gcc -fPIC -DPIC -O2 -m32 -Iinclude `freetype-config --cflags` -o src/alfont.o -c src/alfont.c  
src/alfont.c: In function ‘alfont_ugetx’:
src/alfont.c:3765:4: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3765:4: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3767:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3767:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3771:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3771:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3773:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3773:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3818:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3818:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:3820:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:3820:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c: In function ‘alfont_ugetxc’:
src/alfont.c:4087:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:4087:2: note: expected ‘const char **’ but argument is of type ‘char **’
src/alfont.c:4089:2: warning: passing argument 1 of ‘ugetxc’ from incompatible pointer type [enabled by default]
src/alfont.c:4089:2: note: expected ‘const char **’ but argument is of type ‘char **’
dalton@Dalton-PC:~/Downloads/alfont$ gcc -O2 -m32 -shared -Wl,-soname,libalfont.so.2 -o libalfont.so.2.0.9 src/alfont.o `freetype-config --libs` `allegro-config --libs |sed 's/-lalleg_unsharable//'`  
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.so when searching for -lfreetype
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libfreetype.a when searching for -lfreetype
/usr/bin/ld: cannot find -lfreetype
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/local/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/local/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/local/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/local/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: cannot find -lz
/usr/bin/ld: skipping incompatible /usr/local/lib/liballeg.so when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/local/lib/liballeg.a when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../liballeg.so when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../liballeg.a when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/local/lib/liballeg.so when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/local/lib/liballeg.a when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/lib/liballeg.so when searching for -lalleg
/usr/bin/ld: skipping incompatible /usr/lib/liballeg.a when searching for -lalleg
/usr/bin/ld: cannot find -lalleg
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpthread.a when searching for -lpthread
collect2: ld returned 1 exit status
dalton@Dalton-PC:~/Downloads/alfont$ sudo install -m 755 libalfont.so.2.0.9 /usr/lib/  
install: cannot stat `libalfont.so.2.0.9': No such file or directory
dalton@Dalton-PC:~/Downloads/alfont$ sudo install -m 644 include/alfont*.h /usr/include/  
dalton@Dalton-PC:~/Downloads/alfont$ sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so.2.0  
dalton@Dalton-PC:~/Downloads/alfont$ sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so.2  
dalton@Dalton-PC:~/Downloads/alfont$ sudo ln -s libalfont.so.2.0.9 /usr/lib/libalfont.so

Edit:Will post back when I get back on and get a chance to start sorting through these bugs.

Last edited by lunarrush (2012-05-19 04:24:10)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

See this line?

dalton@Dalton-PC:~/Downloads/alfont$ gcc -fPIC -DPIC -O2 -m32 -Iinclude `freetype-config --cflags` -o src/alfont.o -c src/alfont.c

Remove the -m32 and try again.

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

IT LIVES big_smile
64-bit compiled successfully.  It has sound now too.  Thank you Alex big_smile

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Great! Congratulations! big_smile

Did you compile it with or without OpenAL?

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

With openal, and it still worked which leads me to believe the previous problem was a platform problem.  Anyway, I tried giving my binary to KZR, but we ran into some weird problems.  Whenever he would try to run the binary he would get the following error:

 bash: ./opensurge_bin: cannot execute binary file

I included all the libs that the 32-bit edition of the engine ships with and the opensurge file that came with it as well so that it would do that export thing, but the 64-bit engine would not execute.  Both the binary and the script gave the same error and both were given execute permissions.  I'm going to have him try installing some libs later and see at which point (if any) this problem is fixed.
Edit: the error only appears when attempting to run it from the command line, running the script or the binary from the gui doesn't work at all.

Last edited by lunarrush (2012-05-19 18:45:36)

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

Binary distribution under Linux is really a pain. Try googling around: there's no easy answer for that. It's nothing like Windows.

The best way to distribute programs is through the source code or through distribution-specific packages (like .deb for Debian and Ubuntu). Distributing the binaries directly may generate all sorts of petty trouble. THAT gives a lot of headache.

lunarrush wrote:

I included all the libs that the 32-bit edition of the engine ships with and the opensurge file that came with it as well so that it would do that export thing, but the 64-bit engine would not execute.

It shouldn't execute. The 64 bit engine needs the 64 bit libraries.

Re: [Problem]Will not run on Ubuntu 12.04 with Gnome 3 desktop

I mean that I included 64 bit editions of all the libs your distribution had.

If I knew then what I know now I'd tell you that the story's true.  Cause whatever you do, it comes back to you.  -Slaughter, Burning Bridges