Archlinux + BlitzMax: undefined reference to...

Archives Forums/Linux Discussion/Archlinux + BlitzMax: undefined reference to...

danvari(Posted 2011) [#1]
hey!

im trying to compile some sample codes (e.g. breakout) and get the following error:

Linking:breakout.debug
/home/stephan/BlitzMax/mod/pub.mod/libpng.mod/libpng.debug.linux.x86.a(pngread.c.debug.linux.x86.o): In function `png_read_row':
pngread.c:(.text+0x108d): undefined reference to `png_combine_row'
pngread.c:(.text+0x10ef): undefined reference to `png_combine_row'
pngread.c:(.text+0x1154): undefined reference to `png_combine_row'
pngread.c:(.text+0x11b6): undefined reference to `png_combine_row'
pngread.c:(.text+0x121b): undefined reference to `png_combine_row'

so i guess i am missing some packages? but libpng and lib32-libpng are installed.


skidracer(Posted 2011) [#2]
Are you sure build modules completed without errors?

BlitzMax png support uses it's own version of pnglib and is not dependent on system libs, it's still possible there is a conflict there but I think it is more likely your module build is incomplete.


danvari(Posted 2011) [#3]
seems fine to me:



Compiling:png.c
ar: creating /home/stephan/BlitzMax/mod/pub.mod/zlib.mod/zlib.debug.linux.x86.a
Compiling:pngerror.c
Compiling:pngget.c
Compiling:pngmem.c
Compiling:pngpread.c
Compiling:pngread.c
Compiling:pngrio.c
Compiling:pngrtran.c
Compiling:pngrutil.c
Compiling:pngset.c
Compiling:pngtrans.c
Compiling:pngwio.c
Compiling:pngwrite.c
Compiling:pngwtran.c
Compiling:pngwutil.c
Compiling:libpng.bmx
flat assembler version 1.68 (32768 kilobytes memory)
3 passes, 2926 bytes.
Archiving:libpng.debug.linux.x86.a


danvari(Posted 2011) [#4]
ive got gcc and g++ 4.5.2 installed. dunno if current blitzmax is incompatible with latest compiler tools.


ridix(Posted 2011) [#5]
hey,

i use arch too, and have no problems with bitzmax. Normally all needed libs are installed while the installation of arch linux .
But you could try the dependency script. It look for missing packages via pacman.
What windowmanager do you use?
I had problems with gnome-shell, so i must go back to gnome 2.32 ....


danvari(Posted 2011) [#6]
yes i am using gnome-shell ^^ but now i reverted back all to stable arch and now im getting this one:

Linking:digesteroids
g++: Fehler: nicht erkannte Option

(translated: unrecognized option)

maybe it has sth. to do with gcc / g++ 4.6.0 ?


ridix(Posted 2011) [#7]
hey,

i did a pacman -Syu and i got the new gcc 4.6.0 package. Result was the same error like you got.
A solution is a downgrade to gcc 4.5.2 , then blitzmax will work fine again.
For downgrade gcc ,you must look in /var/cache/pacman/pkg for
"gcc-4.5.2-6-i686.pkg.tar.xz". Then do a pacman -U /var/cache/pacman/pkg/gcc-4.5.2-6-i686.pkg.tar.xz .
thats it.
Hope this will work for you


danvari(Posted 2011) [#8]
thank you, but downgrading is no solution for me (more a workaround). i posted a bug in the bugs section as i guess it is a bug related to blitzmax. hope it will be fixed soon.


skidracer(Posted 2011) [#9]
The reason that switch is there is for the sake of recent Ubuntu compatibility so it is not a trivial option just to remove it.

If you want your linux builds to be as compatible as possible I would rethink your position on downgrading for the immediate future.


skidracer(Posted 2011) [#10]
Here is a version of bmk that you cant test if you have time.

Rename your current %BlitzMax%/bin/bmk file and copy new build.


ridix(Posted 2011) [#11]
new bmk works fine with gcc-4.6.0-3. Big THX !