Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137042 - x11-misc/xvidcap-1.1.3-r4 doesn't compile w/ libpng-1.2.10
Summary: x11-misc/xvidcap-1.1.3-r4 doesn't compile w/ libpng-1.2.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
: 137230 137972 142403 (view as bug list)
Depends on: 146117
Blocks: 138736
  Show dependency tree
 
Reported: 2006-06-16 17:11 UTC by Aidan Thornton
Modified: 2006-09-03 04:30 UTC (History)
10 users (show)

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


Attachments
patch (libpng.patch,858 bytes, patch)
2006-07-16 18:43 UTC, basic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aidan Thornton 2006-06-16 17:11:10 UTC
I encountered some errors related to libpng when trying to compile xvidcap-1.1.3-r4  to compile. (I am usning media-libs/libpng-1.2.10

First, I got the error:

mngutil.c:36: error: conflicting types for 'png_save_uint_16'
/usr/include/png.h:2633: error: previous declaration of 'png_save_uint_16' was here
mngutil.c:36: error: conflicting types for 'png_save_uint_16'
/usr/include/png.h:2633: error: previous declaration of 'png_save_uint_16' was here

This is because the prototype in mngutil.c has the second argument of png_save_uint_16 as type "png_uint_16", whereas png.h has it as type "unsigned int" ("to avoid potential problems on pre-ANSI C compilers", according to the comments).

Secondly, once this is fixed, the link fails:

i686-pc-linux-gnu-gcc -DVERSION=\"1.1.3\"   -O2 -march=athlon64 -pipe -lpthread    -o xvidcap -lpthread   xvidcap-main.o xvidcap-xt_control.o xvidcap-options.o xvidcap-xt_options.o xvidcap-colors.o xvidcap-util.o xvidcap-frame.o xvidcap-xt_frame.o xvidcap-capture.o xvidcap-xtoxwd.o xvidcap-xtopnm.o xvidcap-mngutil.o xvidcap-xtomng.o xvidcap-xutil.o xvidcap-job.o xvidcap-video.o    xvidcap-xtoffmpeg.o xvidcap-xtojpg.o xvidcap-xtopng.o  ../Xw/libXw.a   -lavformat -lavcodec -ljpeg -lpng -lz  -lXmu -lXext  -lSM -lICE
xvidcap-mngutil.o: In function `mng_write_sig':
mngutil.c:(.text+0x29): undefined reference to `png_write_data'
collect2: ld returned 1 exit status

Indeed, "nm -S" says that libpng.so doesn't export the symbol png_write_data, probably because it's marked PNG_EXTERN and this isn't exported by default - see pngconf.h. This means xvidcap probably needs its own private build of libpng with these symbols marked for export...
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-19 00:14:38 UTC
*** Bug 137230 has been marked as a duplicate of this bug. ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-06-25 15:30:50 UTC
*** Bug 137972 has been marked as a duplicate of this bug. ***
Comment 3 Daniel Black (RETIRED) gentoo-dev 2006-06-29 06:12:53 UTC
note libpng security bug 138433 that will probably result in a rapid stabilization.
Comment 4 basic 2006-07-16 18:43:37 UTC
Created attachment 91945 [details, diff]
patch

remove png prototypes
steal png_write_data from libpng 1.2.12
Comment 5 codyzapp 2006-07-20 04:23:50 UTC
patch didnt work for me..
Comment 6 Simon Vargblom 2006-07-23 10:01:18 UTC
new release, havent been able to compile this for almost 3 months now... hope the new one does! :)
https://sourceforge.net/project/showfiles.php?group_id=81535
Comment 7 Albert Zeyer 2006-07-23 12:26:47 UTC
Same error here (and on all of my plattforms and they are very different systems; this is my PPC ibook now, but got the same on AMD64 and on all x86 here):
...
then mv -f ".deps/xvidcap-mngutil.Tpo" ".deps/xvidcap-mngutil.Po"; \
else rm -f ".deps/xvidcap-mngutil.Tpo"; exit 1; \
fi
mngutil.c:36: error: conflicting types for 'png_save_uint_16'
/usr/include/png.h:2640: error: previous declaration of 'png_save_uint_16' was here
make[2]: *** [xvidcap-mngutil.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/xvidcap-1.1.3-r4/work/xvidcap-1.1.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/xvidcap-1.1.3-r4/work/xvidcap-1.1.3'
make: *** [all] Error 2

!!! ERROR: x11-misc/xvidcap-1.1.3-r4 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  xvidcap-1.1.3-r4.ebuild, line 63:   Called die

!!! Compilation failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

This is libpng with it installed version:
* media-libs/libpng
     Available versions:  1.2.8-r1 ~1.2.10 1.2.12 ~1.2.12-r1
     Installed:           1.2.12
     Homepage:            http://www.libpng.org/
     Description:         Portable Network Graphics library

I tried to install libpng-1.2.8-r1 to avoid the error. It works great.
I only got another error of an unresolved function in cairo, because cairo was linked against the new libpng-1.2.12, so I recompiled cairo and then I got a working xvidcap in the end.

But it is no real solution, because other packages depend on newer versions of libpng.

I hope this got fixed soon. It should be a simple patch of mngutil.c.
Comment 8 Albert Zeyer 2006-07-23 13:19:38 UTC
Patch also works for me, thanks.
Comment 9 Krzysztof Pawlik (RETIRED) gentoo-dev 2006-07-29 08:12:32 UTC
1.1.4_pre3 in portage.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2006-08-01 03:39:23 UTC
*** Bug 142403 has been marked as a duplicate of this bug. ***