Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 486382 - media-gfx/iscan-2.29.1.5 - ld: ../lib/.libs/libimage-stream.a(libimage_stream_la-pngstream.o): undefined reference to symbol 'png_set_longjmp_fn@@PNG16_0'
Summary: media-gfx/iscan-2.29.1.5 - ld: ../lib/.libs/libimage-stream.a(libimage_stream...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
: 497810 498336 (view as bug list)
Depends on: 498524
Blocks: underlinking
  Show dependency tree
 
Reported: 2013-09-28 21:36 UTC by Aaron Pelton
Modified: 2014-01-27 20:11 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.09 KB, text/plain)
2013-09-28 21:36 UTC, Aaron Pelton
Details
build.log (build.log,83.74 KB, text/plain)
2013-09-30 13:16 UTC, Aaron Pelton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Pelton 2013-09-28 21:36:17 UTC
Created attachment 359702 [details]
emerge --info

This seems to be very similar to https://bugs.gentoo.org/show_bug.cgi?id=481060.

emerging with: 
LDFLAGS="-Wl,-lpng16" emerge -1 iscan
works.

going out on a limb, perhaps the fact that multiple libraries/applications are affected suggest this has something to do with the dev tools (gcc/ld/...)?
Comment 1 Aaron Pelton 2013-09-28 21:37:26 UTC
(In reply to Aaron Pelton from comment #0)
Note this was discovered as part of a full world rebuild so everything should have been up to date...
Comment 2 Aaron Pelton 2013-09-28 22:16:54 UTC
(In reply to Aaron Pelton from comment #0)
I should also note this was the first attempt to build with libpng-1.6.6 installed, it would have last been built with 1.6.3-r1
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-30 13:14:03 UTC
Please attach the entire build log to this bug report.
Comment 4 Aaron Pelton 2013-09-30 13:16:54 UTC
Created attachment 359792 [details]
build.log
Comment 5 Todd Walter 2013-10-02 15:46:28 UTC
I have this as well, it occurs when using either ld.bfd or ld.gold.  Error is slightly different with ld.bfd; it outputs

 "x86_64-pc-linux-gnu/bin/ld: note: 'png_set_longjmp_fn@@PNG16_0' is defined in DSO /usr/lib64/libpng16.so.16 so try adding it to the linker command line"

after the undefined reference error.  Appears to be a legitimate complaint as while the -Include exists for libpng16 the -Link directive is missing during link.

Adding 'append-ldflags -lpng16' results in a successful compile.  Enabling it in config should have been sufficient so my SWAG is that the upstream make files are boned.
Comment 6 urcindalo 2014-01-06 20:14:35 UTC
Now that libpng-1.6.8 is stable for amd64, I stumbled upon this build error when rebuilding iscan. I had to USE="-png" to be able to rebuild it (amd64 or ~amd64 versions):
=======
mv -f .deps/iscan-pisa_view_manager.Tpo .deps/iscan-pisa_view_manager.Po
/bin/sh ../libtool  --tag=CXX   --mode=link x86_64-pc-linux-gnu-g++ -D_REENTRANT -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -D_REENTRANT -I/usr/include/gimp-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libdrm -I/usr/include/libpng16  -march=native -O2 -pipe -D_GNU_SOURCE  -Wl,-O1 -Wl,--as-needed -o iscan iscan-file-selector.o iscan-pisa_aleart_dialog.o iscan-pisa_change_unit.o iscan-pisa_configuration.o iscan-pisa_error.o iscan-pisa_gamma_correction.o iscan-pisa_gimp.o iscan-pisa_image_controls.o iscan-pisa_img_converter.o iscan-pisa_main.o iscan-pisa_main_window.o iscan-pisa_marquee.o iscan-pisa_preference.o iscan-pisa_preview_window.o iscan-pisa_progress_window.o iscan-pisa_sane_scan.o iscan-pisa_scan_manager.o iscan-pisa_scan_selector.o iscan-pisa_scan_tool.o iscan-pisa_settings.o iscan-pisa_tool.o iscan-pisa_view_manager.o iscan-xpm_data.o ../lib/libimage-stream.la -lsane -lltdl -lgtk-x11-2.0 -lgdk-x11-2.0  -lgobject-2.0 -lglib-2.0 ../non-free/libesmod.so -lsane -lusb 
libtool: link: x86_64-pc-linux-gnu-g++ -D_REENTRANT -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -D_REENTRANT -I/usr/include/gimp-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libdrm -I/usr/include/libpng16 -march=native -O2 -pipe -D_GNU_SOURCE -Wl,-O1 -o iscan iscan-file-selector.o iscan-pisa_aleart_dialog.o iscan-pisa_change_unit.o iscan-pisa_configuration.o iscan-pisa_error.o iscan-pisa_gamma_correction.o iscan-pisa_gimp.o iscan-pisa_image_controls.o iscan-pisa_img_converter.o iscan-pisa_main.o iscan-pisa_main_window.o iscan-pisa_marquee.o iscan-pisa_preference.o iscan-pisa_preview_window.o iscan-pisa_progress_window.o iscan-pisa_sane_scan.o iscan-pisa_scan_manager.o iscan-pisa_scan_selector.o iscan-pisa_scan_tool.o iscan-pisa_settings.o iscan-pisa_tool.o iscan-pisa_view_manager.o iscan-xpm_data.o ../non-free/libesmod.so  -Wl,--as-needed ../lib/.libs/libimage-stream.a /usr/lib64/libltdl.so -ldl -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lglib-2.0 -lsane -lusb -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/.libs/libimage-stream.a(libimage_stream_la-pngstream.o): undefined reference to symbol 'png_set_longjmp_fn@@PNG16_0'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'png_set_longjmp_fn@@PNG16_0' is defined in DSO /usr/lib64/libpng16.so.16 so try adding it to the linker command line
/usr/lib64/libpng16.so.16: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [iscan] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-gfx/iscan-2.26.2/work/iscan-2.26.2/frontend'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/iscan-2.26.2/work/iscan-2.26.2'
make: *** [all] Error 2
emake failed
 * ERROR: media-gfx/iscan-2.26.2::gentoo failed (compile phase):
 *   emake failed
Comment 7 Joe Breuer 2014-01-10 08:31:20 UTC
Exactly the same happened to me during the merge that would upgrade to libpng 1.6 (my previously installed iscan-2.28.1.3 was still linked against libpng15.so.15).

The workaround using
  LDFLAGS="-Wl,-lpng16"
also works here.

I think there's enough information already in this bug report; if you still think my build log / emerge info / ... would help just ask.
Comment 8 Specktrich Fleckmann 2014-01-11 13:59:34 UTC
Same here after upgrading from libpng 1.5 to version 1.6. Using LDFLAGS="-Wl,-lpng16" workaround it compiles.
Comment 9 Pacho Ramos gentoo-dev 2014-01-11 20:51:35 UTC
*** Bug 497810 has been marked as a duplicate of this bug. ***
Comment 10 Matteo Modesti 2014-01-19 15:48:32 UTC
Hello,
I'm stuck with the same issue. I found this interesting link
http://stackoverflow.com/questions/9934549/very-strange-linker-behavior
which probably points out the problem: the parameters' order.

I just tried using LDFLAGS="-Wl,-lpng16" workaround, so I'm wondering why it hasn't already been included in a -r1 ebuild.

Also, 2.29.3.1 is out ( #498524 ) and maybe it solves the issue.
Comment 11 Matteo Modesti 2014-01-19 15:49:08 UTC
(In reply to Matteo Modesti from comment #10)
> Hello,
> I'm stuck with the same issue. I found this interesting link
> http://stackoverflow.com/questions/9934549/very-strange-linker-behavior
> which probably points out the problem: the parameters' order.
> 
> I just tried using LDFLAGS="-Wl,-lpng16" workaround, so I'm wondering why it
> hasn't already been included in a -r1 ebuild.
> 
> Also, 2.29.3.1 is out ( #498524 ) and maybe it solves the issue.

I obviously meant bug #498524 ( https://bugs.gentoo.org/show_bug.cgi?id=498524 )
Comment 12 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-20 14:37:09 UTC
*** Bug 498336 has been marked as a duplicate of this bug. ***
Comment 13 Ian Stakenvicius (RETIRED) gentoo-dev 2014-01-27 20:11:22 UTC
this annoyed me too much -- fixed all in-tree ebuilds.

+  27 Jan 2014; Ian Stakenvicius <axs@gentoo.org>
+  +files/iscan-2.26.2-png-libs.patch, +files/iscan-2.29.1-png-libs.patch,
+  iscan-2.26.2.ebuild, iscan-2.29.1.5.ebuild:
+  fixed build failures against libpng-1.6, bug 486382