qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
@ 2019-06-14  7:24 Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Hi,

Apparently QEMU static linking is slowly bitroting. Obviously it
depends the libraries an user has installed, anyway it seems there
are not much testing done.

This series fixes few issues, enough to build QEMU on a Ubuntu
aarch64 host, but not yet on a x86_64 host:

    LINK    x86_64-softmmu/qemu-system-x86_64
  /usr/bin/ld: cannot find -lgtk-3
  /usr/bin/ld: cannot find -latk-bridge-2.0
  /usr/bin/ld: cannot find -latspi
  /usr/bin/ld: cannot find -lsystemd
  /usr/bin/ld: cannot find -lgdk-3
  /usr/bin/ld: cannot find -lwayland-egl
  /usr/bin/ld: cannot find -lmirclient
  /usr/bin/ld: cannot find -lmircore
  /usr/bin/ld: cannot find -lmircookie
  /usr/bin/ld: cannot find -lepoxy
  /usr/bin/ld: cannot find -latk-1.0
  /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
  /usr/bin/ld: cannot find -lselinux
  /usr/bin/ld: cannot find -lgtk-3
  /usr/bin/ld: cannot find -latk-bridge-2.0
  /usr/bin/ld: cannot find -latspi
  /usr/bin/ld: cannot find -lsystemd
  /usr/bin/ld: cannot find -lgdk-3
  /usr/bin/ld: cannot find -lwayland-egl
  /usr/bin/ld: cannot find -lmirclient
  /usr/bin/ld: cannot find -lmircore
  /usr/bin/ld: cannot find -lmircookie
  /usr/bin/ld: cannot find -lepoxy
  /usr/bin/ld: cannot find -latk-1.0
  /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
  /usr/bin/ld: cannot find -lselinux
  /usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
  collect2: error: ld returned 1 exit status

Regards,

Phil.

Philippe Mathieu-Daudé (6):
  configure: Only generate GLUSTERFS variables if glusterfs is usable
  configure: Link test before auto-enabling glusterfs libraries
  configure: Link test before auto-enabling the libusb library
  configure: Link test before auto-enabling the libusbredir library
  configure: Link test before auto-enabling the pulseaudio library
  .travis.yml: Test static linking

 .travis.yml |   5 +++
 configure   | 113 +++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 90 insertions(+), 28 deletions(-)

-- 
2.20.1



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

* [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14  7:43   ` Niels de Vos
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

It is pointless and confusing to have GLUSTERFS variables
in config-host.mak when glusterfs is not usable.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/configure b/configure
index b091b82cb3..13fd4a1166 100755
--- a/configure
+++ b/configure
@@ -7118,30 +7118,30 @@ if test "$glusterfs" = "yes" ; then
   echo "CONFIG_GLUSTERFS=m" >> $config_host_mak
   echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak
   echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
-fi
 
-if test "$glusterfs_xlator_opt" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
-fi
+  if test "$glusterfs_xlator_opt" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
+  fi
 
-if test "$glusterfs_discard" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
-fi
+  if test "$glusterfs_discard" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
+  fi
 
-if test "$glusterfs_fallocate" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak
-fi
+  if test "$glusterfs_fallocate" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak
+  fi
 
-if test "$glusterfs_zerofill" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
-fi
+  if test "$glusterfs_zerofill" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
+  fi
 
-if test "$glusterfs_ftruncate_has_stat" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak
-fi
+  if test "$glusterfs_ftruncate_has_stat" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak
+  fi
 
-if test "$glusterfs_iocb_has_stat" = "yes" ; then
-  echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak
+  if test "$glusterfs_iocb_has_stat" = "yes" ; then
+    echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak
+  fi
 fi
 
 if test "$libssh2" = "yes" ; then
-- 
2.20.1



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

* [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14  8:40   ` Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 3/6] configure: Link test before auto-enabling the libusb library Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Similarly to commit a73e82ef912, test the libraries link correctly
before considering them as usable.

