Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830738 - net-irc/quassel-0.14.0 mangles CXXFLAGS containing duplicate words
Summary: net-irc/quassel-0.14.0 mangles CXXFLAGS containing duplicate words
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sam James
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-07 16:04 UTC by Michał Górny
Modified: 2022-01-14 18:32 UTC (History)
1 user (show)

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


Attachments
/var/log/portage/net-irc:quassel-0.14.0:20220107-160217.log (net-irc:quassel-0.14.0:20220107-160217.log,11.94 KB, text/plain)
2022-01-07 16:04 UTC, Michał Górny
Details
emerge --info (emerge-info.txt,10.78 KB, text/plain)
2022-01-07 16:04 UTC, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-01-07 16:04:11 UTC
Created attachment 761514 [details]
/var/log/portage/net-irc:quassel-0.14.0:20220107-160217.log

x86_64-pc-linux-gnu-g++: warning: l1-cache-line-size=64: linker input file unused because linking not done
x86_64-pc-linux-gnu-g++: error: l1-cache-line-size=64: linker input file not found: No such file or directory
ninja: build stopped: subcommand failed.
 * ERROR: net-irc/quassel-0.14.0::gentoo failed (compile phase):
 *   ninja -v -j1 -l0 failed
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-01-07 16:04:37 UTC
Created attachment 761515 [details]
emerge --info
Comment 2 Mike Gilbert gentoo-dev 2022-01-07 16:22:11 UTC
CXXFLAGS contain "--param l1-cache-size=32 --param l1-cache-line-size=64". The second "--param" is getting dropped.

The problem is in this "process_cmake_cxx_flags()" macro.

https://github.com/quassel/quassel/blob/0.14.0/cmake/QuasselMacros.cmake#L414

It splits CXXFLAGS into a list of arguments using separate_arguments(). It then calls add_compile_options() on this list.

The add_compile_options() function "de-duplicates" the options.

https://cmake.org/cmake/help/latest/command/add_compile_options.html#option-de-duplication
Comment 3 Mike Gilbert gentoo-dev 2022-01-07 16:40:36 UTC
Opened a PR upstream.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2022-01-07 17:36:36 UTC
this form should work too btw:

--param=l1-cache-line-size=64

I always found this form less problematic for parsing.

cmake of course should be fixed, just adding a data point
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-01-07 19:08:26 UTC
(In reply to Georgy Yakovlev from comment #4)
> this form should work too btw:
> 
> --param=l1-cache-line-size=64
> 
> I always found this form less problematic for parsing.
> 
> cmake of course should be fixed, just adding a data point

Who will catch the bugs then?  ;-)
Comment 6 Larry the Git Cow gentoo-dev 2022-01-14 18:32:01 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4da043aa794888f08ab2ebfda77a95182f96ed38

commit 4da043aa794888f08ab2ebfda77a95182f96ed38
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2022-01-14 18:31:01 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2022-01-14 18:31:01 +0000

    net-irc/quassel: fix CXXFLAGS de-duplication
    
    Closes: https://bugs.gentoo.org/830738
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 .../quassel/files/quassel-0.14.0-cxxflags.patch    | 32 ++++++++++++++++++++++
 net-irc/quassel/quassel-0.14.0.ebuild              |  4 +++
 2 files changed, 36 insertions(+)