Opened 3 hours ago

#70960 new defect

leptonica @1.84.1_1 does not build on PPC Tiger, Mac OS X 10.4.11, because of: utils2.c:3133: error: '_CS_DARWIN_USER_TEMP_DIR' undeclared (first use in this function)

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: tiger ppc Cc: stromnov@…
Port: leptonica

Description

/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include/libpng16   -I/opt/local/include/webp -I/opt/local/include/webp -I/opt/local/include/openjpeg-2.5 -I/opt/local/include/giflib5 -I/opt/local/include  -pipe -I/opt/local/include/giflib5 -Os -arch ppc -MT utils2.lo -MD -MP -MF .deps/utils2.Tpo -c -o utils2.lo utils2.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include/libpng16 -I/opt/local/include/webp -I/opt/local/include/webp -I/opt/local/include/openjpeg-2.5 -I/opt/local/include/giflib5 -I/opt/local/include -pipe -I/opt/local/include/giflib5 -Os -arch ppc -MT utils2.lo -MD -MP -MF .deps/utils2.Tpo -c utils2.c  -fno-common -DPIC -o .libs/utils2.o
utils2.c: In function 'genPathname':
utils2.c:3133: error: '_CS_DARWIN_USER_TEMP_DIR' undeclared (first use in this function)
utils2.c:3133: error: (Each undeclared identifier is reported only once
utils2.c:3133: error: for each function it appears in.)
make[2]: *** [utils2.lo] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_graphics_leptonica/leptonica/work/leptonica-1.84.1/src'

This is the corresponding code, which might work in macOS (here it's Mac OS X):

 3131	    } else {  /* Rewrite with "/tmp" specified for the directory. */
 3132	#if defined(__APPLE__)
 3133	        size_t n = confstr(_CS_DARWIN_USER_TEMP_DIR, pathout, size);
 3134	        if (n == 0 || n > size) {
 3135	            /* Fall back to using /tmp */
 3136	            stringCopy(pathout, cdir, dirlen);
 3137	        } else {
 3138	            /* Add the rest of cdir */
 3139	            if (dirlen > 4)
 3140	                stringCat(pathout, size, cdir + 4);
 3141	        }

Attachments (1)

main.log (310.2 KB) - added by ballapete (Peter "Pete" Dyballa) 3 hours ago.
Main.log from PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (1)

Changed 3 hours ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger, Mac OS X 10.4.11

Note: See TracTickets for help on using tickets.