All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
@ 2020-05-13  7:06 Christophe Lyon
  2020-05-14  8:27 ` [Bug 1878348] " Laurent Vivier
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Christophe Lyon @ 2020-05-13  7:06 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Hi,

Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
fails when configured with --static (eg ../configure --target-
list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

On ubuntu 16.04, it fails to find -lffi and -lselinux.

After I apt-get install libffi-dev libselinux1-dev, the build still fails:
../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
/home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
/home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
/home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
/home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
collect2: error: ld returned 1 exit status

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
@ 2020-05-14  8:27 ` Laurent Vivier
  2020-05-14  9:16 ` Christophe Lyon
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Laurent Vivier @ 2020-05-14  8:27 UTC (permalink / raw)
  To: qemu-devel

I'm not able to reproduce your problem.

Are you able to reproduce the problem if you cleanup your build
directory (make distclean)?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
  2020-05-14  8:27 ` [Bug 1878348] " Laurent Vivier
@ 2020-05-14  9:16 ` Christophe Lyon
  2020-05-14  9:55 ` Daniel Berrange
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Christophe Lyon @ 2020-05-14  9:16 UTC (permalink / raw)
  To: qemu-devel

Right, after a make distclean + configure, I managed to complete the
build after installing libffi-dev libselinux1-dev.

However, I think there's a bug in configure: it should either complain
when these packages are missing, or disable the module that needs them.

Without libffi-dev and libselinux1-dev, the build fails with:
  LINK    x86_64-softmmu/qemu-system-x86_64
/usr/bin/ld: cannot find -lselinux
/usr/bin/ld: cannot find -lffi

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
  2020-05-14  8:27 ` [Bug 1878348] " Laurent Vivier
  2020-05-14  9:16 ` Christophe Lyon
@ 2020-05-14  9:55 ` Daniel Berrange
  2020-05-14 10:07 ` Peter Maydell
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Daniel Berrange @ 2020-05-14  9:55 UTC (permalink / raw)
  To: qemu-devel

Semi-officially, QEMU only aims to support static linking with usermode
emulators, not system mode emulators.  I'm not sure we make that clear
anywhere in the docs, or configure script. We should probably print a
warning from configure if using --static in combination with system
emulators, that this is an untested scenario and users are responsible
for figuring out any problems they hit such as missing libraries at link
time.

In particular it is a known limitation that the configure checks for
pre-requisite libraries only validate existence of the shared libraries,
and make no attempt to look for the static variant, and it was decided
not to fix that.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (2 preceding siblings ...)
  2020-05-14  9:55 ` Daniel Berrange
@ 2020-05-14 10:07 ` Peter Maydell
  2020-05-15  8:22 ` Christophe Lyon
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2020-05-14 10:07 UTC (permalink / raw)
  To: qemu-devel

I think it's largely that many distros ship pkg-config files which are
just broken for the static linking case -- so configure tests "does pkg-
config say this will work for static linking", and pkg-config says "yes,
that will work", and then it doesn't. If you care about trying to get
this to be more reliable you'd want to investigate all of these and file
bugs upstream with your distro and get them fixed...

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (3 preceding siblings ...)
  2020-05-14 10:07 ` Peter Maydell
@ 2020-05-15  8:22 ` Christophe Lyon
  2020-05-15  8:48 ` Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Christophe Lyon @ 2020-05-15  8:22 UTC (permalink / raw)
  To: qemu-devel

OK I wasn't aware that static linking was not supported by system
emulators, thanks for the heads-up. I've updated our build scripts not
to use static link, so you can close this PR unless you want to keep
track that configure needs improvements.

Thanks.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (4 preceding siblings ...)
  2020-05-15  8:22 ` Christophe Lyon
@ 2020-05-15  8:48 ` Philippe Mathieu-Daudé
  2020-05-15  9:11 ` Christophe Lyon
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-15  8:48 UTC (permalink / raw)
  To: qemu-devel

For the record, previous attempt to fix:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg624142.html
and identical conclusion:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg624164.html

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (5 preceding siblings ...)
  2020-05-15  8:48 ` Philippe Mathieu-Daudé
@ 2020-05-15  9:11 ` Christophe Lyon
  2020-05-15 10:25 ` Peter Maydell
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Christophe Lyon @ 2020-05-15  9:11 UTC (permalink / raw)
  To: qemu-devel

Maybe --static should be ignored for system emulators and accepted for user-mode emulators?
That would enable to have a single build, otherwise if we want both, we'd need to configure & build QEMU twice.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (6 preceding siblings ...)
  2020-05-15  9:11 ` Christophe Lyon
@ 2020-05-15 10:25 ` Peter Maydell
  2021-05-06 16:57 ` Thomas Huth
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2020-05-15 10:25 UTC (permalink / raw)
  To: qemu-devel

Some people want the system emulation to be statically linked, which is
why we don't refuse to do it entirely; and static vs not changes a bunch
of stuff like CFLAGS which we assume to be common across the whole
build. So if you want some statically linked binaries and some not
statically linked, then yes, you should configure and build twice. (Use
separate build directories, one for each config.)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  New

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (7 preceding siblings ...)
  2020-05-15 10:25 ` Peter Maydell
