Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903668 - x11-libs/wxGTK-3.2.2.1-r1 fails to install with link error: l1-cache-size=32: linker input file not found: No such file or directory
Summary: x11-libs/wxGTK-3.2.2.1-r1 fails to install with link error: l1-cache-size=32:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo wxWidgets project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-01 17:27 UTC by Sebastian Pipping
Modified: 2023-04-02 19:57 UTC (History)
1 user (show)

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


Attachments
Build log (x11-libs:wxGTK-3.2.2.1-r1:20230401-163906.log,33.37 KB, text/x-log)
2023-04-01 17:28 UTC, Sebastian Pipping
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pipping gentoo-dev 2023-04-01 17:27:32 UTC
Hi!

I'm getting link error…

> x86_64-pc-linux-gnu-g++: error: l1-cache-size=32: linker input file not found: No such file or directory

…when trying to install x11-libs/wxGTK-3.2.2.1-r1.  The build system apparently has trouble with my CXXFLAGS:

  > # portageq envvar CXXFLAGS
  > -march=sandybridge -maes --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=3072 -O2 -pipe -frecord-gcc-switches

I'll attach the build log in a minute.
Comment 1 Sebastian Pipping gentoo-dev 2023-04-01 17:28:36 UTC
Created attachment 859394 [details]
Build log
Comment 2 Arsen Arsenović gentoo-dev 2023-04-01 23:55:01 UTC
Try with --param=l1-cache-line-size=64 etc.

(frankly, I had no idea you could use a space there)

It *should* be equivalent if I'm understanding the space case right.
Comment 3 Sebastian Pipping gentoo-dev 2023-04-02 00:10:23 UTC
Good idea about "=", seems to work judging from:

> # echo 'int main() { return 0; }' > main.c 
> # gcc --param=l1-cache-line-size=64 main.c

I guess the ebuild should filter "--param [..]" with spaces though, all other ebuilds handle them fine.
Comment 4 Arsen Arsenović gentoo-dev 2023-04-02 11:07:11 UTC
sigh...

dnl Set the flags to be used for the library build itself using the flag names
dnl used everywhere above.
dnl
dnl Also get rid of duplicates in the flags, which results in dramatically
dnl shorter build logs and so is well worth it (but preserve some special
dnl flags which are explicitly allowed to occur multiple times, as all their
dnl occurrences must be preserved).
dedup_flags()
{
    printf "%s " "$@" |
        awk 'BEGIN { RS=" "; ORS=" " }
            { if ($0=="-arch" || $0=="-framework" || !seen[[$0]]++) print }'
}
Comment 5 Sebastian Pipping gentoo-dev 2023-04-02 15:11:01 UTC
Nice finding!

> # dedup_flags --param l1-cache-line-size=64 --param l1-cache-size=32
> --param l1-cache-line-size=64 l1-cache-size=32

That's it, confirming.

I guess we could either patch the whole thing out or add ' || $0=="--param"', either upstream first or in Gentoo.  My guess is that the list will not be complete after adding --param, e.g. linker flag -l seems to allow pattern "-l<space>name" also, from what I can see from GCC 11.  So better patch out altogether?  What do you think?
Comment 6 Larry the Git Cow gentoo-dev 2023-04-02 19:57:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23a6d260ee7a72fc42d36d6311a137fa3c55bcdc

commit 23a6d260ee7a72fc42d36d6311a137fa3c55bcdc
Author:     Arsen Arsenović <arsen@gentoo.org>
AuthorDate: 2023-04-02 11:34:00 +0000
Commit:     Arsen Arsenović <arsen@gentoo.org>
CommitDate: 2023-04-02 19:57:13 +0000

    x11-libs/wxGTK: Remove broken flag deduplication logic in 3.2.2.1
    
    Closes: https://bugs.gentoo.org/903668
    Signed-off-by: Arsen Arsenović <arsen@gentoo.org>

 .../files/wxGTK-3.2.2.1-dont-break-flags.patch     | 48 ++++++++++++++++++++++
 x11-libs/wxGTK/wxGTK-3.2.2.1-r1.ebuild             |  1 +
 2 files changed, 49 insertions(+)