When I was trying to use binaries built on the Ubuntu environment, on Fedora 36, I couldn't use it due to the missing the `.gnu.version_d section`.[1] I tried to run Ruby's configure referring to the binary (wasi-sdk). And I got the errors below.
``` $ ./configure LDFLAGS="-Xlinker -zstack-size=16777216" \ --host wasm32-unknown-wasi \ --with-destdir=./ruby-wasm32-wasi \ --with-static-linked-ext \ --with-ext=ripper,monitor ... /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) ... ```
Looking at the binary file (libtinfo.so.6.2), I see Fedora 36's binary is missing the ".gnu.version_d" section in the binary unlike Ubuntu focal's one. Why don't we enable the secsion to use the binary built from Ubuntu, on Fedora?
The command logs are below.
In Fedora 36 ``` $ ls -hl /usr/lib64/libtinfo.so.6.2 -rwxr-xr-x. 1 root root 188K Jan 20 2022 /usr/lib64/libtinfo.so.6.2*
$ rpm -qf /usr/lib64/libtinfo.so.6.2 ncurses-libs-6.2-9.20210508.fc36.x86_64
$ objdump --version GNU objdump version 2.37-27.fc36 Copyright (C) 2021 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.
$ objdump -s -j .gnu.version_d /usr/lib64/libtinfo.so.6.2 /usr/lib64/libtinfo.so.6.2: file format elf64-x86-64
objdump: section '.gnu.version_d' mentioned in a -j option, but not found in any input file ``` => The ".gnu.version_d" section is missing.
In Ubuntu 20.04 (focal) ``` root@bc2fb35978e8:/# ls -lh /lib/x86_64-linux-gnu/libtinfo.so.6.2 -rw-r--r--. 1 root root 188K Feb 26 2020 /lib/x86_64-linux-gnu/libtinfo.so.6.2
root@bc2fb35978e8:/# dpkg-query -S /lib/x86_64-linux-gnu/libtinfo.so.6.2 libtinfo6:amd64: /lib/x86_64-linux-gnu/libtinfo.so.6.2
root@bc2fb35978e8:/# objdump --version GNU objdump (GNU Binutils for Ubuntu) 2.34 Copyright (C) 2020 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.
root@bc2fb35978e8:/# objdump -s -j .gnu.version_d /lib/x86_64-linux-gnu/libtinfo.so.6.2 | head -5
/lib/x86_64-linux-gnu/libtinfo.so.6.2: file format elf64-x86-64
Contents of section .gnu.version_d: 3b18 01000100 01000100 2632fc0f 14000000 ........&2...... ``` => The ".gnu.version_d" section exists.
[1] https://bugs.ruby-lang.org/issues/19053#note-1
* Jun Aruga:
When I was trying to use binaries built on the Ubuntu environment, on Fedora 36, I couldn't use it due to the missing the `.gnu.version_d section`.[1] I tried to run Ruby's configure referring to the binary (wasi-sdk). And I got the errors below.
$ ./configure LDFLAGS="-Xlinker -zstack-size=16777216" \ --host wasm32-unknown-wasi \ --with-destdir=./ruby-wasm32-wasi \ --with-static-linked-ext \ --with-ext=ripper,monitor ... /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) ...
See this bug for details:
ncurses: Please enable symbol versioning https://bugzilla.redhat.com/show_bug.cgi?id=1875587
The stub object creator mentioned in comment 2 is still vaporware, unfortunately, so there is no easy way to fix this right now.
Thanks, Florian
On Fri, Oct 21, 2022 at 2:32 PM Florian Weimer fweimer@redhat.com wrote:
- Jun Aruga:
When I was trying to use binaries built on the Ubuntu environment, on Fedora 36, I couldn't use it due to the missing the `.gnu.version_d section`.[1] I tried to run Ruby's configure referring to the binary (wasi-sdk). And I got the errors below.
$ ./configure LDFLAGS="-Xlinker -zstack-size=16777216" \ --host wasm32-unknown-wasi \ --with-destdir=./ruby-wasm32-wasi \ --with-static-linked-ext \ --with-ext=ripper,monitor ... /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) /usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang) ...
See this bug for details:
ncurses: Please enable symbol versioning https://bugzilla.redhat.com/show_bug.cgi?id=1875587
The stub object creator mentioned in comment 2 is still vaporware, unfortunately, so there is no easy way to fix this right now.
Thanks, Florian
Hi, Thanks for the info. OK. It is a known ncurses RPM package specific issue. I commented there.