Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 719982 - =dev-libs/gf2x-1.3.0 USE="custom-tune fft" tunefft.o:tunefft.c:function next_step: error: undefined reference to 'MIN'
Summary: =dev-libs/gf2x-1.3.0 USE="custom-tune fft" tunefft.o:tunefft.c:function next_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2020-04-29 06:01 UTC by Bernd
Modified: 2021-06-05 21:28 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gf2x-1.3.0:20200428-202155.log (gf2x-1.3.0:20200428-202155.log,726.29 KB, text/plain)
2020-04-29 06:02 UTC, Bernd
Details
emerge-info-gf2x.txt (emerge-info-gf2x.txt,14.74 KB, text/plain)
2020-04-29 06:03 UTC, Bernd
Details
0001-dev-libs/gf2x-add-include-for-MIN.patch (0001-dev-libs-gf2x-add-include-for-MIN.patch,2.45 KB, patch)
2020-04-30 06:31 UTC, Bernd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd 2020-04-29 06:01:22 UTC
/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.
Comment 1 Bernd 2020-04-29 06:02:33 UTC
Created attachment 635130 [details]
gf2x-1.3.0:20200428-202155.log

Build log
Comment 2 Bernd 2020-04-29 06:03:47 UTC
Created attachment 635132 [details]
emerge-info-gf2x.txt

Output of emerge --info gf2x
Comment 3 Bernd 2020-04-29 21:48:16 UTC
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.
Comment 4 Bernd 2020-04-30 06:31:18 UTC
Created attachment 635266 [details, diff]
0001-dev-libs/gf2x-add-include-for-MIN.patch

Patch which worked for me to solve this issue.
Comment 5 Larry the Git Cow gentoo-dev 2021-06-05 21:28:45 UTC
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(-)