#61306 closed defect (fixed)
ghostscript @ 9.52_0+x11 fails to build with xcode 12: error: implicit declaration of function 'FF_free' is invalid in C99
Reported by: | usrluciano | Owned by: | chrstphrchvz (Christopher Chavez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | xcode12 | Cc: | bK4gYuRo, chrstphrchvz (Christopher Chavez) |
Port: | ghostscript |
Description
sudo port install ImageMagick ---> Computing dependencies for ImageMagick The following dependencies will be installed: ghostscript Continue? [Y/n]: ---> Fetching archive for ghostscript ---> Attempting to fetch ghostscript-9.52_0+x11.darwin_19.x86_64.tbz2 from https://packages.macports.org/ghostscript ---> Attempting to fetch ghostscript-9.52_0+x11.darwin_19.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/ghostscript/ghostscript ---> Attempting to fetch ghostscript-9.52_0+x11.darwin_19.x86_64.tbz2 from https://nue.de.packages.macports.org/ghostscript ---> Fetching distfiles for ghostscript ---> Verifying checksums for ghostscript ---> Extracting ghostscript ---> Applying patches to ghostscript Warning: reinplace s|/usr/bin/perl|/opt/local/bin/perl| didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_print_ghostscript/ghostscript/work/ghostpdl-9.52/pcl/tools/gl2_chars.pl ---> Configuring ghostscript ---> Building ghostscript Error: Failed to build ghostscript: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_print_ghostscript/ghostscript/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port ImageMagick failed
Attachments (1)
Change History (20)
Changed 4 years ago by usrluciano
comment:1 Changed 4 years ago by bK4gYuRo
comment:2 Changed 4 years ago by bK4gYuRo
Cc: | bK4gYuRo added |
---|
comment:3 Changed 4 years ago by kencu (Ken)
Summary: | ghostscript @ 9.52_0+x11 Failed to build: command execution failed → ghostscript @ 9.52_0+x11 fails to build with xcode 12: error: implicit declaration of function 'FF_free' is invalid in C99 |
---|
comment:5 Changed 4 years ago by bK4gYuRo
A slight correction: I am hitting the problem on macos 10.13.6 and xcode Version 9.4.1 (9F2000)
comment:6 Changed 4 years ago by kencu (Ken)
This particular build error and log are with xcode12.
2 :debug:sysinfo macOS 10.15 (darwin/19.6.0) arch i386 3 :debug:sysinfo MacPorts 2.6.3 4 :debug:sysinfo Xcode 12.0.1 5 :debug:sysinfo SDK 10.15
And this is an error we have been seeing over and over and over with xcode12.
If you have a similar error, but not on xcode12, please consider opening a new ticket, and please upload a new log.
comment:8 Changed 4 years ago by bK4gYuRo
Errors look identical regardless of Xcode version. I could be wrong, but it seems there must be some other reason for the failure than xcode12. Builds on the buildbot farm were successful in July, and I successfully upgraded ghostscript on two other 10.13.6 systems previously. It just broke today.
comment:9 Changed 4 years ago by kencu (Ken)
you could be right. xcode12 has been throwing errors due to undeclared functions from missing headers, and we've seen lots of those, but it could be the function turns out to be just plain missing completely...if the same error shows up on < xcode12 that would be more complicated, indeed.
comment:10 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
I agree that both build failures share a cause/possible resolution, even though there are common complaints about implicit function declarations, which is an error in Xcode 12 and only a warning under older versions.
Regarding the first common error:
./base/fapi_ft.c:129:1: error: expected function body after function declarator FF_alloc(FT_Memory memory, long size) ^
I think this could mean it is treating the previous line FT_CALLBACK_DEF(void *)
as the declarator, and ^
is where it expects the opening {
—but maybe there would be more/other errors instead. But if this is the case, then I think this indicates a missing #include FT_CONFIG_CONFIG_H
(what Ghostscript would use to #include <freetype/config/ftconfig.h>
which defines FT_CALLBACK_DEF
).
comment:11 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Cc: | chrstphrchvz added |
---|
comment:12 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
<freetype/config/ftconfig.h>
which definesFT_CALLBACK_DEF
Sorry, this is no longer the case as of freetype 2.10.3. Maybe the problem is in freetype rather than Ghostscript.
comment:13 Changed 4 years ago by bK4gYuRo
If I revert freetype to @2.10.2_1, then ghostscript builds. It fails with freetype @2.10.3_0
comment:14 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Ghostscript 9.52 bundles freetype 2.10.1, whereas in 2.10.3 FT_CALLBACK_DEF
has moved to <freetype/internal/compiler-macros.h>
and so is not considered part of the freetype public API (and not in any installed headers). I guess it is up to MacPorts to make Ghostscript work with newer external freetype.
comment:15 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Put another way, I do not think downgrading to Xcode 11 will make this issue go away on macOS 10.15.
comment:16 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
PR opened for possible fix: https://github.com/macports/macports-ports/pull/8747
comment:17 Changed 4 years ago by mf2k (Frank Schima)
Keywords: | xcode12 added |
---|
comment:18 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Owner: | set to chrstphrchvz |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:19 Changed 4 years ago by chrstphrchvz (Christopher Chavez)
Upstream ticket: https://bugs.ghostscript.com/show_bug.cgi?id=702985
I am getting the same errors in main.log when I try to upgrade ghostscript.