In my last post I pasted the last few line of the compile log for syslinux-3.02pre2. Here are the correct lines from my failed attempt to compile syslinux-3.01. Still the same error. make[1]: Leaving directory `/usr/src/syslinux-3.01/unix' make[1]: Entering directory `/usr/src/syslinux-3.01/extlinux' gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libfat -c -o extlinux.o extlinux.c extlinux.c: In function `get_size': extlinux.c:285: error: `u64' undeclared (first use in this function) extlinux.c:285: error: (Each undeclared identifier is reported only once extlinux.c:285: error: for each function it appears in.) make[1]: *** [extlinux.o] Error 1 make[1]: Leaving directory `/usr/src/syslinux-3.01/extlinux' make: *** [installer] Error 2 Still on the same linux box that compiled syslinux-2.13 successfully. gcc-3.3.3, glibc-2.3.3, nasm-0.98.38, mtools-3.9.9, kernel 2.4.28 AMD64 3000+, running in 32bit mode. Terry Chan
Terry Chan wrote:> In my last post I pasted the last few line of the compile log for > syslinux-3.02pre2. Here are the correct lines from my failed attempt to > compile syslinux-3.01. Still the same error. > > make[1]: Leaving directory `/usr/src/syslinux-3.01/unix' > make[1]: Entering directory `/usr/src/syslinux-3.01/extlinux' > gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libfat -c -o extlinux.o extlinux.c > extlinux.c: In function `get_size': > extlinux.c:285: error: `u64' undeclared (first use in this function) > extlinux.c:285: error: (Each undeclared identifier is reported only once > extlinux.c:285: error: for each function it appears in.) > make[1]: *** [extlinux.o] Error 1 > make[1]: Leaving directory `/usr/src/syslinux-3.01/extlinux' > make: *** [installer] Error 2 > > Still on the same linux box that compiled syslinux-2.13 successfully. > gcc-3.3.3, glibc-2.3.3, nasm-0.98.38, mtools-3.9.9, kernel 2.4.28 > AMD64 3000+, running in 32bit mode. >Could you please try 3.02-pre2? -hpa
Terry Chan wrote:> > b) grep -r BLKGETSIZE /usr/include says: > > /usr/include/sys/mount.h:#define BLKGETSIZE _IO(0x12, 96) /* Return device size. */ > /usr/include/linux/fs.h:#define BLKGETSIZE _IO(0x12,96) /* return device size /512 (long *arg) */ > /usr/include/linux/fs.h:#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */Okay, your <linux/fs.h> is broken beyond repair. The proper definition of BLKGETSIZE64 is: #define BLKGETSIZE64 _IOR(0x12,114,size_t) There is no "sizeof", and u64 doesn't belong in the user headers. I suspect this particular screwup is probably the reason that it's size_t instead of the proper __u64 in the current definition, because sizeof() returns a size_t, so by putting sizeof(u64) they basically did sizeof(sizeof(u64)), which is equivalent to sizeof(size_t) if u64 is defined. This is way ugly. The best bet is to add right after #include <inttypes.h> +typedef uint64_t u64; ... and see if that helps. Barf, puke. -hpa