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/...)?
(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...
(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
Please attach the entire build log to this bug report.
Created attachment 359792 [details] build.log
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.
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
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.
Same here after upgrading from libpng 1.5 to version 1.6. Using LDFLAGS="-Wl,-lpng16" workaround it compiles.
*** Bug 497810 has been marked as a duplicate of this bug. ***
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.
(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 )
*** Bug 498336 has been marked as a duplicate of this bug. ***
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