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...
*** Bug 137230 has been marked as a duplicate of this bug. ***
*** Bug 137972 has been marked as a duplicate of this bug. ***
note libpng security bug 138433 that will probably result in a rapid stabilization.
Created attachment 91945 [details, diff] patch remove png prototypes steal png_write_data from libpng 1.2.12
patch didnt work for me..
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
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.
Patch also works for me, thanks.
1.1.4_pre3 in portage.
*** Bug 142403 has been marked as a duplicate of this bug. ***