diff mbox series

[PULL,01/17] build: fix macOS --enable-modules build

Message ID 20201026135131.3006712-2-pbonzini@redhat.com
State New
Headers show
Series Build system changes and misc fixes for QEMU 5.2 soft freeze | expand

Commit Message

Paolo Bonzini Oct. 26, 2020, 1:51 p.m. UTC
Apple's nm implementation includes empty lines in the output that are not
found in GNU binutils.  This confuses scripts/undefsym.py, though it did
not confuse the scripts/undefsym.sh script that it replaced.  To fix
this, ignore lines that do not have two fields.

Reported-by: Emmanuel Blot <eblot.ml@gmail.com>
Tested-by: Emmanuel Blot <eblot.ml@gmail.com>
Fixes: 604f3e4e90 ("meson: Convert undefsym.sh to undefsym.py", 2020-09-08)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 .cirrus.yml         |  2 +-
 scripts/undefsym.py | 11 +++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

Comments

Philippe Mathieu-Daudé Oct. 27, 2020, 9:27 a.m. UTC | #1
On 10/26/20 2:51 PM, Paolo Bonzini wrote:
> Apple's nm implementation includes empty lines in the output that are not
> found in GNU binutils.  This confuses scripts/undefsym.py, though it did
> not confuse the scripts/undefsym.sh script that it replaced.  To fix
> this, ignore lines that do not have two fields.
> 
> Reported-by: Emmanuel Blot <eblot.ml@gmail.com>
> Tested-by: Emmanuel Blot <eblot.ml@gmail.com>
> Fixes: 604f3e4e90 ("meson: Convert undefsym.sh to undefsym.py", 2020-09-08)
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  .cirrus.yml         |  2 +-
>  scripts/undefsym.py | 11 +++++------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/.cirrus.yml b/.cirrus.yml
> index 81a2960b1a..900437dd2a 100644
> --- a/.cirrus.yml
> +++ b/.cirrus.yml
> @@ -40,7 +40,7 @@ macos_xcode_task:
>    script:
>      - mkdir build
>      - cd build
> -    - ../configure --extra-cflags='-Wno-error=deprecated-declarations'
> +    - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules
>                     --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }

I'm confused as this broke the catalina-xcode test:

PASS 5 qtest-aarch64/device-introspect-test
/aarch64/device/introspect/abstract-interfaces
missing object type 'virtio-gpu-device'
Broken pipe
../tests/qtest/libqtest.c:176: kill_qemu() detected QEMU death from
signal 6 (Abort trap: 6)
ERROR qtest-aarch64/device-introspect-test - too few tests run (expected
6, got 5)
gmake: *** [Makefile.mtest:905: run-test-111] Error 1
Paolo Bonzini Oct. 27, 2020, 1:27 p.m. UTC | #2
On 27/10/20 10:27, Philippe Mathieu-Daudé wrote:
> I'm confused as this broke the catalina-xcode test:

> 

> PASS 5 qtest-aarch64/device-introspect-test

> /aarch64/device/introspect/abstract-interfaces

> missing object type 'virtio-gpu-device'

> Broken pipe

> ../tests/qtest/libqtest.c:176: kill_qemu() detected QEMU death from

> signal 6 (Abort trap: 6)

> ERROR qtest-aarch64/device-introspect-test - too few tests run (expected

> 6, got 5)

> gmake: *** [Makefile.mtest:905: run-test-111] Error 1

> 


It's showing that there is still a bug with macOS modules, Gerd was
looking at it (Emmanuel could so as well :)).

Paolo
Gerd Hoffmann Oct. 27, 2020, 3:21 p.m. UTC | #3
On Tue, Oct 27, 2020 at 02:27:42PM +0100, Paolo Bonzini wrote:
> On 27/10/20 10:27, Philippe Mathieu-Daudé wrote:
> > I'm confused as this broke the catalina-xcode test:
> > 
> > PASS 5 qtest-aarch64/device-introspect-test
> > /aarch64/device/introspect/abstract-interfaces
> > missing object type 'virtio-gpu-device'
> > Broken pipe
> > ../tests/qtest/libqtest.c:176: kill_qemu() detected QEMU death from
> > signal 6 (Abort trap: 6)
> > ERROR qtest-aarch64/device-introspect-test - too few tests run (expected
> > 6, got 5)
> > gmake: *** [Makefile.mtest:905: run-test-111] Error 1
> > 
> 
> It's showing that there is still a bug with macOS modules, Gerd was
> looking at it (Emmanuel could so as well :)).

Turned out to be simple.

https://patchwork.ozlabs.org/project/qemu-devel/patch/20201027120603.3625-1-kraxel@redhat.com/

take care,
  Gerd
Gerd Hoffmann Oct. 27, 2020, 3:33 p.m. UTC | #4
On Tue, Oct 27, 2020 at 04:21:50PM +0100, Gerd Hoffmann wrote:
> https://patchwork.ozlabs.org/project/qemu-devel/patch/20201027120603.3625-1-kraxel@redhat.com/

FYI: have pending pull req with this and 3 more module patches,
     ci running atm, probably goes out tomorrow ... )

take care,
  Gerd
diff mbox series

Patch

diff --git a/.cirrus.yml b/.cirrus.yml
index 81a2960b1a..900437dd2a 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -40,7 +40,7 @@  macos_xcode_task:
   script:
     - mkdir build
     - cd build
-    - ../configure --extra-cflags='-Wno-error=deprecated-declarations'
+    - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules
                    --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - gmake -j$(sysctl -n hw.ncpu)
     - gmake check V=1
diff --git a/scripts/undefsym.py b/scripts/undefsym.py
index 69a895cd26..4b6a72d95f 100644
--- a/scripts/undefsym.py
+++ b/scripts/undefsym.py
@@ -15,12 +15,11 @@  def filter_lines_set(stdout, from_staticlib):
     linesSet = set()
     for line in stdout.splitlines():
         tokens = line.split(b' ')
-        if len(tokens) >= 1:
-            if len(tokens) > 1:
-                if from_staticlib and tokens[1] == b'U':
-                    continue
-                if not from_staticlib and tokens[1] != b'U':
-                    continue
+        if len(tokens) >= 2:
+            if from_staticlib and tokens[1] == b'U':
+                continue
+            if not from_staticlib and tokens[1] != b'U':
+                continue
             new_line = b'-Wl,-u,' + tokens[0]
             if not new_line in linesSet:
                 linesSet.add(new_line)