Problem Compiling gnulib/getdelim on MacOSX
Hi,
when i try to compile grub 1.98 on MacOSX i have this error:
gcc-4.2 -Ignulib -I./gnulib -I/opt/local/include -I. -I./include -I./gnulib -I./include -Wall -W -DGRUB_LIBDIR=\"/opt/local/lib/echo grub/i386-pc | sed 's,x,x,'\" -DLOCALEDIR=\"\" -DGRUB_MACHINE_PCBIOS=1 -DAPPLE_CC=1 -fnested-functions -DGRUB_UTIL=1 -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" -I./gnulib -DGRUB_FILE=\"gnulib/getdelim.c\" -MD -c -o grub_script_check-gnulib_getdelim.o gnulib/getdelim.c gnulib/getdelim.c:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getdelim'
make: *** [grub_script_check-gnulib_getdelim.o] Error 1
The problem is that the ssize_t type is not defined. We need to add #include <unistd.h> on MacOSX like i do on my commit (r2175). But i know that we can't modify getdelim.c directly because is it imported.
So if someone have an idea to solve this problem on OSX......
Regards,
Yves Blusseau
Quoted 13 lines · Yves Blusseau
when i try to compile grub 1.98 on MacOSX i have this error:
gcc-4.2 -Ignulib -I./gnulib -I/opt/local/include -I. -I./include -I./gnulib -I./include -Wall -W -DGRUB_LIBDIR=\"/opt/local/lib/
echo grub/i386-pc | sed 's,x,x,'\" -DLOCALEDIR=\"\" -DGRUB_MACHINE_PCBIOS=1(quoted diff) +0
-3-DAPPLE_CC=1 -fnested-functions -DGRUB_UTIL=1 -Wno-undef -Wno-sign-compare -Wno-unused -D_GL_UNUSED="__attribute__ ((unused))" -I./gnulib -DGRUB_FILE=\"gnulib/getdelim.c\" -MD -c -ogrub_script_check-gnulib_getdelim.o
gnulib/getdelim.cgnulib/getdelim.c:59: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getdelim'
make: *** [grub_script_check-gnulib_getdelim.o] Error 1
Quoted 4 lines
The problem is that the
ssize_ttype is not defined. We need to add #include <unistd.h> on MacOSX like i do on my commit (r2175). But i know that we can't modifygetdelim.cdirectly because is it imported. So if someone have an idea to solve this problem on OSX......
We should import the ssize_t module from gnulib, which adds a configure macro for this. The way grub uses gnulib is a bit odd, though, so it's not something I'd feel comfortable with just fixing; it needs somebody more familiar with it. After we switch to automake (a prerequisite), could we switch to using gnulib-tool for the gnulib import as well, so that this becomes a bit more standard?
Signature · 1 line
Colin Watson [[email protected]]