Strange libpng errors

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
pspwill
Posts: 51
Joined: Thu Nov 17, 2005 8:07 am

Strange libpng errors

Post by pspwill »

For some reason my libpng is broken and any programs that use will now no longer compile. It just started doing it randomly this morning. Re-installing it makes no difference.

The error i get

Code: Select all

/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In func
tion `png_reset_crc':
png.c:(.text+0x1b0): undefined reference to `crc32'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In func
tion `png_calculate_crc':
png.c:(.text+0x1fc): undefined reference to `crc32'
png.c:(.text+0x228): undefined reference to `crc32'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(png.o): In func
tion `png_reset_zstream':
png.c:(.text+0xb98): undefined reference to `inflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In
function `png_create_read_struct_2':
pngread.c:(.text+0x134): undefined reference to `inflateInit_'
pngread.c:(.text+0x27c): undefined reference to `inflateInit_'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In
function `png_read_init_3':
pngread.c:(.text+0x4ac): undefined reference to `inflateInit_'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In
function `png_read_row':
pngread.c:(.text+0xfbc): undefined reference to `inflate'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngread.o): In
function `png_read_destroy':
pngread.c:(.text+0x1d24): undefined reference to `inflateEnd'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrtran.o): In
 function `png_build_gamma_table':
pngrtran.c:(.text+0x1258): undefined reference to `pow'
pngrtran.c:(.text+0x1470): undefined reference to `pow'
pngrtran.c:(.text+0x1518): undefined reference to `pow'
pngrtran.c:(.text+0x1630): undefined reference to `pow'
pngrtran.c:(.text+0x170c): undefined reference to `pow'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrtran.o):png
rtran.c:(.text+0x17f8): more undefined references to `pow' follow
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
 function `png_decompress_chunk':
pngrutil.c:(.text+0x334): undefined reference to `inflate'
pngrutil.c:(.text+0x43c): undefined reference to `inflateReset'
pngrutil.c:(.text+0x584): undefined reference to `inflateReset'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/libpng.a(pngrutil.o): In
 function `png_read_finish_row':
pngrutil.c:(.text+0x43d4): undefined reference to `inflate'
pngrutil.c:(.text+0x445c): undefined reference to `inflateReset'
pngrutil.c:(.text+0x44a4): undefined reference to `inflateReset'
collect2: ld returned 1 exit status
make: *** [sdi.elf] Error 1
swetland
Posts: 5
Joined: Sun Dec 31, 2006 3:06 am
Location: Mountain View, CA

Post by swetland »

Looks like you're missing zlib and libm.
pspwill
Posts: 51
Joined: Thu Nov 17, 2005 8:07 am

Post by pspwill »

Im not missing zlib but i dont know about libm.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Your LIBS line should be in this order:

Code: Select all

LIBS = -lpng -lz -lm
Post Reply