Cannot install PNGmeta
Boey Maun Suang
boeyms at macports.org
Sat Oct 13 06:42:32 PDT 2007
On 10/11/07, Martin Stadler <martin at standartimnetz.de> wrote:
> Error: Target org.macports.build returned: shell command " cd "/opt/
> local/var/macports/build/
> _opt_local_var_macports_sources_rsync.macports.org_release_ports_graph
> ic
> s_pngmeta/work/pngmeta-1.11" && make all " returned error 2
> Command output: gcc -DPACKAGE=\"pngmeta\" -DVERSION=\"1.11\" -
> DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DHAVE_PNG_CREATE_READ_STRUCT=1 -
> DHAVE_PNG_GET_TEXT=1 -I. -I. -I/opt/local/include -O2 -I/opt/
> local/include -I/opt/local/include -c pngmeta.c
> gcc -O2 -I/opt/local/include -I/opt/local/include -L/opt/local/lib -
> o pngmeta pngmeta.o -lpng -lz -L/opt/local/include -L/opt/local/
> include -lpng -L/opt/local/lib -lm -L/opt/local/lib
> /usr/bin/ld: Undefined symbols:
> _png_IDAT
> _png_IEND
> _png_IHDR
<snip />
After some experimentation and much puzzlement, it seems that it's a
failure on the part of the upstream developers to account for Mac OS
X conventions (not that I blame them if they've never received
feedback from Mac OS X build attempts).
The source seems to be require being statically against libpng and
libz, but the default on Mac OS X is to link dynamically (the output
above is it trying and failing; don't ask me why it doesn't work).
The normal solution of passing the -static flag to gcc doesn't work
(because up to 10.4, Mac OS X doesn't provide the necessary files --
see the gcc man page), but putting the paths to the static libraries
in place of the -l flags does (i.e. replacing "-lz" with "${prefix}/
lib/libz.a" and "-lpng" with "${prefix}/lib/libpng.a"). The program
then passes its internal "make check".
I can't see a nice way to patch the problem ourselves, though (I did
the above on the command line), so it would probably be best to ask
the upstream developer to fix this.
Kind regards,
Maun Suang
--
Boey Maun Suang (Boey is my surname)
Email: boeyms at macports dot org
More information about the macports-users
mailing list