Bug 703947

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 LibraryAssignee: 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
It's just warning:

make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_ghostscript/ghostscript/work/ghostpdl-9.54.0'
/usr/bin/make -f Makefile GS_DOT_O= REALMAIN_OBJ= GS_XE=./sobin/libgs.9.54.dylib GPCL_XE=./sobin/libno_gpcl6.9.54.dylib GXPS_XE=./sobin/libno_gxps.9.54.dylib GPDL_XE=./sobin/libno_gpdl.9.54.dylib DISPLAY_DEV=./soobj/display.dev BUILDDIRPREFIX=so GENOPT='' GS_LDFLAGS='-Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc   -dynamiclib -install_name /opt/local/lib/libgs.9.54.dylib'\
         PCL_LDFLAGS='-Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc   -dynamiclib -install_name /opt/local/lib/libno_gpcl6.9.54.dylib' XPS_LDFLAGS='-Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc   -dynamiclib -install_name /opt/local/lib/libno_gxps.9.54.dylib' \
         PDL_LDFLAGS='-Lsobin -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc   -dynamiclib -install_name /opt/local/lib/libno_gpdl.9.54.dylib' CFLAGS='-O2 -DNDEBUG -fPIC  \
         -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  ' prefix=/opt/local
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_print_ghostscript/ghostscript/work/ghostpdl-9.54.0'
/usr/bin/gcc-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 -fPIC           -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./soobj -I./base -I./devices  -DWHICH_CMS="lcms2" -o ./soobj/gp_getnv.o -c ./base/gp_getnv.c
In file included from ./base/scommon.h:25,
                 from ./base/srdline.h:23,
                 from ./base/gp.h:41,
                 from ./base/gp_getnv.c:22:
./base/stdint_.h:184:6: warning: "ARCH_SIZEOF_SIZE_T" is not defined
./base/stdint_.h:245:6: warning: "ARCH_SIZEOF_SIZE_T" is not defined

"ARCH_SIZEOF_SIZE_T" is sometimes defined here:

  130	#if defined(HAVE_INTTYPES_H) && HAVE_INTTYPES_H == 1
  131	# include <inttypes.h>
  132	#else
  133	# if defined(__WIN32__)
  134	#  define PRId32 "I32d"
  135	#  define PRId64 "I64d"
  136	#  define PRIi32 "I32i"
  137	#  define PRIi64 "I64i"
  138	#  define PRIu32 "I32u"
  139	#  define PRIu64 "I64u"
  140	#  define PRIx64 "I64x"
  141	#  if ARCH_SIZEOF_SIZE_T == 4
  142	#   define PRIxSIZE "x"
  143	#   define PRIuSIZE "u"
  144	#   define PRIdSIZE "d"
  145	#   define PRIiSIZE "i"
  146	#  else
  147	#   define PRIxSIZE "I64x"
  148	#   define PRIuSIZE "I64u"
  149	#   define PRIdSIZE "I64d"
  150	#   define PRIiSIZE "I64i"
  151	#  endif
  152	# endif
  153	#endif

autoreconf produces some warnings, configure is invoked with "--prefix=/opt/local --disable-compile-inits --disable-cups --disable-dbus --disable-gtk --without-pcl --without-xps --without-gpdl --with-x --with-system-libtiff".
It is not checked whether ARCH_SIZEOF_SIZE_T gets defined somewhere, config.log just contains:

 3414	ARCH_SIZEOF_SIZE_T=''

The default compiler used is "/usr/bin/gcc-4.2 -std=gnu99".
Comment 1 Peter Dyballa 2021-06-17 07:52:05 UTC
Created attachment 21082 [details]
config.log from PowerPC MacOSX 10.5.8, Leopard, with GCC 4.2
Comment 2 Peter Dyballa 2021-06-17 09:47:15 UTC
The same reports of not being defined appear with GCC7 (7.5.0).
Comment 3 Peter Dyballa 2021-08-18 16:36:29 UTC
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|
Comment 4 Chris Liddell (chrisl) 2021-08-18 18:35:54 UTC
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
Comment 5 Chris Liddell (chrisl) 2021-08-18 18:37:09 UTC
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
Comment 6 Chris Liddell (chrisl) 2021-08-18 18:39:18 UTC
It's a bit difficult for me to test, because I no longer have access to a PPC Mac.....
Comment 7 Peter Dyballa 2021-08-18 19:03:33 UTC
(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.
Comment 8 Peter Dyballa 2021-08-18 19:10:56 UTC
(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).
Comment 9 Peter Dyballa 2021-08-18 21:42:27 UTC
(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.
Comment 10 Chris Liddell (chrisl) 2021-08-19 07:32:39 UTC
Patch pushed to canonical repo:

https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=6befad2584a3


Thanks for testing it.
Comment 11 Peter Dyballa 2021-08-19 09:18:36 UTC
(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.)
Comment 12 Chris Liddell (chrisl) 2021-08-19 10:02:12 UTC
(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.