Glib 2.69.2 objcopy FAILED

Hello,
I am trying to build glib 2.69.2 but I get an error:

$ tar xf glib-2.69.2.tar.xz
$ cd glib-2.69.2
$ mkdir build
$ cd build
$ meson setup --buildtype=release -Dman=true -Dselinux=disabled
$ ninja -v -j1
[...]
[706/1248] /usr/bin/objcopy --add-symbol _g_binary_test1_resource_data=.data:0 gio/tests/test_resources.o gio/tests/test_resources2.o
FAILED: gio/tests/test_resources2.o 
/usr/bin/objcopy --add-symbol _g_binary_test1_resource_data=.data:0 gio/tests/test_resources.o gio/tests/test_resources2.o
ninja: build stopped: subcommand failed.

As you can see, there is an error when the objcopy command is called (this command is part of binutils).
And if I test this command:

$ /usr/bin/objcopy --add-symbol _g_binary_test1_resource_data=.data:0 gio/tests/test_resources.o gio/tests/test_resources2.o
Segmentation fault

I get a segmentation fault.
And if I test this command with gdb, I get this output:

$ gdb --args /usr/bin/objcopy --add-symbol _g_binary_test1_resource_data=.data:0 gio/tests/test_resources.o gio/tests/test_resources2.o
[...]
(gdb) run
[...]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7566e2a in __strcmp_sse2_unaligned () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff7566e2a in __strcmp_sse2_unaligned () from /lib64/libc.so.6
#1  0x000000000040a040 in ?? ()
#2  0x000000000040b878 in ?? ()
#3  0x000000000040541e in ?? ()
#4  0x00007ffff74e87d0 in __libc_start_main () from /lib64/libc.so.6
#5  0x00000000004077b9 in ?? ()
(gdb) q
[...]
Quit anyway? (y or n) y

Do you know how to fix that please?

Thank you.
Best regards.

It’s fixed.
I upgraded from binutils 2.26 to 2.37.
Now, glib compiles fine.
The error has gone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.