New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NeoChen1024 opened this Issue Nov 18, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@NeoChen1024

NeoChen1024 commented Nov 18, 2017

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]======

@chenall

This comment has been minimized.

Owner

chenall commented Feb 27, 2018

apt-get install gcc-multilib

@NeoChen1024

This comment has been minimized.

NeoChen1024 commented Feb 28, 2018

Arch Linux doesn't use APT!

@NeoChen1024

This comment has been minimized.

NeoChen1024 commented Feb 28, 2018

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

@CNAmira

This comment has been minimized.

CNAmira commented Apr 13, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment