Bug#1041499: meson: glib2.0 FTBFS on mips64el: "native build" but then "Can not run test applications in this cross environment"
Simon McVittie
smcv at debian.org
Wed Jul 19 20:12:08 BST 2023
Package: meson
Version: 1.2.0-1
Severity: serious
Tags: ftbfs
Justification: causing FTBFS regression in another package
X-Debbugs-Cc: glib2.0 at packages.debian.org
Control: affects -1 + src:glib2.0
glib2.0's meson.build has several calls to 'cc.run(...)' guarded by
a check for 'cc_can_run = meson.can_run_host_binaries()'.
On mips64el, Meson seems confused about whether this is a native or
cross build. At first, it correctly reports that this is a native build:
<https://buildd.debian.org/status/fetch.php?pkg=glib2.0&arch=mips64el&ver=2.76.4-2&stamp=1689773327&raw=0>
> The Meson build system
> Version: 1.2.0
> Source dir: /<<PKGBUILDDIR>>
> Build dir: /<<PKGBUILDDIR>>/debian/build/deb
> Build type: native build
> Project name: glib
> Project version: 2.76.4
but then later, cc.run() fails:
> ../../../meson.build:1127:14: ERROR: Can not run test applications in this cross environment.
(Line 1127 is the first call to cc.run().)
With a minimal reproducer:
project('foo', 'c')
if meson.can_run_host_binaries()
meson.get_compiler('c').run('whatever')
endif
I can run `meson setup _build` successfully on amd64, or on the mips64el
porterbox eller in a trixie_mips64el-dchroot session with meson 1.1.1-2,
but not on eller in a sid_mips64el-dchroot session with meson 1.2.0-1.
I attach meson-log.txt from the minimal reproducer failing in
sid_mips64el-dchroot. It correctly reports
> Is cross compiler: False.
and
> Build machine cpu family: mips64
> Build machine cpu: mips64
> Host machine cpu family: mips64
> Host machine cpu: mips64
> Target machine cpu family: mips64
> Target machine cpu: mips64
as I would expect.
Thanks,
smcv
-------------- next part --------------
Build started at 2023-07-19T19:02:54.288530
Main binary: /usr/bin/python3
Build Options:
Python system: Linux
The Meson build system
Version: 1.2.0
Source dir: /home/smcv
Build dir: /home/smcv/_build
Build type: native build
Project name: foo
Project version: undefined
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Debian 13.1.0-7) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Debian) 2.40.90.20230714
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.1.0
/usr/bin/ld -plugin /usr/libexec/gcc/mips64el-linux-gnuabi64/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/mips64el-linux-gnuabi64/13/lto-wrapper -plugin-opt=-fresolution=/tmp/cc9MBOmq.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -EL -mips64r2 --as-needed -dynamic-linker /lib64/ld.so.1 -melf64ltsmip -pie /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/Scrt1.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/crti.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/crtbeginS.o -L/usr/lib/gcc/mips64el-linux-gnuabi64/13 -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64 -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../../lib -L/lib/mips64el-linux-gnuabi64 -L/lib/../lib -L/usr/lib/mips64el-linux-gnuabi64 -L/usr/lib/../lib -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/mips64el-linux-gnuabi64/13/crtendS.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/crtn.o
-----------
Sanity testing C compiler: ccache cc
Is cross compiler: False.
Sanity check compiler command line: ccache cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:
-----
Sanity check compile stderr:
-----
Running test binary command: /home/smcv/_build/meson-private/sanitycheckc.exe
C compiler for the host machine: ccache cc (gcc 13.1.0 "cc (Debian 13.1.0-7) 13.1.0")
C linker for the host machine: cc ld.bfd 2.40.90.20230714
-----------
Detecting linker via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Debian) 2.40.90.20230714
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
-----------
Detecting compiler via: `cc --version` -> 0
stdout:
cc (Debian 13.1.0-7) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------
Running command: cc -E -dM -
-----
-----------
Detecting linker via: `cc -Wl,--version` -> 0
stdout:
GNU ld (GNU Binutils for Debian) 2.40.90.20230714
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
-----------
stderr:
collect2 version 13.1.0
/usr/bin/ld -plugin /usr/libexec/gcc/mips64el-linux-gnuabi64/13/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/mips64el-linux-gnuabi64/13/lto-wrapper -plugin-opt=-fresolution=/tmp/cctkRtUj.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -EL -mips64r2 --as-needed -dynamic-linker /lib64/ld.so.1 -melf64ltsmip -pie /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/Scrt1.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/crti.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/crtbeginS.o -L/usr/lib/gcc/mips64el-linux-gnuabi64/13 -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64 -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../../lib -L/lib/mips64el-linux-gnuabi64 -L/lib/../lib -L/usr/lib/mips64el-linux-gnuabi64 -L/usr/lib/../lib -L/usr/lib/gcc/mips64el-linux-gnuabi64/13/../../.. --version -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/mips64el-linux-gnuabi64/13/crtendS.o /usr/lib/gcc/mips64el-linux-gnuabi64/13/../../../mips64el-linux-gnuabi64/crtn.o
-----------
Sanity testing C compiler: ccache cc
Is cross compiler: False.
Sanity check compiler command line: ccache cc sanitycheckc.c -o sanitycheckc.exe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:
-----
Sanity check compile stderr:
-----
Running test binary command: /home/smcv/_build/meson-private/sanitycheckc.exe
C compiler for the build machine: ccache cc (gcc 13.1.0 "cc (Debian 13.1.0-7) 13.1.0")
C linker for the build machine: cc ld.bfd 2.40.90.20230714
-----------
Detecting linker via: `gcc-ar --version` -> 0
stdout:
GNU ar (GNU Binutils for Debian) 2.40.90.20230714
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
-----------
Build machine cpu family: mips64
Build machine cpu: mips64
Host machine cpu family: mips64
Host machine cpu: mips64
Target machine cpu family: mips64
Target machine cpu: mips64
meson.build:3:28: ERROR: Can not run test applications in this cross environment.
More information about the pkg-gnome-maintainers
mailing list