This fixes using ./configure --static on Ubuntu 18.04:

  $ make subdir-aarch64-softmmu
  [...]
    LINK    aarch64-softmmu/qemu-system-aarch64
  /usr/bin/ld: cannot find -lgfapi
  /usr/bin/ld: cannot find -lglusterfs
  /usr/bin/ld: cannot find -lgfrpc
  /usr/bin/ld: cannot find -lgfxdr
  collect2: error: ld returned 1 exit status
  Makefile:204: recipe for target 'qemu-system-aarch64' failed
  make[1]: *** [qemu-system-aarch64] Error 1

  $ fgrep gf config-host.mak
  GLUSTERFS_LIBS=-lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid

  $ lsb_release -cri
  Distributor ID: Ubuntu
  Release:        18.04
  Codename:       bionic

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 13fd4a1166..3428adb75b 100755
--- a/configure
+++ b/configure
@@ -4179,9 +4179,23 @@ fi
 # glusterfs probe
 if test "$glusterfs" != "no" ; then
   if $pkg_config --atleast-version=3 glusterfs-api; then
-    glusterfs="yes"
     glusterfs_cflags=$($pkg_config --cflags glusterfs-api)
-    glusterfs_libs=$($pkg_config --libs glusterfs-api)
+    if test "$static" = "yes"; then
+        glusterfs_libs=$($pkg_config --libs --static glusterfs-api)
+    else
+        glusterfs_libs=$($pkg_config --libs glusterfs-api)
+    fi
+    # Packaging for the static libraries is not always correct.
+    # At least ubuntu 18.04 ships only shared libraries.
+    write_c_skeleton
+    if ! compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then
+        if test "$glusterfs" = "yes" ; then
+          error_exit "glusterfs check failed."
+        fi
+        glusterfs="no"
+    else
+        glusterfs="yes"
+    fi
     if $pkg_config --atleast-version=4 glusterfs-api; then
       glusterfs_xlator_opt="yes"
     fi
-- 
2.20.1



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

* [Qemu-devel] [PATCH 3/6] configure: Link test before auto-enabling the libusb library
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 4/6] configure: Link test before auto-enabling the libusbredir library Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Similarly to commit a73e82ef912, test the library links correctly
before considering it as usable.

This fixes using ./configure --static on Ubuntu 18.04:

  $ make subdir-aarch64-softmmu
  [...]
    LINK    aarch64-softmmu/qemu-system-aarch64
  /usr/bin/ld: cannot find -ludev
  collect2: error: ld returned 1 exit status
  Makefile:204: recipe for target 'qemu-system-aarch64' failed
  make[1]: *** [qemu-system-aarch64] Error 1

  $ fgrep udev config-host.mak
  LIBUSB_LIBS=-lusb-1.0 -ludev -pthread

  $ lsb_release -cri
  Distributor ID: Ubuntu
  Release:        18.04
  Codename:       bionic

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 3428adb75b..e2511df1e3 100755
--- a/configure
+++ b/configure
@@ -4898,9 +4898,23 @@ fi
 # check for libusb
 if test "$libusb" != "no" ; then
     if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
-        libusb="yes"
         libusb_cflags=$($pkg_config --cflags libusb-1.0)
-        libusb_libs=$($pkg_config --libs libusb-1.0)
+        if test "$static" = "yes"; then
+            libusb_libs=$($pkg_config --libs --static libusb-1.0)
+        else
+            libusb_libs=$($pkg_config --libs libusb-1.0)
+        fi
+        # Packaging for the static libraries is not always correct.
+        # At least ubuntu 18.04 ships only shared libraries.
+        write_c_skeleton
+        if ! compile_prog "$libusb_cflags" "$libusb_libs" ; then
+            if test "$libusb" = "yes" ; then
+              error_exit "libusb check failed."
+            fi
+            libusb="no"
+        else
+            libusb="yes"
+        fi
     else
         if test "$libusb" = "yes"; then
             feature_not_found "libusb" "Install libusb devel >= 1.0.13"
-- 
2.20.1



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

* [Qemu-devel] [PATCH 4/6] configure: Link test before auto-enabling the libusbredir library
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 3/6] configure: Link test before auto-enabling the libusb library Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 5/6] configure: Link test before auto-enabling the pulseaudio library Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Similarly to commit a73e82ef912, test the library links correctly
before considering it as usable.

This fixes using ./configure --static on Ubuntu 18.04:

  $ make subdir-aarch64-softmmu
  [...]
    LINK    aarch64-softmmu/qemu-system-aarch64
  /usr/bin/ld: cannot find -lusbredirparser
  collect2: error: ld returned 1 exit status
  Makefile:204: recipe for target 'qemu-system-aarch64' failed
  make[1]: *** [qemu-system-aarch64] Error 1

  $ fgrep redir config-host.mak
  USB_REDIR_LIBS=-lusbredirparser

  $ lsb_release -cri
  Distributor ID: Ubuntu
  Release:        18.04
  Codename:       bionic

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index e2511df1e3..4eed33e1b1 100755
--- a/configure
+++ b/configure
@@ -4926,9 +4926,23 @@ fi
 # check for usbredirparser for usb network redirection support
 if test "$usb_redir" != "no" ; then
     if $pkg_config --atleast-version=0.6 libusbredirparser-0.5; then
