grub4dos icon indicating copy to clipboard operation
grub4dos copied to clipboard

Build failed on Arch Linux with binutils 2.29.1-1 and GCC 7.2.0-3

Open NeoChen1024 opened this issue 8 years ago • 6 comments
trafficstars

I cloned this Git repository, and tried to build it on Arch Linux. I always got this error message during running configure: "configure: error: GRUB requires a working absolute objcopy; upgrade your binutils" below is the full log. ======[cut here]====== neo_chen^NeoLinuxWorkstation ~/TEMP/grup4dos (0) >>$ ./configure

checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for style of include used by make... GNU checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking dependency style of gcc... gcc3 checking dependency style of gcc... gcc3 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking for gcc... (cached) gcc checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking dependency style of gcc... (cached) gcc3 checking for ranlib... ranlib checking whether optimization for size works... yes checking whether gcc has -fno-stack-protector... yes checking whether gcc has -fno-reorder-functions... yes checking whether -Wundef works... yes checking whether -falign-loops works... yes checking whether linker accepts `--build-id=none'... yes checking for objcopy... objcopy checking if C symbols get an underscore after compilation... no checking whether objcopy works for absolute addresses... no configure: error: GRUB requires a working absolute objcopy; upgrade your binutils ======[cut here]======

NeoChen1024 avatar Nov 18 '17 12:11 NeoChen1024

apt-get install gcc-multilib

chenall avatar Feb 27 '18 03:02 chenall

Arch Linux doesn't use APT!

NeoChen1024 avatar Feb 28 '18 02:02 NeoChen1024

And, on x86-64, Arch Linux merged gcc-multilib and gcc

NeoChen1024 avatar Feb 28 '18 03:02 NeoChen1024

According to the upstream grub2 code base, replace ${OBJCOPY-objcopy} -O binary conftest.exec conftest with ${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest in configure should work.

QianNangong avatar Apr 13 '18 13:04 QianNangong

This didn't work for me. Any other things to try?

chuckwagoncomputing avatar Apr 09 '20 22:04 chuckwagoncomputing

According to the upstream grub2 code base, replace ${OBJCOPY-objcopy} -O binary conftest.exec conftest with ${OBJCOPY-objcopy} --only-section=.text -O binary conftest.exec conftest in configure should work.

This worked for me but in Linux Mint 19

victordmontero avatar Aug 08 '20 17:08 victordmontero