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

Bug 747808

Summary: app-text/ghostscript-gpl-9.53.3 fails to compile with media-libs/freetype-2.10.3: error: expected declaration specifiers before ‘FF_alloc’
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Printing Team <printing>
Status: RESOLVED FIXED    
Severity: normal CC: anton.kochkov, bjh-gentoobt, dobdin, polynomial-c, sam, steffen.weber, whissi
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.ghostscript.com/show_bug.cgi?id=702985
https://bugs.gentoo.org/show_bug.cgi?id=750275
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log
Fixed ebuild

Description Agostino Sarubbo gentoo-dev 2020-10-11 12:26:28 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-text/ghostscript-gpl-9.53.3 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2020-10-11 12:26:31 UTC
Created attachment 664603 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2020-10-11 12:26:32 UTC
Possible context of error(s):

./base/fapi_ft.c:129:1: error: expected declaration specifiers before ‘FF_alloc’
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-11 14:37:22 UTC
I cannot reproduce. Please retry with MAKEOPTS=-j1.
Comment 4 cyrillic 2020-10-11 18:22:42 UTC
I am getting this error too (even with -j1). It started right after I updated to media-libs/freetype-2.10.3
Comment 5 Thomas Deutschmann (RETIRED) gentoo-dev 2020-10-11 20:35:30 UTC
Thank you, confirmed.
Comment 6 Larry the Git Cow gentoo-dev 2020-10-11 20:45:13 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cf695c0e9f5b653f3bd2679786e3283b30c4d03

commit 5cf695c0e9f5b653f3bd2679786e3283b30c4d03
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-10-11 20:43:22 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-10-11 20:45:07 +0000

    app-text/ghostscript-gpl: not compatible with >=media-libs/freetype-2.10.3
    
    Bug: https://bugs.gentoo.org/747808
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../{ghostscript-gpl-9.53.3.ebuild => ghostscript-gpl-9.53.3-r1.ebuild}  | 1 +
 1 file changed, 1 insertion(+)
Comment 7 Roel Aaij 2020-10-19 10:23:42 UTC
Created attachment 666707 [details]
Fixed ebuild
Comment 8 Roel Aaij 2020-10-19 10:25:21 UTC
Looking at the freetype commit that caused this build failure (https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=bb66c8d8cf1eb86309273d7c53c44522d35941d4) and the ghostscript source, adding this to the ebuild in src_prepare fixes it:
sed -E "s/FT_CALLBACK_DEF\(([^\)]+)\)/static \1/g" -i base/fapi_ft.c || die

This replaces the macro with what is was (and is) doing in a C source file.
Comment 9 Agostino Sarubbo gentoo-dev 2020-10-19 10:35:55 UTC
Hello, thanks for the patch. I believe you can speed up the process by making a pull-request via Github.
Comment 10 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2020-10-19 16:08:13 UTC
(In reply to Roel Aaij from comment #8)
> Looking at the freetype commit that caused this build failure
> (https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/
> ?id=bb66c8d8cf1eb86309273d7c53c44522d35941d4) and the ghostscript source,
> adding this to the ebuild in src_prepare fixes it:
> sed -E "s/FT_CALLBACK_DEF\(([^\)]+)\)/static \1/g" -i base/fapi_ft.c || die
> 
> This replaces the macro with what is was (and is) doing in a C source file.

There's a possibly better "fix" available at 
https://bugs.ghostscript.com/show_bug.cgi?id=702985#c2
Comment 11 Larry the Git Cow gentoo-dev 2020-10-20 08:09:41 UTC
The bug has been closed via the following commit(s):

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

commit ef7d73bef37f8b7cb76484574e4d316fdb06984b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2020-10-20 08:09:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-10-20 08:09:31 +0000

    app-text/ghostscript-gpl: fix compat. with >=media-libs/freetype-2.10.3
    
    Closes: https://bugs.gentoo.org/747808
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Sam James <sam@gentoo.org>

 .../ghostscript-gpl-9.53.3-freetype-2.10.3.patch     | 20 ++++++++++++++++++++
 .../ghostscript-gpl/ghostscript-gpl-9.52-r1.ebuild   |  5 +++++
 ....3-r1.ebuild => ghostscript-gpl-9.53.3-r2.ebuild} |  6 +++++-
 3 files changed, 30 insertions(+), 1 deletion(-)
Comment 12 SimmonaLopez 2021-08-20 04:00:49 UTC Comment hidden (spam)