-        usb_redir="yes"
         usb_redir_cflags=$($pkg_config --cflags libusbredirparser-0.5)
-        usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5)
+        if test "$static" = "yes"; then
+            usb_redir_libs=$($pkg_config --libs --static libusbredirparser-0.5)
+        else
+            usb_redir_libs=$($pkg_config --libs libusbredirparser-0.5)
+        fi
+        # Packaging for the static libraries is not always correct.
+        # At least ubuntu 18.04 ships only shared libraries.
+        write_c_skeleton
+        if ! compile_prog "$usb_redir_cflags" "$usb_redir_libs" ; then
+            if test "$usb_redir" = "yes" ; then
+              error_exit "usbredir check failed."
+            fi
+            usb_redir="no"
+        else
+            usb_redir="yes"
+        fi
     else
         if test "$usb_redir" = "yes"; then
             feature_not_found "usb-redir" "Install usbredir devel"
-- 
2.20.1



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

* [Qemu-devel] [PATCH 5/6] configure: Link test before auto-enabling the pulseaudio library
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 4/6] configure: Link test before auto-enabling the libusbredir library Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Similarly to commit a73e82ef912, test the library links correctly
before considering it as usable.

This fixes using ./configure --static on Ubuntu 18.04:

  $ make subdir-aarch64-softmmu
  [...]
    LINK    aarch64-softmmu/qemu-system-aarch64
  /usr/bin/ld: cannot find -lpulse
  /usr/bin/ld: cannot find -lpulsecommon-11.1
  collect2: error: ld returned 1 exit status
  Makefile:204: recipe for target 'qemu-system-aarch64' failed
  make[1]: *** [qemu-system-aarch64] Error 1

  $ fgrep pulse config-host.mak
  PULSE_LIBS=-L/usr/lib/aarch64-linux-gnu/pulseaudio -lpulse -lpulsecommon-11.1

  $ lsb_release -cri
  Distributor ID: Ubuntu
  Release:        18.04
  Codename:       bionic

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 4eed33e1b1..4d015496ae 100755
--- a/configure
+++ b/configure
@@ -3408,10 +3408,25 @@ for drv in $audio_drv_list; do
 
     pa | try-pa)
     if $pkg_config libpulse --exists; then
-        pulse_libs=$($pkg_config libpulse --libs)
-        audio_pt_int="yes"
-        if test "$drv" = "try-pa"; then
-            audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+        pulse_cflags=$($pkg_config --cflags libpulse)
+        if test "$static" = "yes"; then
+            pulse_libs=$($pkg_config --libs --static libpulse)
+        else
+            pulse_libs=$($pkg_config --libs libpulse)
+        fi
+        # Packaging for the static libraries is not always correct.
+        # At least ubuntu 18.04 ships only shared libraries.
+        write_c_skeleton
+        if ! compile_prog "$pulse_cflags" "$pulse_libs" ; then
+            unset pulse_cflags pulse_libs
+            if test "$drv" = "try-pa"; then
+                audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa//')
+            fi
+        else
+            audio_pt_int="yes"
+            if test "$drv" = "try-pa"; then
+                audio_drv_list=$(echo "$audio_drv_list" | sed -e 's/try-pa/pa/')
+            fi
         fi
     else
         if test "$drv" = "try-pa"; then
-- 
2.20.1



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

* [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 5/6] configure: Link test before auto-enabling the pulseaudio library Philippe Mathieu-Daudé
@ 2019-06-14  7:24 ` Philippe Mathieu-Daudé
  2019-06-14 14:03   ` Alex Bennée
  2019-06-14  8:48 ` [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
  2019-06-14  8:53 ` Peter Maydell
  7 siblings, 1 reply; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  7:24 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Alex Bennée, Michael Tokarev,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
