Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137059 - x11-misc/electricsheep-2.6.7 fails to compile with libpng-1.2.10
Summary: x11-misc/electricsheep-2.6.7 fails to compile with libpng-1.2.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
: 138555 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-17 02:08 UTC by Rob Couto
Modified: 2006-07-04 02:05 UTC (History)
3 users (show)

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


Attachments
libpng-1.2.10.patch (libpng-1.2.10.patch,1.26 KB, patch)
2006-07-03 08:43 UTC, Ed Catmur
Details | Diff
libpng-1.2.10.patch (libpng-1.2.10.patch,3.51 KB, patch)
2006-07-03 09:00 UTC, Ed Catmur
Details | Diff
electricsheep-2.6.7 ebuild patch to include Ed's source code patch (electricsheep-2.6.7.ebuild.patch,692 bytes, patch)
2006-07-03 17:45 UTC, Mike Nerone
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Couto 2006-06-17 02:08:26 UTC
This is just another instance of the compilation problem recently fixed in gimp-2.2.1x and appeared in cups 1.1x but was apparently already fixed in cups-1.2x. 

Build conditions and errors are nearly the same as in:
http://bugs.gentoo.org/show_bug.cgi?id=136346

I followed the new patch for gimp-2.2.11-r1 (/usr/portage/media-gfx/gimp/files/gimp-2.2.11-libpng-1.2.10.patch) to create this, which allows me to compile but *probably creates a memory leak* as I don't actually know what i'm doing. :) I'm less worried about the flam3 hack as it took the change predictably. However, compiling mpeg2dec with the same syntax resulted in a warning about an incompatible pointer type and stopped the build, so I used brute force. It's most likely broken, even though i can run mpeg2dec_onroot afterward without errors.

Ugly hack:

--- electricsheep-2.6.7/mpeg2dec/libvo/video_out_x11.c.orig     2006-06-17 03:19:02.000000000 -0400
+++ electricsheep-2.6.7/mpeg2dec/libvo/video_out_x11.c  2006-06-17 03:34:50.000000000 -0400
@@ -271,7 +271,7 @@
   for (y = 0 ; y < info_ptr->height ; y++)
     free (png_image[y]);
   free (png_image);
-  png_read_destroy (png_ptr, info_ptr, (png_info *)0);
+  png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
   free (png_ptr);
   free (info_ptr);

--- electricsheep-2.6.7/flam3/png.c.orig        2005-07-20 02:06:16.000000000 -0400
+++ electricsheep-2.6.7/flam3/png.c     2006-06-17 03:17:14.000000000 -0400
@@ -155,7 +155,7 @@
   for (y = 0 ; y < info_ptr->height ; y++)
     free (png_image[y]);
   free (png_image);
-  png_read_destroy (png_ptr, info_ptr, (png_info *)0);
+  png_destroy_read_struct (&png_ptr, &info_ptr, (png_info *)0);
   free (png_ptr);
   free (info_ptr);
Comment 1 Marien Zwart (RETIRED) gentoo-dev 2006-06-21 04:52:22 UTC
As far as I can tell the "incompatible pointer type" is because that third argument should be a png_info** or png_infopp, not a png_info* or png_infop. With that it compiles ok, but I'm not sure yet if there are no memory management issues (haven't found an accurate description of the difference between png_read_destroy and png_destroy_read_struct in man libpng).
Comment 2 Daniel Black (RETIRED) gentoo-dev 2006-06-28 18:55:26 UTC
for completeness:
make  all-recursive
make[1]: Entering directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7'
Making all in flam3
make[2]: Entering directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7/flam3'
make  all-am
make[3]: Entering directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7/flam3'
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3-palettes.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c jpeg.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c png.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3-animate.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c docstring.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3-genome.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3-render.c
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.     -march=athlon-xp -O2 -pipe -c flam3-convert.c
rm -f libflam3.a
ar cru libflam3.a flam3.o flam3-palettes.o jpeg.o png.o
i686-pc-linux-gnu-ranlib libflam3.a
i686-pc-linux-gnu-gcc  -march=athlon-xp -O2 -pipe  -Wl,--as-needed -o flam3-genome  flam3-genome.o docstring.o libflam3.a -lm -ljpeg -lexpat -lpng -lz
i686-pc-linux-gnu-gcc  -march=athlon-xp -O2 -pipe  -Wl,--as-needed -o flam3-render  flam3-render.o docstring.o libflam3.a -lm -ljpeg -lexpat -lpng -lz
i686-pc-linux-gnu-gcc  -march=athlon-xp -O2 -pipe  -Wl,--as-needed -o flam3-animate  flam3-animate.o docstring.o libflam3.a -lm -ljpeg -lexpat -lpng -lz
libflam3.a(png.o): In function `read_png':
png.c:(.text+0x440): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[3]: *** [flam3-genome] Error 1
make[3]: *** Waiting for unfinished jobs....
libflam3.a(png.o): In function `read_png':
png.c:(.text+0x440): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[3]: *** [flam3-render] Error 1
libflam3.a(png.o): In function `read_png':
png.c:(.text+0x440): undefined reference to `png_read_destroy'
collect2: ld returned 1 exit status
make[3]: *** [flam3-animate] Error 1
make[3]: Leaving directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7/flam3'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7/flam3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/electricsheep-2.6.7/work/electricsheep-2.6.7'
make: *** [all] Error 2

