Compilation fails with "ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)"

Bug #1920672 reported by Betim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

It compiles until the end and then just:
[6102/6103] Linking target qemu-system-alpha
[6103/6103] Linking target qemu-system-aarch64
make[1]: Leaving directory '/home/t/.cache/kiss/proc/32129/build/qemu/build'
make: *** [GNUmakefile:11: all] Error 2

Attached is the complete log including configure. I can't find why this is happening maybe I have a wrong version of a required library?

Any ideas?

Revision history for this message
Betim (betim) wrote :
Revision history for this message
Peter Maydell (pmaydell) wrote :

This isn't silent: the log says:

  BUILD multiboot.img
ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)

Which version of QEMU are you trying to build? Does this happen with head-of-git ?

Revision history for this message
Betim (betim) wrote :

I could not find
This is how it is configured:
./configure \
    --prefix=/usr \
    --localstatedir=/var \
    --sysconfdir=/etc \
    --enable-debug-info \
    --disable-gtk \
    --disable-docs \
    --enable-sdl \
    --enable-kvm \
    --enable-pie \
    --enable-curses \
    --disable-user \
    --disable-linux-user \
    --enable-system

Version: 5.2.0

Also this:
$ grep "\-no\-pie" configure
# Check we support --no-pie first; we will need this for building ROMs.
if compile_prog "-Werror -fno-pie" "-no-pie"; then
  LDFLAGS_NOPIE="-no-pie"

Adding another hyphen is not helping either.

I tried to comment out the whole block:
#if compile_prog "-Werror -fno-pie" "-no-pie"; then
  # CFLAGS_NOPIE="-fno-pie"
  # LDFLAGS_NOPIE="-no-pie"
#fi

And it compiled and linked without any problem.

Revision history for this message
Peter Maydell (pmaydell) wrote :

This is already fixed in upstream QEMU in commit bbd2d5a8120771, which will be in 6.0 and 5.2.1.

Changed in qemu:
status: New → Fix Committed
summary: - Compilation fails silently
+ Compilation fails with "ld: Error: unable to disambiguate: -no-pie (did
+ you mean --no-pie ?)"
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.