ffmpeg appears to fail to configure when the ZVBI option is enabled: ===> Configuring for ffmpeg-2.8.6,1 ERROR: libzvbi not found On initial investigation, it appears that ZVBI requires libiconv to function It appears this could be conditionally added via CONFIGURE_ARGS using: --extra-libs=-liconv Reported by: VVD (via #bsdports IRC) Pending * Full build log (as attachment) * config.log (as attachment)
Created attachment 166643 [details] ffmpeg build log
Created attachment 166644 [details] multimedia/ffmpeg/work/ffmpeg-2.8.6/config.log # grep libzvbi.so config.log /usr/local/lib/libzvbi.so: undefined reference to `libiconv' /usr/local/lib/libzvbi.so: undefined reference to `libiconv_open' /usr/local/lib/libzvbi.so: undefined reference to `libiconv_close'
Created attachment 166645 [details] Dirty fix
This change needs to be made: * Conditional on the ZVBI option * Using framework variables (ICONV_LIB et al) * Using the correct arguments via the port frameworks CONFIGURE_* variables
(In reply to Kubilay Kocak from comment #4) Before any changes are made, I would like to understand the problem, because I am not able to reproduce this here. Just tried multiple builds on stable/10 and 9.3 with various OPTIONs combinations and this problem has not surfaced. Can you provide a full poudriere log for this?
@Thomas they've been attached Thanks for picking this up
(In reply to Kubilay Kocak from comment #6) Nope, they aren't :-) Background why I asked for poudriere logs: The logs currently attached to the bug report show that this build failure happened during a portmaster run. That means all kinds of local specific issues could be the cause of the failure. Also it does not contain information w.r.t. ARCH, OSVERSION, etc., so I am having a hard time reproducing the issue here. My crystal ball guess is that the libzvbi.so on the reporter's machine looks different from what pops out of poudriere. A full poudriere log from libzvbi and ffmpeg would help me a lot to find the differences.
Created attachment 166678 [details] libzvbi: modernize, v1 Changes in the patch: - Pass -DLIBICONV_PLUG - Make NLS optional - Convert to USES=localbase - Don't try to detect Doxygen - Strip binaries - Drop unused USES=pkgconfig (In reply to vvd from comment #2) > _OSRELEASE=10.2-RELEASE-p2 > OSVERSION=1002000 > ARCH=i386 > CPPFLAGS=-DLIBICONV_PLUG [...] > /usr/local/lib/libzvbi.so: undefined reference to `libiconv' > /usr/local/lib/libzvbi.so: undefined reference to `libiconv_open' > /usr/local/lib/libzvbi.so: undefined reference to `libiconv_close' With converters/libiconv installed before devel/libzvbi the configure uses wrong <iconv.h> thanks to CPPFLAGS+=-I${LOCALBASE}/include. On 10+ systems USES=iconv passes -DLIBICONV_PLUG to allow co-existence with iconv in libc. $ readelf -d /usr/local/lib/libzvbi.so | fgrep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libunicode.so.0] 0x0000000000000001 (NEEDED) Shared library: [libintl.so.8] 0x0000000000000001 (NEEDED) Shared library: [libthr.so.3] 0x0000000000000001 (NEEDED) Shared library: [libm.so.5] 0x0000000000000001 (NEEDED) Shared library: [libpng16.so.16] 0x0000000000000001 (NEEDED) Shared library: [libz.so.6] 0x0000000000000001 (NEEDED) Shared library: [libc.so.7] # clean build $ nm -D /usr/local/lib/libzvbi.so | grep 'U .*iconv' U __bsd_iconv U __bsd_iconv_close U __bsd_iconv_open # after converters/libiconv installed $ nm -D /usr/local/lib/libzvbi.so | grep 'U .*iconv' U libiconv U libiconv_close U libiconv_open
@Jan Beich The patch "libzvbi: modernize, v1" looks good for me. If this fixes the problem - just go ahead and commit it. Thank you for taking the time!
A commit references this bug: Author: jbeich Date: Sun Feb 7 16:26:02 UTC 2016 New revision: 408422 URL: https://svnweb.freebsd.org/changeset/ports/408422 Log: devel/libzvbi: modernize - Pass -DLIBICONV_PLUG [1] - Make NLS optional [2] - Convert to USES=localbase - Don't try to detect Doxygen - Strip binaries - Drop unused USES=pkgconfig - Define LICENSE PR: 206966 Reported by: vvd@unislabs.com (via koobs) [1] Approved by: oliver (maintainer) [1][2], portmgr blanket Changes: head/devel/libzvbi/Makefile head/devel/libzvbi/pkg-plist
VVD, can you rebuild devel/libzvbi and try again? If ffmpeg + ZVBI builds fine now close the bug.
Assign to Jan since he is driving the livzvbi fix which is presumably the fix for the whole issue. Jan, if there is something left to do in ffmpeg, feel free to assign it back to me. Thanks!
# pkg delete -yf libzvbi-0.2.35_2 … # portmaster devel/libzvbi … ===> libzvbi-0.2.35_3 depends on package: libiconv>=1.14_9 - found … Making all in examples if cc -DHAVE_CONFIG_H -I. -I. -I.. -I../src -DLIBICONV_PLUG -isystem /usr/local/include -I/usr/local/include -O2 -pipe -march=core2 -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -MT network.o -MD -MP -MF ".deps/network.Tpo" -c -o network.o network.c; then mv -f ".deps/network.Tpo" ".deps/network.Po"; else rm -f ".deps/network.Tpo"; exit 1; fi /bin/sh ../libtool --tag=CC --mode=link cc -O2 -pipe -march=core2 -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -L/usr/local/lib -fstack-protector -o network network.o ../src/libzvbi.la -lm -L/usr/local/lib -lintl -R/usr/local/lib -lpthread -lm -lpng -lz libtool: link: cc -O2 -pipe -march=core2 -DLIBICONV_PLUG -isystem /usr/local/include -fstack-protector -fno-strict-aliasing -fstack-protector -o .libs/network network.o -L/usr/local/lib ../src/.libs/libzvbi.so -lintl -lpthread -lm -lpng -lz -Wl,-rpath -Wl,/usr/local/lib /usr/local/lib/libunicode.so.0: undefined reference to `libiconv' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_close' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_open' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[4]: stopped in /usr/obj/usr/ports/devel/libzvbi/work/zvbi-0.2.35/examples *** Error code 1 Stop. make[3]: stopped in /usr/obj/usr/ports/devel/libzvbi/work/zvbi-0.2.35 *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/ports/devel/libzvbi/work/zvbi-0.2.35 *** Error code 1 Stop. make[1]: stopped in /usr/ports/devel/libzvbi *** Error code 1 Stop. make: stopped in /usr/ports/devel/libzvbi ===>>> make build failed for devel/libzvbi ===>>> Aborting update ===>>> You can restart from the point of failure with this command line: portmaster <flags> devel/libzvbi
Need too patch /usr/ports/devel/libunicode/Makefile to fix error from last log: - USES= gmake libtool + USES= iconv gmake libtool
A commit references this bug: Author: jbeich Date: Mon Feb 22 17:04:15 UTC 2016 New revision: 409360 URL: https://svnweb.freebsd.org/changeset/ports/409360 Log: devel/libunicode: properly register iconv dependency Avoid accidentally using converters/libiconv symbols when libc is desired by passing -DLIBICONV_PLUG during build. This fixes the following error in consumers: /usr/local/lib/libunicode.so.0: undefined reference to `libiconv' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_close' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_open' PR: 206966 Submitted by: vvd@unislabs.com Approved by: portmgr blanket MFH: 2016Q1 Changes: head/devel/libunicode/Makefile
A commit references this bug: Author: jbeich Date: Tue Feb 23 09:59:10 UTC 2016 New revision: 409393 URL: https://svnweb.freebsd.org/changeset/ports/409393 Log: MFH: r408422 devel/libzvbi: modernize - Pass -DLIBICONV_PLUG [1] - Make NLS optional [2] - Convert to USES=localbase - Don't try to detect Doxygen - Strip binaries - Drop unused USES=pkgconfig - Define LICENSE PR: 206966 Reported by: vvd@unislabs.com (via koobs) [1] Approved by: oliver (maintainer) [1][2], portmgr blanket Approved by: ports-secteam (feld) Changes: _U branches/2016Q1/ branches/2016Q1/devel/libzvbi/Makefile branches/2016Q1/devel/libzvbi/pkg-plist
A commit references this bug: Author: jbeich Date: Tue Feb 23 10:01:08 UTC 2016 New revision: 409400 URL: https://svnweb.freebsd.org/changeset/ports/409400 Log: MFH: r409360 devel/libunicode: properly register iconv dependency Avoid accidentally using converters/libiconv symbols when libc is desired by passing -DLIBICONV_PLUG during build. This fixes the following error in consumers: /usr/local/lib/libunicode.so.0: undefined reference to `libiconv' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_close' /usr/local/lib/libunicode.so.0: undefined reference to `libiconv_open' PR: 206966 Submitted by: vvd@unislabs.com Approved by: portmgr blanket Approved by: ports-secteam (feld) Changes: _U branches/2016Q1/ branches/2016Q1/devel/libunicode/Makefile
All compiled fine. Thanks!