Opened 3 months ago

Last modified 3 months ago

#69433 new defect

fdupes @2.3.0_0 does not build on PPC Leopard, Mac OS X 10.5.8, because invalid suffix "b1" on integer constant

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.1
Keywords: leopard ppc Cc: grimreaper@…
Port: fdupes

Description

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_fdupes/fdupes/work/fdupes-2.3.0'
depbase=`echo fdupes.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
	/usr/bin/gcc-4.2 -std=gnu99 -DHAVE_CONFIG_H -I.   -I/opt/local/include  -pipe -Os -arch ppc -MT fdupes.o -MD -MP -MF $depbase.Tpo -c -o fdupes.o fdupes.c &&\
	mv -f $depbase.Tpo $depbase.Po
fdupes.c:1134:57: error: invalid suffix "b1" on integer constant
fdupes.c:1321:53: error: invalid suffix "b1" on integer constant
make[1]: *** [fdupes.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_fdupes/fdupes/work/fdupes-2.3.0'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_sysutils_fdupes/fdupes/work/fdupes-2.3.0'

Attachments (1)

main.log (16.7 KB) - added by ballapete (Peter "Pete" Dyballa) 3 months ago.
Main.log from PPC Leopard, Mac OS X 10.5.8

Download all attachments as: .zip

Change History (2)

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

Attachment: main.log added

Main.log from PPC Leopard, Mac OS X 10.5.8

comment:1 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

This error seems to be very strange (at least to me)! In the pre-processed output I get from /usr/bin/gcc-4.2 -std=gnu99:

# 56 "fdupes.c" 2
# 1 "getrealpath.h" 1
# 20 "getrealpath.h"
#define GETREALPATH_H 

#define GETREALPATH_NONE 0b0
#define GETREALPATH_IGNORE_MISSING_BASENAME 0b1

char *getrealpath(const char *path, unsigned int options);
# 57 "fdupes.c" 2

Later getrealpath() is used like this on line #1134 (original C source -> pre-compiled)

deletepath = getrealpath(dupelist[x]->d_name, GETREALPATH_IGNORE_MISSING_BASENAME); -> deletepath = getrealpath(dupelist[x]->d_name, 0b1);

and like this on line #1321

deletepath = getrealpath(to_delete->d_name, GETREALPATH_IGNORE_MISSING_BASENAME);   -> deletepath = getrealpath(to_delete->d_name, 0b1);

Before, on line #285, the same function was this way successfully: fullpath = getrealpath(dir, 0);.

So the problem is that Apple's GCC 4.2 does not understand that "0b1" is an unsingned int… Which is correct, I think. Assigning a HEX value would need writing it as "0xb0" or "0xb1", isn't it?

Note: See TracTickets for help on using tickets.