Subject: Re: Linking statically against GraphicsMagick: problems with libxml2 and libpng
From: marco atzeri <[email-masked]>
To: [email-masked]
Cc: Dmitry Katsubo <[email-masked]>
Date: Tue, 5 Apr 2011 00:46:04 +0200
List-Id: <cygwin.cygwin.com>

2011/4/5 Dmitry Katsubo
> Dear CygWin users / developers!
>
> While trying to link statically my application against GraphicsMagick

why not dynamic ?

> under CygWin, but I suffer from few minor problems during linking.
>
> To discover the library list, needed for static linking, I use
> "GraphicsMagick++-config --libs":
>
>> configure:7259: g++ -o conftest.exe -g -O2 -I/usr/include/GraphicsMagick -L/usr/lib -static-libgcc -Wl,-static conftest.cpp -lGraphicsMagick -lGraphicsMagick++  -lGraphicsMagick++ -lGraphicsMagick -ljbig -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -lwmflite -lXext -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lgdi32 -lm -lpthread -lltdl -lm >&5
>> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lxml2
>> /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lpng
>
> * The package libxml2-devel is installed, but in my opinion is missing
> the libxml2.a file:
>
> $ ll /lib/libxml*
> 1122076 May 12  2010 /lib/libxml2.dll.a
>    927 May 12  2010 /lib/libxml2.la

it seems that libxml2-devel package is missing the static option.

>
> * The package libpng12-devel is installed, but there is no symlink
> libpng.a -> libpng12.a. So I think GraphicsMagick should be linked
> either against libpng12 or libpng14:
>

GraphicsMagick  is linked versus libpng14

$ cygcheck  cygGraphicsMagick-3.dll |grep png
  E:\cygwin2\bin\cygpng14-14.dll

> $ ll /lib/libpng*
> 294592 Aug  8  2010 /lib/libpng12.a
> 217944 Aug  8  2010 /lib/libpng12.dll.a

$ cygcheck -l libpng14-devel |grep png\.a
/usr/lib/libpng.a

>
> Does it sound reasonable? If yes, what is the best way to report these
> two bugs?
>
> Additional info:
> libxml2-devel           2.7.7-1
> libpng12-devel          1.2.44-1
> libGraphicsMagick-devel 1.3.12-2
> gcc4-g++                4.3.4-4

one is a missing functionality and there other is not a bug ;-)

>
> --
> With best regards,
> Dmitry
>

Regards
Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple