[gs-devel] build report for gs-9.55 candidate

Bruno Voisin bvoisin at icloud.com
Wed May 26 18:36:11 UTC 2021

> Le 25 mai 2021 à 15:27, Nelson H. F. Beebe <beebe at math.utah.edu> a écrit :
> I downloaded and successfully built and installed the candidate
> release from
> 	https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gpdf_alpha1
> on CentOS 7 and 8, and Ubuntu 20.04, x86_64 systems.  All tests
> passed.

I've just done the same (./configure && make && make check, not make install following Nelson's remark) on the Mac: macOS Big Sur 11.4, Xcode 12.5, Apple Silicon M1 (ie ARM) processor.

Two fixes were necessary for make to succeed:

- First the fix proposed at


for an incompatibility between Xcode 12.5 and the current Tesseract code. This is specific to version 12.5 of Xcode (the newest, from a month ago), and didn't occur with earlier versions.

- Second base/stdint_.h needs to be edited, replacing line 36

	# ifdef __MACOS__


	# ifdef __APPLE__

Otherwise the Mac platform isn't detected, the redefinitions in lines 50 ff. are applied and later conflicts with those in Xcode's built-in stdin.h, giving a lot of warnings and eventually

	gcc  -DSHARE_JPX=0 -D"memalign(a,b)=malloc(b)" -Wno-attributes -DOPJ_STATIC -DMUTEX_pthread=0  -DUSE_JPIP -DUSE_OPENJPEG_JP2 -DOPJ_HAVE_STDINT_H=1 -DOPJ_HAVE_INTTYPES_H=1  -DOPJ_HAVE_FSEEKO=1 -U__SSE__ -DPDF_INCLUDED -I./pdf -I./obj -I./pcl/pl -I./base -I./expat/lib -I./jpegxr -I./zlib -I./openjpeg/src/lib/openjp2 -I./jbig2dec -c ./pdf/pdf_utf8.c -o ./obj/pdf_utf8.o
	In file included from ./pdf/pdf_utf8.c:25:
	In file included from ./pdf/ghostpdf.h:28:
	./base/stdint_.h:115:21: error: typedef redefinition with different types ('long' vs 'long long')
	typedef signed long int64_t;
	/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_int64_t.h:30:33: note: previous definition is here
	typedef long long               int64_t;
	In file included from ./pdf/pdf_utf8.c:25:
	In file included from ./pdf/ghostpdf.h:28:
	./base/stdint_.h:116:23: error: typedef redefinition with different types ('unsigned long' vs 'unsigned long long')
	typedef unsigned long uint64_t;
	/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/_types/_uint64_t.h:31:28: note: previous definition is here
	typedef unsigned long long uint64_t;
	2 errors generated.
	make: *** [obj/pdf_utf8.o] Error 1

I got inspiration for the changed test from


Why the problem didn't arise previously with Ghostscript 9.54.0 and below is beyond me. I checked that the modification doesn't affect the compilation of ghostscript-9.54.0, which proceeds just as before.

Finally, ./configure, even before this fix, gave

	checking for stdint.h... yes 

So I don't know whether the comment at line 32 of base/stdint_.h

	/* Some systems are guaranteed to have stdint.h
	 * but don't use the autoconf detection

yielding the above test for macOS, is still relevant.

Bruno Voisin
Laboratory of Geophysical and Industrial Flows
LEGI, CS 40700, 38058 Grenoble Cedex 9, France
+33 4 76 82 50 45
bruno.voisin at univ-grenoble-alpes.fr / bvoisin at icloud.com

More information about the gs-devel mailing list