Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945826 - app-text/ghostscript-gpl-10.04.0: fails to compile with clang (invalid argument '-std=gnu17' not allowed with 'C++')
Summary: app-text/ghostscript-gpl-10.04.0: fails to compile with clang (invalid argume...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Codec Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 945129
  Show dependency tree
 
Reported: 2024-12-03 19:56 UTC by Violet Purcell
Modified: 2024-12-12 11:09 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,494.52 KB, text/x-log)
2024-12-03 19:56 UTC, Violet Purcell
Details
workaround (0001-app-text-ghostscript-gpl-work-around-broken-build-sy.patch,1.05 KB, patch)
2024-12-04 04:54 UTC, Mike Gilbert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)