/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -O2 -pipe -march=bdver2 -fstack-protector-strong -fstack-check -Wall -W -msse2 -msse3 -mssse3 -msse4.1 -mpclmul -no-install -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o tunefft tunefft.o tuning-common.o libtiming.la ../libgf2x-local.a libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=bdver2 -fstack-protector-strong -fstack-check -Wall -W -msse2 -msse3 -mssse3 -msse4.1 -mpclmul -Wl,-O1 -Wl,--defsym=__gentoo_check_ldflags__=0 -o tunefft tunefft.o tuning-common.o -Wl,--as-needed ./.libs/libtiming.a ../libgf2x-local.a tunefft.o:tunefft.c:function next_step: error: undefined reference to 'MIN' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:2144: tunefft] Error 1 make[1]: Leaving directory '/var/tmp/portage/dev-libs/gf2x-1.3.0/work/gf2x-1.3.0/src' make: *** [Makefile:1388: tune-fft] Error 2 * ERROR: dev-libs/gf2x-1.3.0::gentoo failed (compile phase): * emake failed Maybe it needs to linked against math library? Reproducible: Always Steps to Reproduce: 1. USE="custom-tune fft" emerge =gf2x-1.3.0 2. 3. Without both USE flags enabled the tunefft binary is not being built, according the ebuild. Build.log and emerge info as attachments.
Created attachment 635130 [details] gf2x-1.3.0:20200428-202155.log Build log
Created attachment 635132 [details] emerge-info-gf2x.txt Output of emerge --info gf2x
Looks like including /usr/include/sys/param.h in src/tunefft.c has the definitons for MIN and MAX. The build is currently fine-tuning for fft, which might take some time, but the build of the tune-fft binary worked with the above. I'm providing a patch tomorrow morning, once the build is finished.
Created attachment 635266 [details, diff] 0001-dev-libs/gf2x-add-include-for-MIN.patch Patch which worked for me to solve this issue.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c7b2300d3e47284bbe33a18a20ae80ec5c334c1 commit 9c7b2300d3e47284bbe33a18a20ae80ec5c334c1 Author: Bernd Waibel <waebbl-gentoo@posteo.net> AuthorDate: 2021-06-05 20:53:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-06-05 21:26:58 +0000 dev-libs/gf2x: add missing includes Add include statement for MIN and MAX declarations Closes: https://bugs.gentoo.org/719982 Package-Manager: Portage-3.0.19, Repoman-3.0.3 Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net> Closes: https://github.com/gentoo/gentoo/pull/21137 Signed-off-by: Sam James <sam@gentoo.org> ...t.c-add-include-statement-for-MIN-and-MAX.patch | 29 ++++++++++++++++++++++ dev-libs/gf2x/gf2x-1.3.0.ebuild | 7 ++++-- 2 files changed, 34 insertions(+), 2 deletions(-)