This job currently fails:

      LINK    lm32-softmmu/qemu-system-lm32
    /usr/bin/ld: cannot find -lgtk-3
    /usr/bin/ld: cannot find -latk-bridge-2.0
    /usr/bin/ld: cannot find -latspi
    /usr/bin/ld: cannot find -lsystemd
    /usr/bin/ld: cannot find -lgdk-3
    /usr/bin/ld: cannot find -lwayland-egl
    /usr/bin/ld: cannot find -lmirclient
    /usr/bin/ld: cannot find -lmircore
    /usr/bin/ld: cannot find -lmircookie
    /usr/bin/ld: cannot find -lepoxy
    /usr/bin/ld: cannot find -latk-1.0
    /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
    /usr/bin/ld: cannot find -lselinux
    /usr/bin/ld: cannot find -lgtk-3
    /usr/bin/ld: cannot find -latk-bridge-2.0
    /usr/bin/ld: cannot find -latspi
    /usr/bin/ld: cannot find -lsystemd
    /usr/bin/ld: cannot find -lgdk-3
    /usr/bin/ld: cannot find -lwayland-egl
    /usr/bin/ld: cannot find -lmirclient
    /usr/bin/ld: cannot find -lmircore
    /usr/bin/ld: cannot find -lmircookie
    /usr/bin/ld: cannot find -lepoxy
    /usr/bin/ld: cannot find -latk-1.0
    /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
    /usr/bin/ld: cannot find -lselinux
    /usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
    collect2: error: ld returned 1 exit status
    Makefile:204: recipe for target 'qemu-system-lm32' failed
    make[1]: *** [qemu-system-lm32] Error 1
    Makefile:472: recipe for target 'subdir-lm32-softmmu' failed
    make: *** [subdir-lm32-softmmu] Error 2
---
 .travis.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 08502c0aa2..6962fff826 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -92,6 +92,11 @@ matrix:
         - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
 
 
+    # Test static linking
+    - env:
+        - CONFIG="--static --target-list=lm32-softmmu"
+
+
     # Just build tools and run minimal unit and softfloat checks
     - env:
         - BASE_CONFIG="--enable-tools"
-- 
2.20.1



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

