Summary: | ARCH_SIZEOF_SIZE_T not declared when compiling with GCC 4.2 on PowerPC Mac OS X 10.5.8, Leopard | ||
---|---|---|---|
Product: | GhostPDL | Reporter: | Peter Dyballa <Peter_Dyballa> |
Component: | Graphics Library | Assignee: | Chris Liddell (chrisl) <chris.liddell> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | 9.54.0 | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- | |
Attachments: | config.log from PowerPC MacOSX 10.5.8, Leopard, with GCC 4.2 |
Description
Peter Dyballa
2021-06-17 07:48:47 UTC
Created attachment 21082 [details]
config.log from PowerPC MacOSX 10.5.8, Leopard, with GCC 4.2
The same reports of not being defined appear with GCC7 (7.5.0). I looked today again at the problem why the macro is not set and egrep revealed: .../work/ghostpdl-9.54.0/config.log:3414:ARCH_SIZEOF_SIZE_T='' .../work/ghostpdl-9.54.0/config.status:610:S["ARCH_SIZEOF_SIZE_T"]="" .../work/ghostpdl-9.54.0/configure.ac:3589: ilog2 $ac_cv_sizeof_size_t .../work/ghostpdl-9.54.0/configure.ac:3591: AC_SUBST(ARCH_SIZEOF_SIZE_T, $ac_cv_sizeof_size_t) .../work/ghostpdl-9.54.0/configure:679:ARCH_SIZEOF_SIZE_T .../work/ghostpdl-9.54.0/configure:14524:if test ${ac_cv_sizeof_size_t+y} .../work/ghostpdl-9.54.0/configure:14528: if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" .../work/ghostpdl-9.54.0/configure:14538: ac_cv_sizeof_size_t=0 .../work/ghostpdl-9.54.0/configure:14543:{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 .../work/ghostpdl-9.54.0/configure:14544:printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } .../work/ghostpdl-9.54.0/configure:14548:printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h .../work/ghostpdl-9.54.0/configure:14671: ilog2 $ac_cv_sizeof_size_t .../work/ghostpdl-9.54.0/configure:14674: ARCH_SIZEOF_SIZE_T=$ac_cv_sizeof_size_t .../work/ghostpdl-9.54.0/configure~:651:ARCH_SIZEOF_SIZE_T .../work/ghostpdl-9.54.0/configure~:13353:if ${ac_cv_sizeof_size_t+:} false; then : .../work/ghostpdl-9.54.0/configure~:13356: if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : .../work/ghostpdl-9.54.0/configure~:13365: ac_cv_sizeof_size_t=0 .../work/ghostpdl-9.54.0/configure~:13370:{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 .../work/ghostpdl-9.54.0/configure~:13371:$as_echo "$ac_cv_sizeof_size_t" >&6; } .../work/ghostpdl-9.54.0/configure~:13376:#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t .../work/ghostpdl-9.54.0/configure~:13500: ilog2 $ac_cv_sizeof_size_t .../work/ghostpdl-9.54.0/configure~:13503: ARCH_SIZEOF_SIZE_T=$ac_cv_sizeof_size_t From this it's obvious that auto-reconfiguration does introduce some changes to the original version of configure: -rw-r--r-- 1 macports admin 142852 18. Aug 17:15 .../work/ghostpdl-9.54.0/config.log -rwxr-xr-x 1 macports admin 41892 18. Aug 17:15 .../work/ghostpdl-9.54.0/config.status -rwxr-xr-x 1 macports admin 444411 18. Aug 17:14 .../work/ghostpdl-9.54.0/configure -rw-r--r-- 1 macports admin 117845 18. Aug 17:13 .../work/ghostpdl-9.54.0/configure.ac -rwxr-xr-x 1 macports admin 49035 30. Mär 09:40 .../work/ghostpdl-9.54.0/config.guess -rwxr-xr-x 1 macports admin 34212 30. Mär 09:40 .../work/ghostpdl-9.54.0/config.sub -rwxr-xr-x 1 macports admin 414292 30. Mär 09:40 .../work/ghostpdl-9.54.0/configure~ configure.ac is patched with this: --- configure.ac.orig 2021-03-22 14:57:46.000000000 +0000 +++ configure.ac 2021-05-25 07:33:07.000000000 +0000 @@ -3241,7 +3241,7 @@ dnl -------------------------------------------------- ALIGN_TEXT_PROG_INCS="\ -#include <stdio.h> \ +#include <stdio.h> #include <stdlib.h>" and later with: ---> Patching configure.ac: s|ZLIBDIR=src|ZLIBDIR=/opt/local/include| On MacOS, I don't think we should be using a configure generated arch.h because we (originally) had to support building "fat" binaries. The build *ought* to be using the predefined arch.h from "arch/osx-x86-x86_64-ppc-gcc.h", and I think the problem is a typo, see pending commit: https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=ff06eaeea6b4f1 On MacOS, I don't think we should be using a configure generated arch.h because we (originally) had to support building "fat" binaries. The build *ought* to be using the predefined arch.h from "arch/osx-x86-x86_64-ppc-gcc.h", and I think the problem is a typo, see pending commit: https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=ff06eaeea6b4f1 It's a bit difficult for me to test, because I no longer have access to a PPC Mac..... (In reply to Chris Liddell (chrisl) from comment #6) > It's a bit difficult for me to test, because I no longer have access to a > PPC Mac..... I can perform your tests on my old PowerBook G4 that has Leopard, Mac OS X 10.5.8, and Tiger, Mac OS X 10.4.11. (In reply to Chris Liddell (chrisl) from comment #5) > > The build *ought* to be using the predefined arch.h from > "arch/osx-x86-x86_64-ppc-gcc.h", and I think the problem is a typo, see > pending commit: > > https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff; > h=ff06eaeea6b4f1 I see it! Within a few hours I can make a test (right now MacPorts is updating a lot of Perl and Python packages – on Tiger, because Leopard was up-to-date). (In reply to Chris Liddell (chrisl) from comment #5) > > https://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff; > h=ff06eaeea6b4f1 Ghostscript is still building on PPC Tiger, Mac OS X 10.4.11, but GCC 4.2 does not complain about undefined ARCH_SIZEOF_SIZE_T. Patch pushed to canonical repo: https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=6befad2584a3 Thanks for testing it. (In reply to Chris Liddell (chrisl) from comment #10) > > Thanks for testing it. 'make check' produces in the end an error I do not understand: rm -f ./obj/gscdefs.c cp ./base/gscdef.c ./obj/gscdefs.c /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_MKSTEMP -DHAVE_FSEEKO -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_BSWAP32 -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2 -DNDEBUG -isystem/opt/local/include -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch ppc -DHAVE_RESTRICT=1 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -I./obj -I./base -I./devices -DWHICH_CMS="lcms2" -o ./obj/gscdefs.o -c ./obj/gscdefs.c /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_MKSTEMP -DHAVE_FSEEKO -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_BSWAP32 -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF -DHAVE_PREAD_PWRITE=1 -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2 -DNDEBUG -isystem/opt/local/include -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch ppc -DHAVE_RESTRICT=1 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -I./obj -I./base -I./devices -DWHICH_CMS="lcms2" -o ./obj/gsromfs0.o -c ./base/gsromfs0.c ./obj/aux/echogs -w ./obj/ldt.tr -n - /opt/local/bin/gcc-apple-4.2 -std=gnu99 -Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc -o ./bin/gs ./obj/aux/echogs -a ./obj/ldt.tr -n -s ./obj/gsromfs0.o ./obj/gs.o -s cat ./obj/gsld.tr >> ./obj/ldt.tr ./obj/aux/echogs -a ./obj/ldt.tr -s - -lm -ldl -liconv -L/opt/local/lib -lidn -lpaper -L/opt/local/lib -ltiff -L/opt/local/lib -lfontconfig -lfreetype -lfreetype -L/opt/local/lib -lopenjp2 -lpthread -lm if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ PSI_FEATURE_DEVS= FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \ DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ DEVICE_DEVS_EXTRA= \ /bin/sh <./obj/ldt.tr ld: warning: directory '-L/opt/local/lib' following -L not found Is ld expecting after '-L<path>' an argument that does not start with '-L'? (I am not sure which 'ld' is invoked by gcc.) (In reply to Peter Dyballa from comment #11) > (In reply to Chris Liddell (chrisl) from comment #10) > > > > Thanks for testing it. > > 'make check' produces in the end an error I do not understand: > > rm -f ./obj/gscdefs.c > cp ./base/gscdef.c ./obj/gscdefs.c > /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_MKSTEMP -DHAVE_FSEEKO > -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_BSWAP32 > -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF -DHAVE_PREAD_PWRITE=1 > -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2 -DNDEBUG > -isystem/opt/local/include -Wall -Wstrict-prototypes -Wundef > -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings > -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin > -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 > -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 > -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long > long" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch ppc > -DHAVE_RESTRICT=1 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -fno-strict-aliasing > -DHAVE_POPEN_PROTO=1 -I./obj -I./base -I./devices -DWHICH_CMS="lcms2" -o > ./obj/gscdefs.o -c ./obj/gscdefs.c > /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_MKSTEMP -DHAVE_FSEEKO > -DHAVE_FONTCONFIG -DHAVE_LIBIDN -DHAVE_SETLOCALE -DHAVE_BSWAP32 > -DHAVE_STRERROR -DHAVE_ISNAN -DHAVE_ISINF -DHAVE_PREAD_PWRITE=1 > -DGS_RECURSIVE_MUTEXATTR=PTHREAD_MUTEX_RECURSIVE -O2 -DNDEBUG > -isystem/opt/local/include -Wall -Wstrict-prototypes -Wundef > -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings > -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin > -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 > -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 > -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long > long" -D__USE_UNIX98=1 -D"strnlen(a,b)=strlen(a)" -pipe -Os -arch ppc > -DHAVE_RESTRICT=1 -DUSE_LIBICONV_GNU -DUSE_LIBPAPER -fno-strict-aliasing > -DHAVE_POPEN_PROTO=1 -I./obj -I./base -I./devices -DWHICH_CMS="lcms2" -o > ./obj/gsromfs0.o -c ./base/gsromfs0.c > ./obj/aux/echogs -w ./obj/ldt.tr -n - /opt/local/bin/gcc-apple-4.2 > -std=gnu99 -Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch > ppc -o ./bin/gs > ./obj/aux/echogs -a ./obj/ldt.tr -n -s ./obj/gsromfs0.o ./obj/gs.o -s > cat ./obj/gsld.tr >> ./obj/ldt.tr > ./obj/aux/echogs -a ./obj/ldt.tr -s - -lm -ldl -liconv -L/opt/local/lib > -lidn -lpaper -L/opt/local/lib -ltiff -L/opt/local/lib -lfontconfig > -lfreetype -lfreetype -L/opt/local/lib -lopenjp2 -lpthread -lm > if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \ > XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ > PSI_FEATURE_DEVS= FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= > DEVICE_DEVS3= \ > DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ > DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ > DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ > DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ > DEVICE_DEVS_EXTRA= \ > /bin/sh <./obj/ldt.tr > ld: warning: directory '-L/opt/local/lib' following -L not found > > > Is ld expecting after '-L<path>' an argument that does not start with '-L'? > (I am not sure which 'ld' is invoked by gcc.) Firstly, that's a warning, not an error - it even says "warning".... It's saying that the directory /opt/local/lib doesn't exist, or isn't accessible. I can't comment on whether that's accurate or not for your system, but it doesn't appear to be something we add to the command line, so it's either coming from the configure command line, the environment, or from something like pkg-config, maybe. |