objcopy not used from cross-compilation file in GIO tests
Steps to reproduce
wget https://github.com/GNOME/glib/archive/2.63.0.tar.gz -O glib-2.63.0.tar.gz
tar xzf glib-2.63.0.tar.gz && cd glib-2.63.0
meson --cross-file glib_cross_file__copy_.txt --pkg-config-path /prefix/lib/pkgconfig:/usr/lib/arm-linux-gnueabihf/pkgconfig --default-library shared build
ninja -C build
Current Behavior
FAILED: gio/tests/resources
arm-linux-gnueabihf-gcc -o gio/tests/resources gio/tests/test_resources2.o 'gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources.c.o' 'gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources2.c.o' 'gio/tests/bcb7ac7@@resources@exe/meson-generated_.._digit_test_resources.c.o' 'gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources_binary.c.o' 'gio/tests/bcb7ac7@@resources@exe/resources.c.o' -L/opt/vallum_dev_pi/lib -L/usr/lib/arm-linux-gnueabihf -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group glib/libglib-2.0.so.0.6200.0 gmodule/libgmodule-2.0.so.0.6200.0 gobject/libgobject-2.0.so.0.6200.0 gio/libgio-2.0.so.0.6200.0 -Wl,--end-group -pthread '-Wl,-rpath,$ORIGIN/../../glib:$ORIGIN/../../gmodule:$ORIGIN/../../gobject:$ORIGIN/..:/opt/vallum_dev_pi/lib/../lib:/opt/vallum_dev_pi/lib' -Wl,-rpath-link,/mnt/drive/stuff/tmp/glib-2.62.0/build/glib -Wl,-rpath-link,/mnt/drive/stuff/tmp/glib-2.62.0/build/gmodule -Wl,-rpath-link,/mnt/drive/stuff/tmp/glib-2.62.0/build/gobject -Wl,-rpath-link,/opt/vallum_dev_pi/lib/../lib -Wl,-rpath-link,/mnt/drive/stuff/tmp/glib-2.62.0/build/gio -Wl,-rpath-link,/opt/vallum_dev_pi/lib
gio/tests/test_resources2.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
[932/1132] Compiling C object 'gio/tes..._.._gdbus-test-codegen-generated.c.o'.
ninja: build stopped: subcommand failed.
Expected outcome
No compile or link failures. Successful installation.
Version Information
Ubuntu 18.04.3 LTS (Bionic Beaver)
Kernel version 14.15.0-66-generic (uname -r
)
Build version gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
Host version arm-linux-gnueabihf-gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1~18.04.1)
Host is Raspberry PI 3B+ with Raspbian Buster (July 2019 release with updates applied)
Additional Information
Relevant files
Work-around - none that I can find.
Output of file build/gio/tests/test_resources2.o
:
build/gio/tests/test_resources2.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Output of file build/gio/tests/bcb7ac7@@resources@exe/meson-generated_.._*.o
:
build/gio/tests/bcb7ac7@@resources@exe/meson-generated_.._digit_test_resources.c.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
build/gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources2.c.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
build/gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources_binary.c.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
build/gio/tests/bcb7ac7@@resources@exe/meson-generated_.._test_resources.c.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), with debug_info, not stripped
Output of file build/glib/libglib-2.0.so.0.6200.0
:
build/glib/libglib-2.0.so.0.6200.0: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=11778f561017aee50ddf80510d8e2305e68cda9d, with debug_info, not stripped