* Re: [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable Philippe Mathieu-Daudé
@ 2019-06-14  7:43   ` Niels de Vos
  0 siblings, 0 replies; 15+ messages in thread
From: Niels de Vos @ 2019-06-14  7:43 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Michael Tokarev, qemu-devel,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini, Alex Bennée

On Fri, Jun 14, 2019 at 09:24:27AM +0200, Philippe Mathieu-Daudé wrote:
> It is pointless and confusing to have GLUSTERFS variables
> in config-host.mak when glusterfs is not usable.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Looks good to me, thanks.

Reviewed-by: Niels de Vos <ndevos@redhat.com>

> ---
>  configure | 36 ++++++++++++++++++------------------
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/configure b/configure
> index b091b82cb3..13fd4a1166 100755
> --- a/configure
> +++ b/configure
> @@ -7118,30 +7118,30 @@ if test "$glusterfs" = "yes" ; then
>    echo "CONFIG_GLUSTERFS=m" >> $config_host_mak
>    echo "GLUSTERFS_CFLAGS=$glusterfs_cflags" >> $config_host_mak
>    echo "GLUSTERFS_LIBS=$glusterfs_libs" >> $config_host_mak
> -fi
>  
> -if test "$glusterfs_xlator_opt" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
> -fi
> +  if test "$glusterfs_xlator_opt" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_XLATOR_OPT=y" >> $config_host_mak
> +  fi
>  
> -if test "$glusterfs_discard" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
> -fi
> +  if test "$glusterfs_discard" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_DISCARD=y" >> $config_host_mak
> +  fi
>  
> -if test "$glusterfs_fallocate" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak
> -fi
> +  if test "$glusterfs_fallocate" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_FALLOCATE=y" >> $config_host_mak
> +  fi
>  
> -if test "$glusterfs_zerofill" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
> -fi
> +  if test "$glusterfs_zerofill" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_ZEROFILL=y" >> $config_host_mak
> +  fi
>  
> -if test "$glusterfs_ftruncate_has_stat" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak
> -fi
> +  if test "$glusterfs_ftruncate_has_stat" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_FTRUNCATE_HAS_STAT=y" >> $config_host_mak
> +  fi
>  
> -if test "$glusterfs_iocb_has_stat" = "yes" ; then
> -  echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak
> +  if test "$glusterfs_iocb_has_stat" = "yes" ; then
> +    echo "CONFIG_GLUSTERFS_IOCB_HAS_STAT=y" >> $config_host_mak
> +  fi
>  fi
>  
>  if test "$libssh2" = "yes" ; then
> -- 
> 2.20.1
> 


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

* Re: [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries Philippe Mathieu-Daudé
@ 2019-06-14  8:40   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  8:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Michael Tokarev, Bharata B Rao,
	Gerd Hoffmann, Paolo Bonzini, Alex Bennée, Niels de Vos

On 6/14/19 9:24 AM, Philippe Mathieu-Daudé wrote:
> Similarly to commit a73e82ef912, test the libraries link correctly
> before considering them as usable.
> 
> This fixes using ./configure --static on Ubuntu 18.04:
> 
>   $ make subdir-aarch64-softmmu
>   [...]
>     LINK    aarch64-softmmu/qemu-system-aarch64
>   /usr/bin/ld: cannot find -lgfapi
>   /usr/bin/ld: cannot find -lglusterfs
>   /usr/bin/ld: cannot find -lgfrpc
>   /usr/bin/ld: cannot find -lgfxdr
>   collect2: error: ld returned 1 exit status
>   Makefile:204: recipe for target 'qemu-system-aarch64' failed
>   make[1]: *** [qemu-system-aarch64] Error 1
> 
>   $ fgrep gf config-host.mak
>   GLUSTERFS_LIBS=-lacl -lgfapi -lglusterfs -lgfrpc -lgfxdr -luuid
> 
>   $ lsb_release -cri
>   Distributor ID: Ubuntu
>   Release:        18.04
>   Codename:       bionic
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  configure | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 13fd4a1166..3428adb75b 100755
> --- a/configure
> +++ b/configure
> @@ -4179,9 +4179,23 @@ fi
>  # glusterfs probe
>  if test "$glusterfs" != "no" ; then
>    if $pkg_config --atleast-version=3 glusterfs-api; then
> -    glusterfs="yes"
>      glusterfs_cflags=$($pkg_config --cflags glusterfs-api)
> -    glusterfs_libs=$($pkg_config --libs glusterfs-api)
> +    if test "$static" = "yes"; then
> +        glusterfs_libs=$($pkg_config --libs --static glusterfs-api)
> +    else
> +        glusterfs_libs=$($pkg_config --libs glusterfs-api)
> +    fi

I just noticed in ./configure:

  case "$opt" in
  --static)
    static="yes"
    LDFLAGS="-static $LDFLAGS"
    QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
  ;;

And

pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
query_pkg_config() {
    "${pkg_config_exe}" ${QEMU_PKG_CONFIG_FLAGS} "$@"
}
pkg_config=query_pkg_config

So I shouldn't need to test "$static" = "yes" and manually add --static.
(same apply to other patches in this series).

I'll see what's wrong...

> +    # Packaging for the static libraries is not always correct.
> +    # At least ubuntu 18.04 ships only shared libraries.
> +    write_c_skeleton
> +    if ! compile_prog "$glusterfs_cflags" "$glusterfs_libs" ; then
> +        if test "$glusterfs" = "yes" ; then
> +          error_exit "glusterfs check failed."
> +        fi
> +        glusterfs="no"
> +    else
> +        glusterfs="yes"
> +    fi
>      if $pkg_config --atleast-version=4 glusterfs-api; then
>        glusterfs_xlator_opt="yes"
>      fi
> 


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

* Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking Philippe Mathieu-Daudé
@ 2019-06-14  8:48 ` Philippe Mathieu-Daudé
  2019-06-14  8:53 ` Peter Maydell
  7 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14  8:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Michael Tokarev, Bharata B Rao, Gerd Hoffmann,
	Paolo Bonzini, Alex Bennée, Niels de Vos

On 6/14/19 9:24 AM, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> Apparently QEMU static linking is slowly bitroting. Obviously it
> depends the libraries an user has installed, anyway it seems there
> are not much testing done.
> 
> This series fixes few issues, enough to build QEMU on a Ubuntu
> aarch64 host, but not yet on a x86_64 host:
> 
>     LINK    x86_64-softmmu/qemu-system-x86_64
>   /usr/bin/ld: cannot find -lgtk-3
>   /usr/bin/ld: cannot find -latk-bridge-2.0
>   /usr/bin/ld: cannot find -latspi
>   /usr/bin/ld: cannot find -lsystemd
>   /usr/bin/ld: cannot find -lgdk-3
>   /usr/bin/ld: cannot find -lwayland-egl
>   /usr/bin/ld: cannot find -lmirclient
>   /usr/bin/ld: cannot find -lmircore
>   /usr/bin/ld: cannot find -lmircookie
>   /usr/bin/ld: cannot find -lepoxy
>   /usr/bin/ld: cannot find -latk-1.0
>   /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
>   /usr/bin/ld: cannot find -lselinux
>   /usr/bin/ld: cannot find -lgtk-3
>   /usr/bin/ld: cannot find -latk-bridge-2.0
>   /usr/bin/ld: cannot find -latspi
>   /usr/bin/ld: cannot find -lsystemd
>   /usr/bin/ld: cannot find -lgdk-3
>   /usr/bin/ld: cannot find -lwayland-egl
>   /usr/bin/ld: cannot find -lmirclient
>   /usr/bin/ld: cannot find -lmircore
>   /usr/bin/ld: cannot find -lmircookie
>   /usr/bin/ld: cannot find -lepoxy
>   /usr/bin/ld: cannot find -latk-1.0
>   /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
>   /usr/bin/ld: cannot find -lselinux
>   /usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
>   collect2: error: ld returned 1 exit status

This one is funny, when installing libvte on Ubuntu 18.04:

    LINK    x86_64-softmmu/qemu-system-x86_64
  c++: error: /usr/lib/x86_64-linux-gnu/libunistring.so: No such file or
directory
  c++: error: /usr/lib/x86_64-linux-gnu/libunistring.so: No such file or
directory
  c++: error: /usr/lib/x86_64-linux-gnu/libunistring.so: No such file or
directory
  c++: error: /usr/lib/x86_64-linux-gnu/libunistring.so: No such file or
directory

$ pkg-config --libs --static vte-2.91
-lvte-2.91 -lgtk-3 -latk-bridge-2.0 -latspi -ldbus-1 -lpthread -lsystemd
-lgdk-3 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage
-lXfixes -lxkbcommon -lwayland-cursor -lwayland-egl -lwayland-client
-lepoxy -ldl -lpangocairo-1.0 -lpangoft2-1.0 -lharfbuzz -lm -lgraphite2
-lpango-1.0 -lm -latk-1.0 -lcairo-gobject -lcairo -lz -lpixman-1
-lfontconfig -lexpat -lfreetype -lexpat -lfreetype -lpng16 -lm -lz -lm
-lxcb-shm -lxcb-render -lXrender -lXext -lX11 -lpthread -lxcb -lXau
-lXdmcp -lgdk_pixbuf-2.0 -lm -lpng16 -lm -lz -lm -lgio-2.0 -lz -lresolv
-lselinux -lmount -lgmodule-2.0 -pthread -ldl -lgobject-2.0 -lffi
-lglib-2.0 -pthread -lpcre -pthread -lgnutls -lgmp
/usr/lib/x86_64-linux-gnu/libunistring.so -lidn2 -lhogweed -lgmp
-lnettle -ltasn1 -lp11-kit -lz

$ ls -ld /usr/lib/x86_64-linux-gnu/libunistring.so
ls: cannot access '/usr/lib/x86_64-linux-gnu/libunistring.so': No such
file or directory

$ ls -ld /usr/lib/x86_64-linux-gnu/libunistring.so*
lrwxrwxrwx. 1 root root      21 Mar  3  2018
/usr/lib/x86_64-linux-gnu/libunistring.so.2 -> libunistring.so.2.1.0
-rw-r--r--. 1 root root 1562664 Mar  3  2018
/usr/lib/x86_64-linux-gnu/libunistring.so.2.1.0

The fix is probably "sudo ln -s libunistring.so.2
/usr/lib/x86_64-linux-gnu/libunistring.so".


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

* Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
  2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2019-06-14  8:48 ` [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
@ 2019-06-14  8:53 ` Peter Maydell
  2019-06-14 13:58   ` Alex Bennée
  7 siblings, 1 reply; 15+ messages in thread
From: Peter Maydell @ 2019-06-14  8:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	Qemu-block, Loïc Minier, Michael Tokarev, QEMU Developers,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini, Alex Bennée,
	Niels de Vos

On Fri, 14 Jun 2019 at 08:27, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> Apparently QEMU static linking is slowly bitroting. Obviously it
> depends the libraries an user has installed, anyway it seems there
> are not much testing done.

The main reason for supporting static linking is so we can build
the user-mode emulators. Almost always the problems with
static linking the softmmu binaries and the tools are
issues with the distro's packaging of the static libraries
(pkg-config files which specify things that don't work for
static is a common one).

So we could put in a lot of checking of "is what pkg-config
tells us broken". Or we could just say "we don't support static
linking for anything except the usermode binaries". We
should probably phase in deprecation of that because it's
possible somebody's using it seriously, but it seems like
a fairly weird thing to do to me.

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
  2019-06-14  8:53 ` Peter Maydell
@ 2019-06-14 13:58   ` Alex Bennée
  2019-06-14 14:30     ` Peter Maydell
  0 siblings, 1 reply; 15+ messages in thread
From: Alex Bennée @ 2019-06-14 13:58 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	Qemu-block, Loïc Minier, Michael Tokarev, QEMU Developers,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos


Peter Maydell <peter.maydell@linaro.org> writes:

> On Fri, 14 Jun 2019 at 08:27, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>> Apparently QEMU static linking is slowly bitroting. Obviously it
>> depends the libraries an user has installed, anyway it seems there
>> are not much testing done.
>
> The main reason for supporting static linking is so we can build
> the user-mode emulators. Almost always the problems with
> static linking the softmmu binaries and the tools are
> issues with the distro's packaging of the static libraries
> (pkg-config files which specify things that don't work for
> static is a common one).
>
> So we could put in a lot of checking of "is what pkg-config
> tells us broken". Or we could just say "we don't support static
> linking for anything except the usermode binaries". We
> should probably phase in deprecation of that because it's
> possible somebody's using it seriously, but it seems like
> a fairly weird thing to do to me.

It would be nice to have a --static-user config flag and deprecate the
--static flag. I don't think there is a decent use case for system
emulation targets.

The Gentoo ebuild currently jumps through hoops to build QEMU by doing
the build twice, first for softmmu targets and then for user targets. I
suspect all of that is mostly to handle the reasonable "static-user" use
case which is what people really want*.

*I'm guessing

--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking
  2019-06-14  7:24 ` [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking Philippe Mathieu-Daudé
@ 2019-06-14 14:03   ` Alex Bennée
  0 siblings, 0 replies; 15+ messages in thread
From: Alex Bennée @ 2019-06-14 14:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	qemu-block, Loïc Minier, Michael Tokarev, qemu-devel,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini, Niels de Vos


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> This job currently fails:
>
>       LINK    lm32-softmmu/qemu-system-lm32
>     /usr/bin/ld: cannot find -lgtk-3
>     /usr/bin/ld: cannot find -latk-bridge-2.0
>     /usr/bin/ld: cannot find -latspi
>     /usr/bin/ld: cannot find -lsystemd
>     /usr/bin/ld: cannot find -lgdk-3
>     /usr/bin/ld: cannot find -lwayland-egl
>     /usr/bin/ld: cannot find -lmirclient
>     /usr/bin/ld: cannot find -lmircore
>     /usr/bin/ld: cannot find -lmircookie
>     /usr/bin/ld: cannot find -lepoxy
>     /usr/bin/ld: cannot find -latk-1.0
>     /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
>     /usr/bin/ld: cannot find -lselinux
>     /usr/bin/ld: cannot find -lgtk-3
>     /usr/bin/ld: cannot find -latk-bridge-2.0
>     /usr/bin/ld: cannot find -latspi
>     /usr/bin/ld: cannot find -lsystemd
>     /usr/bin/ld: cannot find -lgdk-3
>     /usr/bin/ld: cannot find -lwayland-egl
>     /usr/bin/ld: cannot find -lmirclient
>     /usr/bin/ld: cannot find -lmircore
>     /usr/bin/ld: cannot find -lmircookie
>     /usr/bin/ld: cannot find -lepoxy
>     /usr/bin/ld: cannot find -latk-1.0
>     /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
>     /usr/bin/ld: cannot find -lselinux
>     /usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
>     collect2: error: ld returned 1 exit status
>     Makefile:204: recipe for target 'qemu-system-lm32' failed
>     make[1]: *** [qemu-system-lm32] Error 1
>     Makefile:472: recipe for target 'subdir-lm32-softmmu' failed
>     make: *** [subdir-lm32-softmmu] Error 2
> ---
>  .travis.yml | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/.travis.yml b/.travis.yml
> index 08502c0aa2..6962fff826 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -92,6 +92,11 @@ matrix:
>          - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
>
>
> +    # Test static linking
> +    - env:
> +        - CONFIG="--static --target-list=lm32-softmmu"
> +
> +

It's probably more useful to have a:

  CONFIG="--disable-system --static"

In fact arguably we could just add it to the first --disable-system
stanza as there are other linux-user builds scattered about to catch the
cases where we break dynamically linked linux-user builds.

>      # Just build tools and run minimal unit and softfloat checks
>      - env:
>          - BASE_CONFIG="--enable-tools"


--
Alex Bennée


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

* Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
  2019-06-14 13:58   ` Alex Bennée
@ 2019-06-14 14:30     ` Peter Maydell
  2019-06-14 15:17       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Maydell @ 2019-06-14 14:30 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	Qemu-block, Loïc Minier, Michael Tokarev, QEMU Developers,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini,
	Philippe Mathieu-Daudé, Niels de Vos

On Fri, 14 Jun 2019 at 14:58, Alex Bennée <alex.bennee@linaro.org> wrote:

> It would be nice to have a --static-user config flag and deprecate the
> --static flag. I don't think there is a decent use case for system
> emulation targets.

It would be really tricky to build half with static and half
without: our configure and build system really assumes that
fundamental stuff like "what libraries" and "what compiler flags"
are the same across the whole of the build.

Is --static-user really much better than:
 * allow --static --disable-system --disable-tools
 * forbid --static without --disable-system --disable-tools
 * require users to build the static usermode binaries separately
   from the system/tools build

(which is in practice what we have now) ?

Debian wants both static usermode and non-static usermode
binaries, so they'd still need to build multiple times anyway.

thanks
-- PMM


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

* Re: [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking
  2019-06-14 14:30     ` Peter Maydell
@ 2019-06-14 15:17       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 15+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-06-14 15:17 UTC (permalink / raw)
  To: Peter Maydell, Alex Bennée
  Cc: Fam Zheng, Thomas Huth, integration, Daniel P. Berrangé,
	Qemu-block, Loïc Minier, Michael Tokarev, QEMU Developers,
	Bharata B Rao, Gerd Hoffmann, Paolo Bonzini, Niels de Vos

On 6/14/19 4:30 PM, Peter Maydell wrote:
> On Fri, 14 Jun 2019 at 14:58, Alex Bennée <alex.bennee@linaro.org> wrote:
> 
>> It would be nice to have a --static-user config flag and deprecate the
>> --static flag. I don't think there is a decent use case for system
>> emulation targets.
> 
> It would be really tricky to build half with static and half
> without: our configure and build system really assumes that
> fundamental stuff like "what libraries" and "what compiler flags"
> are the same across the whole of the build.
> 
> Is --static-user really much better than:
>  * allow --static --disable-system --disable-tools
>  * forbid --static without --disable-system --disable-tools
>  * require users to build the static usermode binaries separately
>    from the system/tools build
> 
> (which is in practice what we have now) ?
> 
> Debian wants both static usermode and non-static usermode
> binaries, so they'd still need to build multiple times anyway.

Glad to read, so the v2 of this series is worthful.


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

end of thread, other threads:[~2019-06-14 15:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-14  7:24 [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
2019-06-14  7:24 ` [Qemu-devel] [PATCH 1/6] configure: Only generate GLUSTERFS variables if glusterfs is usable Philippe Mathieu-Daudé
2019-06-14  7:43   ` Niels de Vos
2019-06-14  7:24 ` [Qemu-devel] [PATCH 2/6] configure: Link test before auto-enabling glusterfs libraries Philippe Mathieu-Daudé
2019-06-14  8:40   ` Philippe Mathieu-Daudé
2019-06-14  7:24 ` [Qemu-devel] [PATCH 3/6] configure: Link test before auto-enabling the libusb library Philippe Mathieu-Daudé
2019-06-14  7:24 ` [Qemu-devel] [PATCH 4/6] configure: Link test before auto-enabling the libusbredir library Philippe Mathieu-Daudé
2019-06-14  7:24 ` [Qemu-devel] [PATCH 5/6] configure: Link test before auto-enabling the pulseaudio library Philippe Mathieu-Daudé
2019-06-14  7:24 ` [Qemu-devel] [PATCH 6/6] .travis.yml: Test static linking Philippe Mathieu-Daudé
2019-06-14 14:03   ` Alex Bennée
2019-06-14  8:48 ` [Qemu-devel] [PATCH 0/6] configure: Try to fix --static linking Philippe Mathieu-Daudé
2019-06-14  8:53 ` Peter Maydell
2019-06-14 13:58   ` Alex Bennée
2019-06-14 14:30     ` Peter Maydell
2019-06-14 15:17       ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).