LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   vbam Slackbuild (https://www.linuxquestions.org/questions/slackware-14/vbam-slackbuild-4175476221/)

yilez 09-06-2013 03:55 PM

vbam Slackbuild
 
I'm trying to build the vbam slackbuild.

http://slackbuilds.org/repository/14.0/games/vbam/

It ran first time until I started a game, but crashed right away. Now it crashes as soon as I try to start it now. I get the following error:

Code:

(gvbam:10760): Gtk-WARNING **: Error loading theme icon 'edit-find' for stock: Fatal error reading PNG image file: Incompatible libpng version in application and library

(gvbam:10760): Gtk-WARNING **: Error loading theme icon 'text-x-generic' for stock: Fatal error reading PNG image file: Incompatible libpng version in application and library

(gvbam:10760): Gtk-WARNING **: Error loading theme icon 'edit-find' for stock: Fatal error reading PNG image file: Incompatible libpng version in application and library

(gvbam:10760): Gtk-WARNING **: Error loading theme icon 'text-x-generic' for stock: Fatal error reading PNG image file: Incompatible libpng version in application and library
**
Gtk:ERROR:gtkrecentmanager.c:2069:get_icon_fallback: assertion failed: (retval != NULL)
Aborted

If I take the source file and build it manually, it produces a vbam binary as well as the gvbam binary, and that can be used to run .gba files. It looks like it is just the GUI that is going wrong.

Any ideas?

Building on Slackware64 + AlienBob's multilib.

dugan 09-06-2013 04:22 PM

Sorry about that. I'm the VBAM SlackBuild maintainer, and I'll have an answer for you by the end of the day tomorrow. Probably earlier.

dugan 09-06-2013 07:29 PM

I'm actually kind of at a loss for how to solve this. Help?

ReaperX7 09-06-2013 10:32 PM

The VBA-M project is rather poorly documented and more or less is often very slipshod at best with it working at times with it's builds. I've had less than favourable results with it.

You might also want to check the older 1.8.0-1054 release.

http://slackbuilds.org/repository/13.37/games/vbam/

I had this one working rather well a while back.

Worst part is they use CMake rather than a traditional configure make script.

yilez 09-07-2013 01:41 AM

Sorry, wasn't expecting a swift response.

I haven't had chance to look into solutions since posting. I'd say do what ReaperX7 suggests and use an older version if that works.

Another suggestion is to keep the command line binary in the install. I noticed that it isn't in my path, but it does get built.

I don't have tonnes of time until Sunday evening. If there is anything that you want me to do, I'm very happy to help, but it will have to wait until then.

yilez 09-07-2013 02:29 AM

The version that ReaperX7 suggests craps out when building:

Code:

wget http://downloads.sourceforge.net/project/salix-sbo/13.37/vbam/vbam-1.8.0.1054-src.tar.gz
tar xf vbam-1.8.0.1054-src.tar.gz
cd vbam-1.8.0.1054
cmake . -DENABLE_WX=OFF -DENABLE_FFMPEG=OFF -DENABLE_GTK=OFF
make

...

[ 22%] Building CXX object CMakeFiles/fex.dir/fex/fex/Data_Reader.cpp.o
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp: In member function 'virtual const char* Gzip_File_Reader::read_v(void*, int)':
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:735:35: error: invalid conversion from 'void*' to 'gzFile' [-fpermissive]
In file included from /home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:651:0:
/usr/include/zlib.h:1290:21: error:  initializing argument 1 of 'int gzread(gzFile, voidp, unsigned int)' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:739:35: error: invalid conversion from 'void*' to 'gzFile' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:718:21: error:  initializing argument 1 of 'const char* convert_gz_error(gzFile)' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp: In member function 'virtual const char* Gzip_File_Reader::seek_v(int)':
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:749:34: error: invalid conversion from 'void*' to 'gzFile' [-fpermissive]
In file included from /home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:651:0:
/usr/include/zlib.h:1698:28: error:  initializing argument 1 of 'off_t gzseek(gzFile, off_t, int)' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:750:34: error: invalid conversion from 'void*' to 'gzFile' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:718:21: error:  initializing argument 1 of 'const char* convert_gz_error(gzFile)' [-fpermissive]
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp: In member function 'void Gzip_File_Reader::close()':
/home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:759:23: error: invalid conversion from 'void*' to 'gzFile' [-fpermissive]
In file included from /home/mark/Downloads/l/vbam-1.8.0.1054/fex/fex/Data_Reader.cpp:651:0:
/usr/include/zlib.h:1488:24: error:  initializing argument 1 of 'int gzclose(gzFile)' [-fpermissive]
make[2]: *** [CMakeFiles/fex.dir/fex/fex/Data_Reader.cpp.o] Error 1
make[1]: *** [CMakeFiles/fex.dir/all] Error 2
make: *** [all] Error 2

Haven't looked into the error yet. zlib.h problems? I think I'm doing something wrong.

dugan 09-08-2013 01:01 PM

Has anyone else had "incompatible libpng version in application and library" issues in anything else? VBAM is, strangely, the only thing that seems to be affected.

ReaperX7 09-08-2013 05:57 PM

I think they're using static libs... because... I got libpng and zlib weren't the supported versions either.

I think Higan now supports GBA gaming as well as NES, GB, GBC, and SNES.

Try it out and see if that emulator helps. Be aware I did have a very bad issue getting it to work recently saying some of the rom libraries it distributes by default were not located.

knudfl 09-08-2013 08:03 PM

Post # 6.

`vbam-r1159-src.tar.bz2' seems to be bug free :
http://downloads.sourceforge.net/pro...59-src.tar.bz2

$ cd vbam*/ && mkdir build && cd build/
$ cmake -DENABLE_WX=OFF -DENABLE_FFMPEG=OFF -DENABLE_GTK=OFF ../ && make : No errors.

Or : $ cmake ../ && make : No errors either.

-

dugan 09-08-2013 08:21 PM

@knudfl: If you're not on Slackware, please be aware that the issue seems to be Slackware-specific. And it comes up when VBAM is run. Not when it's compiled. The opening post is about vbam-r1159-src.tar.bz2.

jprzybylski 09-09-2013 12:34 AM

Quote:

Originally Posted by ReaperX7 (Post 5024282)
I think Higan now supports GBA gaming as well as NES, GB, GBC, and SNES.

Try it out and see if that emulator helps. Be aware I did have a very bad issue getting it to work recently saying some of the rom libraries it distributes by default were not located.

I'm quite a higan fan, but I will say that (for me) the GBA emulation was definitely pre-alpha, or at least not up to VBA-M's quality yet.

No idea why VBA-M would be messing up like that, though.

yilez 09-09-2013 03:52 AM

According to the original issue, I keep seeing suggestions of "reinstall gnome-icon-theme". I'll take a look later as I am at work right now, but I'm hoping a rebuild of Slackware's build will magically make the problem go away.

That is the suggestion, anyway.

ReaperX7 09-09-2013 03:48 PM

Why would an icon theme interfere with zlib and libpng?

By comparison Higan's emulation of GBA is pre-alpha, but it's actually quite good as it tends to work the first time around without too much of a hiccup.

dugan 09-09-2013 04:16 PM

VBAM's source repository actually includes copies of its dependencies, including specifically zlib and libpng.

I'm going to try to do an Alien Bob-style build where copies of these dependencies (from VBAM's repositories) are built first, and then statically linked into VBAM.

Should be able to do it by the end of the week.

turtleli 09-09-2013 05:39 PM

Slackware comes with two versions of libpng in the same package - 1.4.12 and 1.2.50. I'm not sure if it can happen, but perhaps it has managed to link to 1.2.50 instead of 1.4.12, which I think is the version gtk uses.

Could you run "ldd gvbam" and see what version of libpng it is linking to?

dugan 09-09-2013 06:04 PM

Quote:

Originally Posted by turtleli (Post 5024885)
Slackware comes with two versions of libpng in the same package - 1.4.12 and 1.2.50. I'm not sure if it can happen, but perhaps it has managed to link to 1.2.50 instead of 1.4.12, which I think is the version gtk uses.

Could you run "ldd gvbam" and see what version of libpng it is linking to?

Code:

➜  Linux  ldd /usr/bin/gvbam | grep libpng
        libpng14.so.14 => /usr/lib/libpng14.so.14 (0xb7260000)
➜  Linux

Two comments on that:

1. The executable is not the only thing that needs to be checked. I have not checked every library in its chain of dependencies to make sure that not a single one of them is linked against libpng 12. And no, I won't do that. :)

2. If this is indeed the issue, then I would find it very strange that VBAM seems to be the only program affected.

dugan 09-09-2013 06:18 PM

Also, anyone who solves this before I do gets offered ownership of the SlackBuild. :)

turtleli 09-09-2013 07:52 PM

Ok, I was completely off on that guess.

On non-multilib Slackware64-14.0 I've just compiled vbam using the slackbuild. The program seems to run fine and doesn't crash with libpng incompatibility errors. So perhaps it's a multilib build problem? I don't have a multilib system so I can't look into it myself. ldd points to the 64 bit libpng on my system.

Code:

ldd /usr/bin/gvbam | grep libpng
        libpng14.so.14 => /usr/lib64/libpng14.so.14 (0x00007f16dfa5b000)


dugan 09-09-2013 07:59 PM

Interesting that it works for you. I just tested it on a 32-bit VM and had the same problem yilez (the OP) did.

turtleli 09-09-2013 10:30 PM

The 32-bit version works here. I haven't done anything special either. Dependencies taken care of first as usual, then vbam installed without the ffmpeg option.

Only other thing I can think of and a complete stab in the dark is that I'm using fluxbox which I don't think uses gtk themes.

dugan 09-09-2013 11:32 PM

Okay, the icons still don't work, but let me know if this still crashes. It's a SlackBuild for r1199 that statically links libpng and zlib.

Source:
http://www.duganchen.ca/files/vbam-r1199-src.tar.bz2

SlackBuild:
http://pastebin.com/EFczu0P0

ReaperX7 09-09-2013 11:41 PM

Don't you need SDL for OpenGL rendering?

For me... it crashes every so often still without so much as a warning. I've tried to grep the logfile, but nothing except the program simply terminated execution. Turned on debugging build and nothing also. I'm getting no icons also.

Kinda wondering what the heck they are doing using outdated static libs within the project rather than using the dynamic or static system libs with simple compatibility workaround internally.

Dugan you should look at the source code as to how much of a mess it is.

dugan 09-09-2013 11:49 PM

Quote:

Originally Posted by ReaperX7 (Post 5025011)
Don't you need SDL for OpenGL rendering?

No you don't. Turning on SDL just gives you a GUI-less command-line executable.

The GUI builds use SFML, which is a competitor to SDL.

ReaperX7 09-09-2013 11:54 PM

Ah... hmmm... then again SDL does have a GUI project, but not certain how it's development has been going. I think there was one for SDL_GTK or something.

dugan 09-09-2013 11:55 PM

I think this proves your point about what a mess the source code is. :P

In addition to Higan, other options you might try are: Mednafen, or the Windows version of VBAM in Wine.

yilez 09-10-2013 03:43 AM

Quote:

Originally Posted by dugan (Post 5024896)
Code:

➜  Linux  ldd /usr/bin/gvbam | grep libpng
        libpng14.so.14 => /usr/lib/libpng14.so.14 (0xb7260000)
➜  Linux

Two comments on that:

1. The executable is not the only thing that needs to be checked. I have not checked every library in its chain of dependencies to make sure that not a single one of them is linked against libpng 12. And no, I won't do that. :)

2. If this is indeed the issue, then I would find it very strange that VBAM seems to be the only program affected.

I've had other slackbuilds complain on multilib due to trying to build against 32bit libs instead of 64 bit libs. Had to:

mv /usr/lib /usr/lib_
run slackbuild
mv /usr/lib_ /usr/lib

to get one to build.

EDIT: This doesn't work, by the way

yilez 09-10-2013 05:07 AM

Quote:

Originally Posted by dugan (Post 5025010)
Okay, the icons still don't work, but let me know if this still crashes. It's a SlackBuild for r1199 that statically links libpng and zlib.

Source:
http://www.duganchen.ca/files/vbam-r1199-src.tar.bz2

SlackBuild:
http://pastebin.com/EFczu0P0

Code:

**
Gtk:ERROR:gtkrecentmanager.c:2069:get_icon_fallback: assertion failed: (retval != NULL)
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
Aborted

Something is really screwy here.

yilez 09-10-2013 05:10 AM

Quote:

Originally Posted by ReaperX7 (Post 5024846)
Why would an icon theme interfere with zlib and libpng?

By comparison Higan's emulation of GBA is pre-alpha, but it's actually quite good as it tends to work the first time around without too much of a hiccup.

Only the old version was getting mixed up with the zlib problem. As for the newer version, it looks like it is trying to load images that are incompatible with this version of libpng. Perhaps gvbam isn't incompatibility very well and is crapping out instead of resorting to something else.

I honestly don't know. I do know that rebuilding the icon theme set did nothing. :)

turtleli 09-10-2013 05:40 AM

Thinking about it again, it might be the recent file menu. It does also happen to be the last error before crashing (I get alsa underrun occasionally but it's not fatal). From the behaviour you described it ran the first time but crashed after loading a file. It then crashed on startup on subsequent runs. The difference being that the recent menu now has an entry to it and trying to load the associated menu is causing it to crash.

yilez 09-10-2013 06:35 AM

Indeed. The recent menu is the only thing that will have changed. In fact, removing the entry from .local/share/recently-used.xbel allows me to load up the GUI again.

I am testing a few things at the moment. I think I know what the problem is, but I need to test first.

dugan 09-10-2013 09:44 AM

Quote:

Originally Posted by yilez (Post 5025112)
I've had other slackbuilds complain on multilib due to trying to build against 32bit libs instead of 64 bit libs. Had to:

mv /usr/lib /usr/lib_
run slackbuild
mv /usr/lib_ /usr/lib

to get one to build.

EDIT: This doesn't work, by the way

There's usually an easier way to solve that.

http://slackbuilds.org/faq/#multilib

dugan 09-10-2013 11:21 AM

And if anyone's wondering about the WxWidgets GUI (-DENABLE_WX=ON), I can't even get r1199 to build with it.

jprzybylski 09-10-2013 02:40 PM

I just compared our SlackBuild to Arch's PKGBUILD, and Arch does something peculiar:

Code:

# Fix SFML
  sed -i 's|/usr/include|/usr/include/sfml-1.6|' CMakeScripts/FindSFML.cmake
  sed -i 's|NAMES sfml-${LOWERCOMPONENT}|NAMES sfml-${LOWERCOMPONENT}-1.6|' CMakeScripts/FindSFML.cmake

  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_FLAGS=" -I/usr/include/sfml-1.6"

I don't know if SFML touches libpng, but perhaps there's something to find there?

dugan 09-10-2013 03:03 PM

I guess Arch installs SFML in a nonstandard location so that you can install both SFML 1 and SFML 2 at the same time.

As for SFML being linked against libpng: not according to ldd.

yilez 09-10-2013 03:27 PM

Can anyone help test something?

I am trying to build on a non-multilib 64 bit slackware gtkmm - http://slackbuilds.org/repository/14.0/libraries/gtkmm/

All dependencies are installed, but this keeps failing. It is somewhere in the dependency tree for vbam. I am wondering if this is the cause. It builds fine on multilib, but not on pure 64. Can anyone else build it on non-multilib 64?

EDIT: The error is quite abrupt, too:

Code:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with processed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [widget.lo] Error 1
make[2]: Leaving directory `/tmp/SBo/gtkmm-2.24.2/gtk/gtkmm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/gtkmm-2.24.2/'
make: *** [all] Error 2

Before that, it is compiling as happy as larry.

ReaperX7 09-10-2013 03:45 PM

GTKmm was a dependency for the old GTK based UI. I highly doubt they removed the code for it.

As far as WxWidgets go, you may have to install WxPython or WxGTK to get it working. Not sure though as my luck with that emulator has been hit or miss randomly. Even then I'm at a loss.

Yilez are you building with flagged command "ARCH=x86_64 ./gtkmm.SlackBuild"?

dugan 09-10-2013 03:53 PM

Quote:

Originally Posted by ReaperX7 (Post 5025473)
As far as WxWidgets go, you may have to install WxPython or WxGTK to get it working.

I had WxPython from SBo installed.

ReaperX7 09-10-2013 04:07 PM

Hmmm...

WxWidget's website says WxPython should have it as part of the projects, same as WxGTK, but you could try a raw build of WXWidgets itself.

http://www.wxwidgets.org/

And I don't think we have a SlackBuild for this toolkit either...

turtleli 09-10-2013 04:15 PM

gtkmm builds fine on pure 64 bit. It might be an out of ram error.

I can get wxvbam to compile with WxGTK after editing the SlackBuild to have an extra --enable-graphics_ctx at the configure stage and also modifying the vbam CMakeLists.txt but I'm instantly met with a segmentation fault upon running.

Just out of curiosity, what window managers/desktop environments are you all using? It's strange that I can get gvbam working both for 32 and 64 bit. It also makes it rather difficult to fix.

I could probably look into a patch to remove the recent games menu but I don't know if that'll fix the problem.

dugan 09-10-2013 04:18 PM

Quote:

Just out of curiosity, what window managers/desktop environments are you all using?
Xfce.

turtleli 09-10-2013 05:07 PM

1 Attachment(s)
Ok, I don't know why the errors happen but I think I've got it working.

Fluxbox - no errors.
xfce - gtk libpng warnings. gtkRecentManager makes gvbam burn and die. No menu icons.

Removing gtkRecentManager stuff from source seems to work. Still no menu icons and gtk libpng warnings appear whenever you use the menu, but it works.

Patch attached for r1199. No guarantees though.

EDIT: Patch also works for r1159.

EDIT: EDIT: There's a better way to solve this than removing the recent game menu. So don't use this patch! See post #45.

yilez 09-11-2013 03:25 AM

Quote:

Originally Posted by turtleli (Post 5025488)
Just out of curiosity, what window managers/desktop environments are you all using? It's strange that I can get gvbam working both for 32 and 64 bit. It also makes it rather difficult to fix.

xfce on one laptop, kde on the other. I will give fluxbox a go later (doing processing at the moment. Will take a couple of hours.)

I wasn't passing in any architecture flags to the slackbuild. It isn't something that I've ever had to do and it isn't mentioned on the readme.

RAM might be the problem. I just set up the VM with default RAM. I suppose I should have made sure it was 1 or 2 GB.

If it does build ok in Fluxbox, what does that mean? Are KDE and XFCE knackered? Is Fluxbox somehow more correct? Or broken enough to start working again?

I admit, I used fluxbox on my VM for the first time since 2002. I am liking it more than I ever thought possible. If XFCE and KDE are somehow broken, I might be switching permanently.

turtleli 09-11-2013 07:58 AM

I think the problem is a combination of the theme icons and the gtk recentmanager fallback.

If gtkRecentManager cannot load "text-x-generic" icon files when it does not know the file mime type it will reach a g_assert in the code which fails and the application dies. I think the vbam code does not attempt to work around this but it's not really their fault.

Fluxbox doesn't set up gtk themes for you so unless you do so gtk applications will use the fallback icon theme which is probably gnome-icon-theme. I'm not sure about KDE and Xfce, but I'm guessing some of the themes you can choose probably don't have text-x-generic icons in them.

EDIT: Well, can't get xfce to work even choosing gnome or tango icons so probably some other settings also matter. gtk fallback icons might be something else. I will probably stop digging.

yilez 09-11-2013 08:28 AM

So, I can confirm that it works fine in fluxbox on multilib.

I think this mostly rules out the VBAM slackbuild being dodgy. I don't know enough about the gnome-icon-theme or anything else to really help. I rebuilt it the other day, and that didn't help.

By the way, I'm still testing with version 1159. I haven't changed to 1199 at all.

turtleli 09-11-2013 09:39 AM

1 Attachment(s)
Better quick fix attached. Recent games menu retained. Simply don't show the icons! Tested on Xfce.

I'll really stop looking into this now.

yilez 09-11-2013 10:00 AM

I can confirm that this works. I suppose now the options are:

1: include the patch in the slackbuild, or
2: try to find the root cause elsewhere.

I really wouldn't know where to look elsewhere, and I don't know if anyone really has the time. Either way, good work!

EDIT: Tested on KDE

dugan 09-11-2013 11:13 AM

Wow, thanks turtleli and yilez. I'll take the "include the patch in the SlackBuild" option.

yilez 09-11-2013 02:30 PM

Cheers dugan. I'll mark this as solved now.


All times are GMT -5. The time now is 10:43 AM.