Skip to contentSkip to conversation

build error on ppc

DISCUSSION Nico -telmich- Schottelius 2 participants 2 messages Feb 21, 2005

lore
Share & tools
lore
#0 lore raw

Moin!

I just wanted to compile grub2/cvs, but configure fails:

[10:31] ei:grub2% ./configure --prefix=/usr/packages/grub2 && make [...]
checking for objcopy... objcopy
checking whether objcopy works for absolute addresses... configure: error: gcc cann ot link at address 2000
[10:31] ei:grub2%

Calling
[10:49] ei:grub2% autoconf && autoheader

does not fix that.

After commenting out

#grub_PROG_OBJCOPY_ABSOLUTE

in configure.ac, autoconf && autoheader, ./configure works fine.

But then make fails:

-- snip --

gcc -o grub-emu grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-partmap_amiga.o grub_emu-partmap_pc.o grub_emu-partmap_apple.o grub_emu-fs_fshelp.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-fs_ufs.o grub_emu-fs_minix.o grub_emu-fs_hfs.o grub_emu-fs_jfs.o grub_emu-fs_iso9660.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_arg.o grub_emu-kern_partition.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o grub_emu-disk_loopback.o grub_emu-commands_ls.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_boot.o grub_emu-commands_cmp.o grub_emu-commands_cat.o -lncurses grub_emu-normal_menu.o(.text+0x944): In function `grub_menu_run':
normal/menu.c:296: undefined reference to `grub_menu_entry_run'
grub_emu-util_grub_emu.o(.text+0x414): In function `main':
util/grub-emu.c:191: undefined reference to `grub_halt_init'
grub_emu-util_grub_emu.o(.text+0x418):util/grub-emu.c:192: undefined reference to `grub_reboot_init'
grub_emu-util_grub_emu.o(.text+0x430):util/grub-emu.c:201: undefined reference to `grub_reboot_fini'
grub_emu-util_grub_emu.o(.text+0x434):util/grub-emu.c:202: undefined reference to `grub_halt_fini'
collect2: ld returned 1 exit status
make: *** [grub-emu] Error 1

-- snap --

I don't know wherefore grub_PROG_OBJCOPY_ABSOLUTE is needed, if it's only needed on x86 or whatever.

When those bugs are fixed in cvs, I'll recheck and report.

Nico

Signature · 3 lines
Keep it simple & stupid, use what's available.
Please use pgp encryption: 8D0E 27A4 is my id.
http://nico.schotteli.us | http://linux.schottelius.org
#1 lore raw
Quoted 13 lines · Nico -telmich- Schottelius

I just wanted to compile grub2/cvs, but configure fails:

[10:31] ei:grub2% ./configure --prefix=/usr/packages/grub2 && make [...]
checking for objcopy... objcopy
checking whether objcopy works for absolute addresses... configure: error: gcc cann ot link at address 2000
[10:31] ei:grub2%

Calling
[10:49] ei:grub2% autoconf && autoheader

Quoted 7 lines

does not fix that.

After commenting out

#grub_PROG_OBJCOPY_ABSOLUTE

in configure.ac, autoconf && autoheader, ./configure works fine.

That test passes for me. I'm slightly curious about what exactly it's doing and why it's there, but have never looked into it.

...
checking whether objcopy works for absolute addresses... yes
...

objcopy --version says "GNU objcopy 2.15" for me.

Quoted 4 lines

But then make fails:

-- snip --

Quoted 10 lines

gcc -o grub-emu grub_emu-kern_main.o grub_emu-kern_device.o grub_emu-kern_disk.o grub_emu-kern_dl.o grub_emu-kern_file.o grub_emu-kern_fs.o grub_emu-kern_err.o grub_emu-kern_misc.o grub_emu-kern_loader.o grub_emu-kern_rescue.o grub_emu-kern_term.o grub_emu-partmap_amiga.o grub_emu-partmap_pc.o grub_emu-partmap_apple.o grub_emu-fs_fshelp.o grub_emu-util_i386_pc_biosdisk.o grub_emu-fs_fat.o grub_emu-fs_ext2.o grub_emu-fs_ufs.o grub_emu-fs_minix.o grub_emu-fs_hfs.o grub_emu-fs_jfs.o grub_emu-fs_iso9660.o grub_emu-normal_cmdline.o grub_emu-normal_command.o grub_emu-normal_main.o grub_emu-normal_menu.o grub_emu-normal_arg.o grub_emu-kern_partition.o grub_emu-util_console.o grub_emu-util_grub_emu.o grub_emu-util_misc.o grub_emu-util_i386_pc_getroot.o grub_emu-kern_env.o grub_emu-disk_loopback.o grub_emu-commands_ls.o grub_emu-commands_help.o grub_emu-commands_terminal.o grub_emu-commands_boot.o grub_emu-commands_cmp.o grub_emu-commands_cat.o -lncurses grub_emu-normal_menu.o(.text+0x944): In function `grub_menu_run':
normal/menu.c:296: undefined reference to `grub_menu_entry_run'
grub_emu-util_grub_emu.o(.text+0x414): In function `main':
util/grub-emu.c:191: undefined reference to `grub_halt_init'
grub_emu-util_grub_emu.o(.text+0x418):util/grub-emu.c:192: undefined reference to `grub_reboot_init'
grub_emu-util_grub_emu.o(.text+0x430):util/grub-emu.c:201: undefined reference to `grub_reboot_fini'
grub_emu-util_grub_emu.o(.text+0x434):util/grub-emu.c:202: undefined reference to `grub_halt_fini'
collect2: ld returned 1 exit status
make: *** [grub-emu] Error 1

For a temporary fix, you can apply the patch I sent out 19 Feb 2005, in a mail titled "PPC build fixes."

However as you can see from that thread, there is one more addition I need to make before I can commit the patch, and I won't have time for that tonight. So it will be at least another day or two before CVS will build for PPC.

-Hollis