libsvg: fix undefined symbol png_set_gray_1_2_4_to_8
PATCH 1/1 libsvg: fix undefined symbol png_set_gray_1_2_4_to_8
Fixes the following runtime error e.g. from df_texture:
(!) Direct/Interface: Unable to dlopen `/usr/lib/directfb-1.6-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_svg.so'!
--> /usr/lib/libsvg.so.1: undefined symbol: png_set_gray_1_2_4_to_8
--- ...-undefined-symbol-png_set_gray_1_2_4_to_8.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch
package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 213e5749947fad08d985eda8d06839efedda78ef Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 5 Mar 2015 21:42:52 +0100 +Subject: [PATCH] Fix undefined symbol png_set_gray_1_2_4_to_8 + +Since libpng-1.4.0 the function png_set_gray_1_2_4_to_8() was +removed, the replacement function is called +png_set_expand_gray_1_2_4_to_8() (see [1]). + +[1] http://libpng.sourceforge.net/ANNOUNCE-1.4.0.txt + +Signed-off-by: Peter Seiderer <[email protected]> +--- + src/svg_image.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/svg_image.c b/src/svg_image.c +index cd8a95a..f256943 100755 +--- a/src/svg_image.c ++++ b/src/svg_image.c +@@ -271,7 +271,7 @@ _svg_image_read_png (const char *filename, + + /* expand gray bit depth if needed */ + if (color_type == PNG_COLOR_TYPE_GRAY && depth < 8) +- png_set_gray_1_2_4_to_8 (png); ++ png_set_expand_gray_1_2_4_to_8 (png); + + /* transform transparency to alpha */ + if (png_get_valid(png, info, PNG_INFO_tRNS)) +-- +2.1.4 +
Signature · 1 line
2.1.4
PATCH 1/1 libsvg: fix undefined symbol png_set_gray_1_2_4_to_8
Dear Peter Seiderer,
Quoted 10 lines · Peter Seiderer
Fixes the following runtime error e.g. from
df_texture:(!) Direct/Interface: Unable to dlopen `/usr/lib/directfb-1.6-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_svg.so'!
--> /usr/lib/libsvg.so.1: undefined symbol: png_set_gray_1_2_4_to_8Signed-off-by Peter Seiderer <[email protected]>--- ...-undefined-symbol-png_set_gray_1_2_4_to_8.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch
Thanks, I've applied your patch. However:
1/ libsvg is still severely broken. It uses symbols from libpng and
libjpeg, but it doesn't link against those libraries. The output of 'readelf -d' on libsvg says:
0x00000001 (NEEDED) Shared library: [libxml2.so.2] 0x00000001 (NEEDED) Shared library: [libc.so.0] 0x0000000e (SONAME) Library soname: [libsvg.so.1]
This means that if you try to compile an application with just '-lsvg', it doesn't build because the shared library doesn't express its dependency on other libraries. This is wrong.
The configure.in script also doesn't check for the presence of libjpeg and libpng. Bad.
2/ Isn't libsvg abandoned? Latest release in 2005. Same for
libsvg-cairo. DirectFB is apparently the only remaining user of this library. Is the latest version of DirectFB still using libsvg-cairo ?
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 libsvg: fix undefined symbol png_set_gray_1_2_4_to_8
Hello Thomas,
Quoted 30 lines
Gesendet: Donnerstag, 05. M?rz 2015 um 23:05 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Peter Seiderer" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v1] libsvg: fix undefined symbolpng_set_gray_1_2_4_to_8Dear Peter Seiderer,
Quoted 10 lines · Peter Seiderer
Fixes the following runtime error e.g. from
df_texture:(!) Direct/Interface: Unable to dlopen `/usr/lib/directfb-1.6-0/interfaces/IDirectFBImageProvider/libidirectfbimageprovider_svg.so'!
--> /usr/lib/libsvg.so.1: undefined symbol: png_set_gray_1_2_4_to_8Signed-off-by Peter Seiderer <[email protected]>--- ...-undefined-symbol-png_set_gray_1_2_4_to_8.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patchThanks, I've applied your patch. However:
1/ libsvg is still severely broken. It uses symbols from libpng and
libjpeg, but it doesn't link against those libraries. The output of 'readelf -d' on libsvg says:0x00000001 (NEEDED) Shared library: [libxml2.so.2] 0x00000001 (NEEDED) Shared library: [libc.so.0] 0x0000000e (SONAME) Library soname: [libsvg.so.1]
Quoted 7 lines
This means that if you try to compile an application with just '-lsvg', it doesn't build because the shared library doesn't express its dependency on other libraries. This is wrong.
The configure.in script also doesn't check for the presence of libjpeg and libpng. Bad.
Not good...
Quoted 5 lines
2/ Isn't libsvg abandoned? Latest release in 2005. Same for
libsvg-cairo. DirectFB is apparently the only remaining user of this library. Is the latest version of DirectFB still using libsvg-cairo ?
Yes, no changes regarding to this in DirectFB-1.7.7...
Regards,
Peter
Quoted 8 lines
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com