@ 2021-05-06 16:57 ` Thomas Huth
  2021-05-06 17:41 ` Peter Maydell
  2021-05-06 17:46 ` Christophe Lyon
  10 siblings, 0 replies; 12+ messages in thread
From: Thomas Huth @ 2021-05-06 16:57 UTC (permalink / raw)
  To: qemu-devel

The QEMU project is currently moving its bug tracking to another system.
For this we need to know which bugs are still valid and which could be
closed already. Thus we are setting older bugs to "Incomplete" now.

If the bug has already been fixed in the latest upstream version of QEMU,
then please close this ticket as "Fix released".

If it is not fixed yet and you think that this bug report here is still
valid, then you have two options:

1) If you already have an account on gitlab.com, please open a new ticket
for this problem in our new tracker here:

    https://gitlab.com/qemu-project/qemu/-/issues

and then close this ticket here on Launchpad (or let it expire auto-
matically after 60 days). Please mention the URL of this bug ticket on
Launchpad in the new ticket on GitLab.

2) If you don't have an account on gitlab.com and don't intend to get
one, but still would like to keep this ticket opened, then please switch
the state back to "New" within the next 60 days (otherwise it will get
closed as "Expired"). We will then eventually migrate the ticket auto-
matically to the new system.

Thank you and sorry for the inconvenience.


** Changed in: qemu
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  Incomplete

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (8 preceding siblings ...)
  2021-05-06 16:57 ` Thomas Huth
@ 2021-05-06 17:41 ` Peter Maydell
  2021-05-06 17:46 ` Christophe Lyon
  10 siblings, 0 replies; 12+ messages in thread
From: Peter Maydell @ 2021-05-06 17:41 UTC (permalink / raw)
  To: qemu-devel

FWIW, a configure line that works for me for static system-emulation
builds on Ubuntu 18.04 with QEMU 6.0 is:

'../../configure' '--target-list=arm-softmmu' '--enable-debug' '--
static' '--disable-tools' '--disable-sdl' '--disable-gtk' '--disable-
vnc' '--disable-virtfs' '--disable-attr' '--disable-libiscsi'
'--disable-libnfs' '--disable-libusb' '--disable-opengl' '--disable-
numa' '--disable-usb-redir' '--disable-bzip2' '--audio-drv-list='
'--disable-guest-agent' '--disable-vte' '--disable-mpath' '--disable-
libudev' '--disable-vhost-user' '--disable-curl'

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  Fix Released

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug 1878348] Re: --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)
  2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
                   ` (9 preceding siblings ...)
  2021-05-06 17:41 ` Peter Maydell
@ 2021-05-06 17:46 ` Christophe Lyon
  10 siblings, 0 replies; 12+ messages in thread
From: Christophe Lyon @ 2021-05-06 17:46 UTC (permalink / raw)
  To: qemu-devel

I have re-tested at commit d45a5270d075ea589f0b0ddcf963a5fea1f500ac, and
the build succeeded, so it looks like the problem has been fixed.


** Changed in: qemu
       Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1878348

Title:
  --static build fails in v5.0 (since
  5010cec2bc87dafab39b3913c8ca91f88df9c540)

Status in QEMU:
  Fix Released

Bug description:
  Hi,

  Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
  fails when configured with --static (eg ../configure --target-
  list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).

  On ubuntu 16.04, it fails to find -lffi and -lselinux.

  After I apt-get install libffi-dev libselinux1-dev, the build still fails:
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_pre_save':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:29: undefined reference to `_TRACE_DBUS_VMSTATE_PRE_SAVE_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_post_load':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:52: undefined reference to `_TRACE_DBUS_VMSTATE_POST_LOAD_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_loading':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:75: undefined reference to `_TRACE_DBUS_VMSTATE_LOADING_DSTATE'
  ../backends/dbus-vmstate.o: In function `_nocheck__trace_dbus_vmstate_saving':
  /home/christophe.lyon/src/qemu/build-static/backends/trace.h:98: undefined reference to `_TRACE_DBUS_VMSTATE_SAVING_DSTATE'
  collect2: error: ld returned 1 exit status

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1878348/+subscriptions


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-05-06 18:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  7:06 [Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540) Christophe Lyon
2020-05-14  8:27 ` [Bug 1878348] " Laurent Vivier
2020-05-14  9:16 ` Christophe Lyon
2020-05-14  9:55 ` Daniel Berrange
2020-05-14 10:07 ` Peter Maydell
2020-05-15  8:22 ` Christophe Lyon
2020-05-15  8:48 ` Philippe Mathieu-Daudé
2020-05-15  9:11 ` Christophe Lyon
2020-05-15 10:25 ` Peter Maydell
2021-05-06 16:57 ` Thomas Huth
2021-05-06 17:41 ` Peter Maydell
2021-05-06 17:46 ` Christophe Lyon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.