Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 945826

Summary: app-text/ghostscript-gpl-10.04.0: fails to compile with clang (invalid argument '-std=gnu17' not allowed with 'C++')
Product: Gentoo Linux Reporter: Violet Purcell <vimproved>
Component: Current packagesAssignee: Codec Project <codec>
Status: RESOLVED FIXED    
Severity: normal CC: floppym, printing, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 945129    
Attachments: build.log
workaround

Description Violet Purcell 2024-12-03 19:56:30 UTC
Created attachment 913270 [details]
build.log

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de829b7a5819e93bb69eb0894e519b3bfebfd676 appears to have broken compilation with clang. Removing the "append-cflags -std=gnu17" line fixes it.
Comment 1 Mike Gilbert gentoo-dev 2024-12-04 04:43:21 UTC
Looks like the crazy homebrew build system passes CFLAGS to the C++ compiler. Nasty.
Comment 2 Mike Gilbert gentoo-dev 2024-12-04 04:54:33 UTC
Created attachment 913286 [details, diff]
workaround

Here's a workaround; please test.
Comment 3 Larry the Git Cow gentoo-dev 2024-12-12 11:09:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b6a506bddd3cf1315008950c7ad92950de977b3

commit 1b6a506bddd3cf1315008950c7ad92950de977b3
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-12-04 04:52:12 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-12-12 11:08:51 +0000

    app-text/ghostscript-gpl: work around broken build system
    
    The homegrown Makefiles pass CFLAGS to the C++ compiler.
    Add "-std=gnu17" to CC to avoid an error with clang++.
    
    Closes: https://bugs.gentoo.org/945826
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-text/ghostscript-gpl/ghostscript-gpl-10.04.0.ebuild | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)