Portage 2.1.1_pre1-r5 (!/home/dan/gentoo/gentoo-x86/profiles/hardened/x86/2.6, gcc-3.4.6/hardened, glibc-2.3.6-r4, 2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 AMD Athlon(tm)
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect cvs digest keepwork metadata-transfer nostrip sandbox sfperms sign strict stricter test userpriv usersandbox verify-rdepend"
GENTOO_MIRRORS=""
LDFLAGS=" -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/dan/gentoo/gentoo-x86"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X aac acpi alsa avi bash-completion berkdb bitmap-fonts bzip2 caps crypt cups curl divx4linux dlloader ecc encode ethereal extensions fastcgi fla flac fortran gd gmp gnutls gphoto2 gstreamer gtk gtk2 hardened hpn i8x0 ilbc imagemagick imlib ipv6 javacomm jpeg kde kdeenablefinal kerberos libgda lzo mbox mmx mp3 mpeg multitarget mysql nptl nptlonly ntlm ogg oggvorbis openal opengl operanom2 pam perl php pic png postgres ppds python qt quicktime readline samba sdl sguil slp smime socks5 sox spell sse ssl tiff true-type truetype type1-fonts usb userlocales vhosts vorbis x86 xine xinerama xml xml2 xorg zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS


Marien are you sure?
media-libs/libpng-1.2.10
fgrep -A 2 png_read_destroy  /usr/include/libpng12/pngconf.h /usr/include/libpng12/png.h  /usr/include/png.h /usr/include/pngconf.h
/usr/include/libpng12/png.h:extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
/usr/include/libpng12/png.h-   png_infop end_info_ptr));
/usr/include/libpng12/png.h-
--
/usr/include/png.h:extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
/usr/include/png.h-   png_infop end_info_ptr));

Comment 3 Daniel Black (RETIRED) gentoo-dev 2006-06-28 19:30:46 UTC
reported upstream
Comment 4 Daniel Black (RETIRED) gentoo-dev 2006-06-28 23:43:15 UTC
notified by upstream maintainers. They have fixed this and will issue a new release soon.

I've changed the 2.6.7 version of electricsheep to work only with libpng-1.2.8*

Please give me a note (here will do) when you see 2.6.8 released.

Thanks Rob
Comment 5 sirpreis 2006-06-30 00:22:06 UTC
*** Bug 138555 has been marked as a duplicate of this bug. ***
Comment 6 Ed Catmur 2006-07-03 08:43:24 UTC
Created attachment 90784 [details, diff]
libpng-1.2.10.patch

Patch from upstream.
Comment 7 Ed Catmur 2006-07-03 09:00:26 UTC
Created attachment 90786 [details, diff]
libpng-1.2.10.patch

Full patch.
Comment 8 Mike Nerone 2006-07-03 17:45:05 UTC
Created attachment 90818 [details, diff]
electricsheep-2.6.7 ebuild patch to include Ed's source code patch

Confirmed that Ed's fix works. Attached is a patch to the ebuild to include it (name his patch "electricsheep-2.6.7-libpng-2.6.10.patch" in filesdir). It would be nice to fix this in 2.6.7 instead of having to wait for 2.6.8.
Comment 9 Daniel Black (RETIRED) gentoo-dev 2006-07-04 02:05:47 UTC
Thanks Ed and Mike - electricsheep-2.6.7-r1 added with patch.