running/compiling vegastrike problems with libpng

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
moray

running/compiling vegastrike problems with libpng

Post by moray »

hullo,

I am trying to run vegastrike on a slackware 9 system but I cannot get much further because:
If I use a precompiled binary I get this error message:

The names of the joysticks are:
FactionXML:LoadXML factions.xml
1.Loading bmp file logos/NeutralSec.png vegastrike: relocation error: /usr/local/lib/libpng12.so.0: undefined symbol: inflateInit_

If I try to recompile it the configure script dies with the following errors:

checking for png library... no
checking for png12 library... no
configure: error: Png library not found

here is the relevant config.log part:
configure:7159: checking for png library
configure:7179: gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -L/usr/local -lpng >&5
/usr/local/lib/libpng.so: undefined reference to `deflate'
/usr/local/lib/libpng.so: undefined reference to `inflate'
/usr/local/lib/libpng.so: undefined reference to `inflateInit_'
/usr/local/lib/libpng.so: undefined reference to `crc32'
/usr/local/lib/libpng.so: undefined reference to `pow'
/usr/local/lib/libpng.so: undefined reference to `deflateInit2_'
/usr/local/lib/libpng.so: undefined reference to `inflateReset'
/usr/local/lib/libpng.so: undefined reference to `deflateReset'
/usr/local/lib/libpng.so: undefined reference to `inflateEnd'
/usr/local/lib/libpng.so: undefined reference to `deflateEnd'
configure:7159: checking for png12 library
configure:7179: gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -L/usr/local -lpng12 >&5
/usr/local/lib/libpng12.so: undefined reference to `deflate'
/usr/local/lib/libpng12.so: undefined reference to `inflate'
/usr/local/lib/libpng12.so: undefined reference to `inflateInit_'
/usr/local/lib/libpng12.so: undefined reference to `crc32'
/usr/local/lib/libpng12.so: undefined reference to `pow'
/usr/local/lib/libpng12.so: undefined reference to `deflateInit2_'
/usr/local/lib/libpng12.so: undefined reference to `inflateReset'
/usr/local/lib/libpng12.so: undefined reference to `deflateReset'
/usr/local/lib/libpng12.so: undefined reference to `inflateEnd'
/usr/local/lib/libpng12.so: undefined reference to `deflateEnd'
LIBS='-L/usr/local -lpng12'


libpng IS correctly installed (I had the package, deinstalled it and installed straight from the sources the lates version)...so, what is the problem here?
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

the problem is that configure.in doesn't add the -lz parameter to the -lpng call

it's fixed in the cvs version of configure.in
or you can manually edit configure.in and add a -lz wherever you see a -lpng

I hate it when libpng breaks their package as they appear to do with every new release
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Guest

Post by Guest »

hi but i get the same prob and im using current rpm's how can i fix in rpm land?
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

export LD_PRELOAD=/usr/lib/libz.so*

if youre using the src rpm just download the tgz or use the precompiled rpm :-)

paste the exact error if you would
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
cmf

Post by cmf »

i cant paste teh error because the mouse locks up and i have to restart X!

im using plain rpm,

ill try the export thing, thanks
Guest

Post by Guest »

i tried 'export LD_PRELOAD=/usr/lib/libpng.so' and got the same errors and posted in original post

want me to post anyfiles?
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

you dont' tell me what the error is
yes please paste away
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
cmf

Post by cmf »

hellcatv wrote:you dont' tell me what the error is
yes please paste away
i cant paset the error because as i said the mouse lockups when Vegastrike stops, ill explain the experience.
It strats, then a black and white screen made up of rectangles, then goes back to my desktop, show the upper right portion of my screen and my mouse is locked and i can't use it. and so cant highlight the error to copy it as i don't know how to go to teh previous entry, but as i said its the same error as the one in the original post
The names of the joysticks are:
FactionXML:LoadXML factions.xml
1.Loading bmp file logos/NeutralSec.png vegastrike: relocation error: /usr/local/lib/libpng12.so.0: undefined symbol: inflateInit_
what files would you like me to post?

id really like to get it all up and runing
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

ok well you need to export the right LD_PRELOAD

first,though, change vegastrike's setting to windowed mode, instead of fullscreen--- SDL is nasty with respect to fullscreen
edit vegastrike.config ~/.vegastrike/vegastrike.config
and change fullscreen to false wherever it occurs

then

exprot LD_PRELOAD=/usr/lib/libz.so*

that should work make sure which libz it is... make sure it's only one :-)
good luck
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
cmf
Insys Pilot
Insys Pilot
Posts: 2
Joined: Thu May 01, 2003 11:57 pm

Post by cmf »

ok, will try that when i get home, anyidea what libs i want to be using? as in libpng?

thanks for all teh help, and sorry for being a pain

Also im thinking that the export function will only be a temp solouton for launching from cli, what file can i edit so teh export function is sued all the time?
cmf
Insys Pilot
Insys Pilot
Posts: 2
Joined: Thu May 01, 2003 11:57 pm

Post by cmf »

The names of the joysticks are:
FactionXML:LoadXML factions.xml
1.Loading bmp file logos/NeutralSec.png /usr/local/bin/vegastrike: relocation error: /usr/lib/libpng12.so.0: undefined symbol: inflateInit_


ok thats the error i get, i tried 'export LD_PRELOAD=/usr/lib/libpng12.so.0' which is the lib it complains about and still get that error when i try to start a new game, its now in windowed mode. im stuck :(

btw im on mdk 9.1 if that info's needed.
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

you need to export LD_PRELOAD=/usr/lib/libz.so.*
or whatever

NOT libpng!!!

libpng needs libz and wasn't properly linked on your machine

you have to load libz to get libpng to work
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
or

Post by or »

I have the same problem with libpng, but I do have it (1.2.5 version) installed

checking for png library... no
checking for png12 library... no
configure: error: Png library not found
hellcatv wrote:the problem is that configure.in doesn't add the -lz parameter to the -lpng call

it's fixed in the cvs version of configure.in
or you can manually edit configure.in and add a -lz wherever you see a -lpng

I hate it when libpng breaks their package as they appear to do with every new release
so I did it but no result... here is a part of config.log

configure:7201: checking for png library
configure:7221: gcc -o conftest -L/usr/X11R6/lib -L/usr/X11R6/lib conftest.c
-lpng -lz >&5
/usr/lib/gcc-lib/i386-slackware-linux/3.2.2/../../../libpng.so: undefined refere
nce to `pow'
collect2: ld returned 1 exit status
hellcatv
Developer
Developer
Posts: 3980
Joined: Fri Jan 03, 2003 4:53 am
Location: Stanford, CA
Contact:

Post by hellcatv »

add a -lm in thre maybe? grrr gcc should figure that out
it needs the math lib
Vega Strike Lead Developer
http://vegastrike.sourceforge.net/
Post Reply