Hi, context: poudriere host and poudriere version: 12.1-STABLE #0 r361108 poudriere-devel-3.3.99.20200326 poudriere jail version: 12.1-STABLE 1201512 r359155 amd64 ports version: 541339 audio/vorbis-tools fails build with linker error: # poudriere testport -j 12S-desktop audio/vorbis-tools [...] [00:00:29] --- flac.o --- [00:00:29] flac.c:373:26: warning: passing 'FLAC__byte *' (aka 'unsigned char *') to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] [00:00:29] strncpy(comment, f_comments->comments[i].entry, f_comments->comments[i].length); [00:00:29] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [00:00:29] /usr/include/string.h:103:57: note: passing argument to parameter here [00:00:29] char *strncpy(char * __restrict, const char * __restrict, size_t); [00:00:29] ^ [00:00:29] 1 warning generated. [00:00:29] --- oggenc --- [00:00:29] /bin/sh ../libtool --tag=CC --mode=link cc -fsigned-char -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -fstack-protector-strong -o oggenc flac.o easyflac.o lyrics.o oggenc.o audio.o encode.o platform.o resample.o skeleton.o ../share/libutf8.a ../share/libgetopt.a -lvorbisenc -L/usr/local/lib -lvorbis -L/usr/local/lib -loggkate -lkate -logg -L/usr/local/lib -logg /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -lFLAC -lm -L/usr/local/lib -logg [00:00:29] libtool: link: cc -fsigned-char -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -o oggenc flac.o easyflac.o lyrics.o oggenc.o audio.o encode.o platform.o resample.o skeleton.o /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib ../share/libutf8.a ../share/libgetopt.a -lvorbisenc -lvorbis -loggkate -lkate -lFLAC -lm -logg [00:00:29] Making all in oggdec [00:00:29] --- oggdec.o --- [00:00:29] if cc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include -I/usr/local/include -I../include -I../intl -I/usr/local/include -DLIBICONV_PLUG -D_THREAD_SAFE -fsigned-char -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -MT oggdec.o -MD -MP -MF ".deps/oggdec.Tpo" -c -o oggdec.o oggdec.c; then mv -f ".deps/oggdec.Tpo" ".deps/oggdec.Po"; else rm -f ".deps/oggdec.Tpo"; exit 1; fi [00:00:29] --- oggdec --- [00:00:29] /bin/sh ../libtool --tag=CC --mode=link cc -fsigned-char -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -L/usr/local/lib -fstack-protector-strong -o oggdec oggdec.o ../share/libutf8.a ../share/libgetopt.a -lvorbisfile -L/usr/local/lib -lvorbis -L/usr/local/lib -logg /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib [00:00:29] libtool: link: cc -fsigned-char -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -fstack-protector-strong -o oggdec oggdec.o /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib ../share/libutf8.a ../share/libgetopt.a -lvorbisfile -lvorbis -logg [00:00:29] ld: error: /usr/local/lib/libvorbisfile.so: undefined reference to rint [00:00:29] ld: error: /usr/local/lib/libvorbisfile.so: undefined reference to rintf [00:00:29] cc: error: linker command failed with exit code 1 (use -v to see invocation) [00:00:29] *** [oggdec] Error code 1 [00:00:29] [00:00:29] make[3]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0/oggdec [00:00:29] 1 error [00:00:29] [00:00:29] make[3]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0/oggdec [00:00:29] *** [all-recursive] Error code 1 [00:00:29] [00:00:29] make[2]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0 [00:00:29] 1 error [00:00:29] [00:00:29] make[2]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0 [00:00:29] *** [all] Error code 2 [00:00:29] [00:00:29] make[1]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0 [00:00:29] 1 error [00:00:29] [00:00:29] make[1]: stopped in /wrkdirs/usr/ports/audio/vorbis-tools/work/vorbis-tools-1.4.0 [00:00:29] ===> Compilation failed unexpectedly. [00:00:29] Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to [00:00:29] the maintainer. [00:00:29] *** Error code 1 [00:00:29] [00:00:29] Stop. [00:00:29] make: stopped in /usr/ports/audio/vorbis-tools [00:00:29] Saving audio/vorbis-tools | vorbis-tools-1.4.0_10,3 wrkdir [00:00:32] Saved audio/vorbis-tools | vorbis-tools-1.4.0_10,3 wrkdir to: /usr/local/poudriere/data/wrkdirs/12S-desktop-default/default/vorbis-tools-1.4.0_10,3.txz [00:00:32] build of audio/vorbis-tools | vorbis-tools-1.4.0_10,3 ended at Mon Jul 6 13:21:32 BST 2020 [00:00:32] build time: 00:00:14 [00:00:32] !!! build failure encountered !!! [00:00:32] Error: Build failed in phase: build [00:00:32] Logs: /usr/local/poudriere/data/logs/bulk/12S-desktop-default/2020-07-06_13h21m00s
rint()/rintf() are from libm. According to my build logs, oggdec linked just fine without -lm under libvorbis 1.3.6. Either we accept this as "how it's done now" and add "-lm" to LDFLAGS in vorbis-tools, or we add it to Libs in pkgconf fike vorbisfile.pc (or vorbis.pc).
A commit references this bug: Author: naddy Date: Mon Jul 6 17:10:08 UTC 2020 New revision: 541352 URL: https://svnweb.freebsd.org/changeset/ports/541352 Log: Use the libtool script from devel/libtool. The included libtool appears to be broken and loses the -lm dependency_lib, so libvorbisenc and libvorbisfile did not get linked with -lm. PR: 247799 Changes: head/audio/libvorbis/Makefile
The underlying problem is that in libvorbis-1.3.7, libvorbisfile and libvorbisenc were no longer linked with -lm. There is NO CHANGE in the build system to explain this. Instead, it appears that the included libtool script is buggy and loses libvorbis's dependency libs. I have switched to using the libtool from the devel/libtool port, which fixes this problem in libvorbis 1.3.7_1. Thanks for the report.