libpng dependency issue

Roderick Colenbrander thunderbird2k at gmail.com
Wed Feb 3 05:05:09 CST 2010


On Wed, Feb 3, 2010 at 11:57 AM, Luca Bennati <lucak3 at gmail.com> wrote:
>
>
> 2010/2/3 Luca Bennati <lucak3 at gmail.com>
>
>>
>> LD_LIBRARY_PATH="../../libs/wine:$LD_LIBRARY_PATH" ../../tools/wrc/wrc
>> --nostdinc -I. -I. -I../../include -I../../include  -D__WINESRC__
>> -foversion.res version.rc
>> ../../tools/winegcc/winegcc  -B../../tools/winebuild --sysroot=../..
>> -shared ./windowscodecs.spec bmpdecode.o bmpencode.o clsfactory.o
>> converter.o gifformat.o icoformat.o imgfactory.o info.o jpegformat.o main.o
>> palette.o pngformat.o propertybag.o regsvr.o stream.o ungif.o
>> version.res    -o windowscodecs.dll.so  -luuid -lole32 -ladvapi32
>> -lkernel32  ../../libs/port/libwine_port.a
>> pngformat.o: In function `PngFrameEncode_Commit':
>> /home/luca/wine-git/dlls/windowscodecs/pngformat.c:987: undefined
>> reference to `png_set_longjmp_fn'
>> pngformat.o: In function `PngEncoder_Initialize':
>> /home/luca/wine-git/dlls/windowscodecs/pngformat.c:1119: undefined
>> reference to `png_set_longjmp_fn'
>> pngformat.o: In function `PngFrameEncode_WritePixels':
>> /home/luca/wine-git/dlls/windowscodecs/pngformat.c:861: undefined
>> reference to `png_set_longjmp_fn'
>> pngformat.o: In function `PngDecoder_Initialize':
>> /home/luca/wine-git/dlls/windowscodecs/pngformat.c:252: undefined
>> reference to `png_set_longjmp_fn'
>> collect2: ld returned 1 exit status
>>
>> I will now investigate this new one
>
> I didn't find a clear answer as code seemed ok, so i tried to issue the
> command:
> ../../tools/winegcc/winegcc  -B../../tools/winebuild --sysroot=../.. -shared
> ./windowscodecs.spec bmpdecode.o bmpencode.o clsfactory.o converter.o
> gifformat.o icoformat.o imgfactory.o info.o jpegformat.o main.o palette.o
> pngformat.o propertybag.o regsvr.o stream.o ungif.o    version.res    -o
> windowscodecs.dll.so  -luuid -lole32 -ladvapi32 -lkernel32
> ../../libs/port/libwine_port.a
> adding a simple -lpng:
> ../../tools/winegcc/winegcc  -B../../tools/winebuild --sysroot=../.. -shared
> ./windowscodecs.spec bmpdecode.o bmpencode.o clsfactory.o converter.o
> gifformat.o icoformat.o imgfactory.o info.o jpegformat.o main.o palette.o
> pngformat.o propertybag.o regsvr.o stream.o ungif.o    version.res    -o
> windowscodecs.dll.so  -luuid -lole32 -ladvapi32 -lkernel32 -lpng
> ../../libs/port/libwine_port.a
> and it magically works ok
>
> so the previous patch just has to add png to the imports in Makefile.in to
> make it work
> Should i send the now correct patch?
>

We are loading png dynamically and we want to keep doing that. Figure
out where the longjmp call comes from (perhaps it is some macro or so
in the png code). We might have to dynamically load the function..

Regarding that gray conversion function. The only thing that changed
is the name of the function the prototype and its behavior looks
similar. I'm not sure how we want to fix it. For instance it can be
fixed at compile time by checking the png version (I believe png.h
defines it) or it can be done at runtime by checking if the old
function is around and if it isn't try to load the new function.

Roderick



More information about the wine-devel mailing list