Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 136346

Summary: net-print/cups-1.1.23-r7 does not compile with media-libs/libpng-1.2.10
Product: Gentoo Linux Reporter: Friedrich Oslage (RETIRED) <bluebird>
Component: [OLD] PrintingAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: normal CC: ag, ehmsen, rob, t3hdrew
Priority: High    
Version: 2006.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 138736    
Attachments: cups-1.1.23-image-png.patch
cups-1.1.23-r8.ebuild
cups-1.1.23-r8.ebuild

Description Friedrich Oslage (RETIRED) gentoo-dev 2006-06-10 17:27:53 UTC
Emerging net-print/cups-1.1.23-r7 while media-libs/libpng-1.2.10 is installed results in:

Linking imagetops...
Linking rastertoepson...
Linking rastertohp...
../filter/libcupsimage.so: undefined reference to `png_read_destroy'
collect2: ld gab 1 als Ende-Status zur
Comment 1 Friedrich Oslage (RETIRED) gentoo-dev 2006-06-10 17:27:53 UTC
Emerging net-print/cups-1.1.23-r7 while media-libs/libpng-1.2.10 is installed results in:

Linking imagetops...
Linking rastertoepson...
Linking rastertohp...
../filter/libcupsimage.so: undefined reference to `png_read_destroy'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [rastertoepson] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...
../filter/libcupsimage.so: undefined reference to `png_read_destroy'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [imagetops] Fehler 1
../filter/libcupsimage.so: undefined reference to `png_read_destroy'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [rastertohp] Fehler 1
../filter/libcupsimage.so: Error reference to `png_read_destroy'
collect2: ld gab 1 als Ende-Status zurück
make[1]: *** [rastertodymo] Fehler 1
make: *** [all] Fehler 1

(There's no png_read_destory in /usr/include/png.h in libpng-1.2.8-r1 there was)

Downgrading to libpng-1.2.8-r1 works for me.
Comment 2 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-11 11:53:17 UTC
you can try upgrading to cups-1.2.1 :)
I think it is stable enough, but we still need to write an upgrade guide.
Comment 3 Rob Couto 2006-06-12 08:03:44 UTC
got an explanation here:
http://mail-index.netbsd.org/pkgsrc-users/2006/04/17/0000.html

box ~ # cd /usr/lib
box lib # ls -l libpng*
lrwxrwxrwx 1 root root     10 Jun 11 21:46 libpng.a -> libpng12.a
lrwxrwxrwx 1 root root     11 Jun 11 21:46 libpng.la -> libpng12.la
lrwxrwxrwx 1 root root     11 Jun 11 21:46 libpng.so -> libpng12.so
lrwxrwxrwx 1 root root     16 Jun 11 21:46 libpng.so.3 -> libpng.so.3.10.0
-rwxr-xr-x 1 root root 152012 Jun 11 21:46 libpng.so.3.10.0
-rw-r--r-- 1 root root 178002 Jun 11 21:46 libpng12.a
-rw-r--r-- 1 root root    804 Jun 11 21:46 libpng12.la
lrwxrwxrwx 1 root root     18 Jun 11 21:46 libpng12.so -> libpng12.so.0.10.0
lrwxrwxrwx 1 root root     18 Jun 11 21:46 libpng12.so.0 -> libpng12.so.0.10.0
-rwxr-xr-x 1 root root 142656 Jun 11 21:46 libpng12.so.0.10.0
box lib # rm libpng.so
box lib # ln -s libpng.so.3.10.0 libpng.so

manually recreating the /usr/lib/libpng.so symlink worked for me.
Comment 4 moesasji 2006-06-13 22:39:42 UTC
Compiling the Gimp compiles with the same error, see bug 136346
The solution given in comment #2 does not solve it there. 
So I guess a better solution needs to be found. 
Comment 5 Rob Couto 2006-06-14 09:07:59 UTC
Ah, great... confirmed the gimp problem. I found gimp linking against libpng12.so and thought it was maybe that library, but... there was <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1474685&group_id=5624&atid=105624">this bug</a> for libpng, now it seems both gimp and cups should be patched to no longer use those functions.
Comment 6 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-14 17:06:43 UTC
I have done the following:

- unmasked cups-1.2 which works with the new libpng
- made the depend <media-libs/libpng-1.2.10 in cups-1.1 so that you can downgrade if needed :)
Comment 7 Stefan Schweizer (RETIRED) gentoo-dev 2006-06-15 00:49:49 UTC
*** Bug 136857 has been marked as a duplicate of this bug. ***
Comment 8 Stefan Schweizer (RETIRED) gentoo-dev 2006-07-03 09:06:50 UTC
reopen. kojiro will provide a patch. We would appreciate some testing :)
Comment 9 michael@smith-li.com 2006-07-03 09:13:23 UTC
Created attachment 90787 [details, diff]
cups-1.1.23-image-png.patch

Very simply replaces the deprecated 
  png_read_destroy(pp, info, NULL);
with the new
  png_destroy_read_struct(&pp, &info, NULL);
Comment 10 michael@smith-li.com 2006-07-03 09:14:13 UTC
Created attachment 90788 [details]
cups-1.1.23-r8.ebuild

adds a line to epatch cups-1.1.23-image-png.patch
Comment 11 michael@smith-li.com 2006-07-03 09:30:39 UTC
Created attachment 90790 [details]
cups-1.1.23-r8.ebuild

Improved ebuild with proper >=media-libs/libpng-1.2.10 dependency
Comment 12 Stefan Schweizer (RETIRED) gentoo-dev 2006-07-03 09:59:17 UTC
ok, I have committed it to the current ebuild. No revision bump, because it is just a buildfix
Comment 13 Ian Stakenvicius 2006-07-03 10:47:04 UTC
Uhh - the patch changes the source, isn't cups going to have to be rebuilt in order to make sure it works with the new libpng??  ..and won't this only happen if we do a revision bump?
Comment 14 Stefan Schweizer (RETIRED) gentoo-dev 2006-07-03 11:21:35 UTC
thanks ian, I added a revision bump now :)