[ 96% 66/66] : && /usr/local/libexec/ccache/cc -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -fstack-protector-strong -Xlinker --dependency-file=CMakeFiles/avifenc.dir/link.d CMakeFiles/avifenc.dir/apps/avifenc.c.o -o avifenc -Wl,-rpath,/construction/xports/graphics/libavif/work/.build:/usr/local/lib: libavif_apps.a libavif.so.16.2.0 /usr/local/lib/libpng.so /usr/lib/libz.so /usr/local/lib/libjpeg.so && : FAILED: avifenc : && /usr/local/libexec/ccache/cc -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fno-omit-frame-pointer -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -fstack-protector-strong -Xlinker --dependency-file=CMakeFiles/avifenc.dir/link.d CMakeFiles/avifenc.dir/apps/avifenc.c.o -o avifenc -Wl,-rpath,/construction/xports/graphics/libavif/work/.build:/usr/local/lib: libavif_apps.a libavif.so.16.2.0 /usr/local/lib/libpng.so /usr/lib/libz.so /usr/local/lib/libjpeg.so && : ld: error: undefined symbol: round >>> referenced by iccmaker.c >>> iccmaker.c.o:(avifGenerateRGBICC) in archive libavif_apps.a >>> referenced by iccmaker.c >>> iccmaker.c.o:(avifGenerateRGBICC) in archive libavif_apps.a >>> referenced by iccmaker.c >>> iccmaker.c.o:(avifGenerateRGBICC) in archive libavif_apps.a >>> referenced 10 more times ld: error: undefined symbol: roundf >>> referenced by iccmaker.c >>> iccmaker.c.o:(avifGenerateRGBICC) in archive libavif_apps.a >>> referenced by iccmaker.c >>> iccmaker.c.o:(avifGenerateGrayICC) in archive libavif_apps.a cc: error: linker command failed with exit code 1 (use -v to see invocation)
Created attachment 258664 [details] Patch for graphics/libavif/Makefile adding the math library
*** This bug has been marked as a duplicate of bug 285403 ***
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=1e99b807283ac2743600d0db0832c97e8fcaa4db commit 1e99b807283ac2743600d0db0832c97e8fcaa4db Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2025-03-15 13:01:11 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2025-03-15 13:01:11 +0000 graphics/libavif: Fix build with non-default options libavif uses round/roundf which is in the math library. It builds fine with default options because libm is brought in via its dependencies. Therefore, we add it to LDFLAGS explicitly. PR: 285403, 285405 Reported by: many graphics/libavif/Makefile | 1 + 1 file changed, 1 insertion(+)