[plug] building GRUB against uClibc or as a static binary?
Craig Ringer
craig at postnewspapers.com.au
Sun Aug 3 21:45:32 WST 2003
Hi folks
I'm working on a netbootable utility image to be used as an installer
for the Computer Angels distro. All's going well, and is mostly done,
but I'm running into a frustrating problem with GRUB. Maybe someone on
[plug] can help out...
I had to fetch the GRUB CVS, as GNU's ftp seems to be going senile (the
grub dir linked to from everywhere just isn't there). It builds fine on
RH9 against glibc, but when I try to build against uClibc for use on the
image it fails.
The uClibc list archives are 404'ing on me, and what I've been able to
get from google cache hasn't been helpful. Maybe something has been
broken in the current CVS that prevents it from building against uClibc?
Everything else (busybox, coreutils' dd, gzip, e2fsprogs, etc) builds
and runs fine against uClibc.
I didn't see any options in the configure script to build as static, and
I'm hoping to avoid it for space reasons anyway. I can always try
CFLAGS='-static' I guess..
The build failure is part way into the compile process, most of which
goes fine. The output I'm getting from gcc/make (well, the last part of
the output) is:
make[2]: Entering directory `/home/craig/build/embed/grub/grub/grub'
source='main.c' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -Wmissing-prototypes -Wunused
-Wshadow
-Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1
-Wundef -O2
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1
-DSUPPORT_HERCULES=1 -DSUPPORT_SERIAL=1 -fwritable-strings -I../stage2
-I../stage1 -I../lib -g -c `test -f main.c || echo './'`main.c
source='asmstub.c' object='asmstub.o' libtool=no \
depfile='.deps/asmstub.Po' tmpdepfile='.deps/asmstub.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -Wall -Wmissing-prototypes -Wunused
-Wshadow
-Wpointer-arith -falign-jumps=1 -falign-loops=1 -falign-functions=1
-Wundef -O2
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1
-DSUPPORT_HERCULES=1 -DSUPPORT_SERIAL=1 -fwritable-strings -I../stage2
-I../stage1 -I../lib -g -c `test -f asmstub.c || echo './'`asmstub.c
asmstub.c: In function `grub_stage2':
asmstub.c:170: warning: implicit declaration of function `initscr'
asmstub.c:171: warning: implicit declaration of function `cbreak'
asmstub.c:172: warning: implicit declaration of function `noecho'
asmstub.c:173: warning: implicit declaration of function `nonl'
asmstub.c:174: warning: implicit declaration of function `scrollok'
asmstub.c:174: `stdscr' undeclared (first use in this function)
asmstub.c:174: (Each undeclared identifier is reported only once
asmstub.c:174: for each function it appears in.)
asmstub.c:174: `TRUE' undeclared (first use in this function)
asmstub.c:175: warning: implicit declaration of function `keypad'
asmstub.c:176: warning: implicit declaration of function `wtimeout'
asmstub.c:193: warning: implicit declaration of function `endwin'
asmstub.c: In function `console_putchar':
asmstub.c:566: warning: implicit declaration of function `getyx'
asmstub.c:566: `stdscr' undeclared (first use in this function)
asmstub.c:567: `LINES' undeclared (first use in this function)
asmstub.c:568: warning: implicit declaration of function `scroll'
asmstub.c:570: warning: implicit declaration of function `move'
asmstub.c:577: `COLS' undeclared (first use in this function)
asmstub.c:582: warning: implicit declaration of function `addch'
asmstub.c: At top level:
asmstub.c:606: `ERR' undeclared here (not in a function)
asmstub.c: In function `console_translate_key':
asmstub.c:614: `KEY_LEFT' undeclared (first use in this function)
asmstub.c:616: `KEY_RIGHT' undeclared (first use in this function)
asmstub.c:618: `KEY_UP' undeclared (first use in this function)
asmstub.c:620: `KEY_DOWN' undeclared (first use in this function)
asmstub.c:622: `KEY_DC' undeclared (first use in this function)
asmstub.c:624: `KEY_BACKSPACE' undeclared (first use in this function)
asmstub.c:626: `KEY_HOME' undeclared (first use in this function)
asmstub.c:628: `KEY_END' undeclared (first use in this function)
asmstub.c:630: `KEY_PPAGE' undeclared (first use in this function)
asmstub.c:632: `KEY_NPAGE' undeclared (first use in this function)
asmstub.c: In function `console_checkkey':
asmstub.c:652: `ERR' undeclared (first use in this function)
asmstub.c:655: warning: implicit declaration of function `getch'
asmstub.c: In function `console_getkey':
asmstub.c:678: `ERR' undeclared (first use in this function)
asmstub.c:685: `stdscr' undeclared (first use in this function)
asmstub.c: In function `console_getxy':
asmstub.c:707: `stdscr' undeclared (first use in this function)
asmstub.c: In function `console_cls':
asmstub.c:729: warning: implicit declaration of function `clear'
make[2]: *** [asmstub.o] Error 1
make[2]: Leaving directory `/home/craig/build/embed/grub/grub/grub'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/craig/build/embed/grub/grub'
make: *** [all] Error 2
Ideas, anybody?
I'll be trying to stumble through the C and figure out what's going on,
but if there's someone here who has some idea I'd love to hear suggestions.
*arrggh*
Mostly there, so of course something really annoying happens.
Craig Ringer
More information about the plug
mailing list