List Info

Thread: libpng fails to link on Mac OS X (intel)




libpng fails to link on Mac OS X (intel)
user name
2006-05-25 19:12:13
Hello,
libpng 1.2.10 is failing to link on my Mac OS X 10.4
(intel).  Can  
someone help me?

I took a quick look in the png code to see if I could figure
out the  
problem, and I found where some of these symbols are defined
and  
used, but its a bit too complex for me to try to dive into.

(Background:  Why I want to build libpng:  To use it in a
project for  
producing images of math equations from LaTeX... see http://

www.myphysicslab.com/gladtex.html)

I have been generally following build instructions I found
here:
http://www.paginar.net/matias/articles/gd_x_howto.ht
ml#sct06

Here are the steps I have taken:
1. download and extract zlib 1.2.3 and libpng 1.2.10
2. build zlib
3. copy the libpng/scripts/makefile.darwin to
libpng/makefile
4. edit libpng/makefile to give correct location of zlib
5. build libpng by giving the "make" command
inside the libpng  
directory.

Result:  All of the .c files successfully compiled.  But
there are  
link errors on 4 undefined symbols.

[537:erikn ~/Documents/libpng-1.2.10]$ make
cc -dynamiclib \
-install_name /usr/local/lib/libpng12.0.dylib \
-current_version 0.1.2.10 -compatibility_version 0.1.2.10 \
-o libpng12.0.1.2.10.dylib \
png.pic.o pngset.pic.o pngget.pic.o pngrutil.pic.o
pngtrans.pic.o  
pngwutil.pic.o pngread.pic.o pngrio.pic.o pngwio.pic.o
pngwrite.pic.o  
pngrtran.pic.o pngwtran.pic.o pngmem.pic.o pngerror.pic.o  
pngpread.pic.o -L../zlib-1.2.3 -lz
ld: Undefined symbols:
_png_mmx_support
_png_combine_row
_png_do_read_interlace
_png_read_filter_row
/usr/bin/libtool: internal link edit command failed
make: *** [libpng12.0.1.2.10.dylib] Error 1

Thanks in advance for any help.

Regards,
--Erik Neumann



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the
Cost and Risk!
Fully trained technicians. The highest number of Red Hat
certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement
libpng fails to link on Mac OS X (intel)
user name
2006-05-25 23:30:52
From: Erik Neumann
>1. download and extract zlib 1.2.3 and libpng 1.2.10
>2. build zlib
>3. copy the libpng/scripts/makefile.darwin to
libpng/makefile 

I believe that makefile assumes (implicitly) a non x86
target.

It is necessary to install zlib at step (2) if you are
building
a shared library zlib.  Try replacing steps 3..5 with:

3) cd libpng-1.2.10; ./configure
  (you may need to pass arguments to configure to say where
zlib
   is installed if it can't find it)
4) make DESTDIR=<whereever> install

>cc -dynamiclib \
>-install_name /usr/local/lib/libpng12.0.dylib
-current_version 0.1.2.10
>-compatibility_version 0.1.2.10 -o
libpng12.0.1.2.10.dylib

Those are the wrong library names anyway (I believe they
should be:
-current_version 0.10 -compatibility_version 0.0, or
something like
that...)  This is an (additional) problem in
makefile.darwin.

John Bowler <jbowleracm.org>



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the
Cost and Risk!
Fully trained technicians. The highest number of Red Hat
certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )