dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.56k stars 4.54k forks source link

arm32 Required Version trouble #89556

Open BennyBread opened 11 months ago

BennyBread commented 11 months ago

Description

We are currently having issues with our embedded linux system running dotnet7.0.8

starting dotnet exe spits out "dotnet: /usr/lib/libstdc++.so.6: no version information available (required by dotnet)" multiple times. I've searched a lot and could only find aout that it could be a version mismatch on the system.

If I run my program I get the same outputs at startup but the program seems to run fine.

From the infos which are stated here: https://github.com/dotnet/core/blob/main/release-notes/7.0/supported-os.md#linux for arm32 is glibc 2.27 the required minimum.

My system has libstdc++.so.6.0.25 and libc.so.6

I cannot find out what version exactly is missing/wrong.

So: If I do an readelf call on dotnet I get this:

$ readelf -VW dotnet Version symbols section '.gnu.version' contains 122 entries: Addr: 0x00000000000009d4 Offset: 0x0009d4 Link: 4 (.dynsym) 000: 0 (local) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 1 (global) 004: 1 (global) 1 (global) 2 (GLIBC_2.4) 3 (GCC_3.0) ... Version needs section '.gnu.version_r' contains 6 entries: Addr: 0x0000000000000ac8 Offset: 0x000ac8 Link: 8 (.dynstr) 000000: Version: 1 File: libpthread.so.0 Cnt: 1 0x0060: Name: GLIBC_2.4 Flags: none Version: 9 0x0010: Version: 1 File: libdl.so.2 Cnt: 1 0x0070: Name: GLIBC_2.4 Flags: none Version: 13 0x0020: Version: 1 File: libstdc++.so.6 Cnt: 6 0x0080: Name: GLIBCXX_3.4 Flags: none Version: 5 0x0090: Name: GLIBCXX_3.4.9 Flags: none Version: 12 0x00a0: Name: GLIBCXX_3.4.11 Flags: none Version: 8 0x00b0: Name: GLIBCXX_3.4.20 Flags: none Version: 11 0x00c0: Name: GLIBCXX_3.4.21 Flags: none Version: 4 0x00d0: Name: CXXABI_1.3 Flags: none Version: 7 0x0030: Version: 1 File: libgcc_s.so.1 Cnt: 2 0x00e0: Name: GCC_3.0 Flags: none Version: 3 0x00f0: Name: GCC_3.5 Flags: none Version: 6 0x0040: Version: 1 File: libc.so.6 Cnt: 2 0x0100: Name: GLIBC_2.4 Flags: none Version: 2 0x0110: Name: GLIBC_2.16 Flags: none Version: 14 0x0050: Version: 1 File: ld-linux-armhf.so.3 Cnt: 1 0x0120: Name: GLIBC_2.4 Flags: none Version: 10

If I do the same for the libstdc++.so.6 of my system I get this:

$ readelf -V libstdc++.so.6

Version symbols section '.gnu.version' contains 6023 entries: Addr: 0x000000000007208e Offset: 0x07208e Link: 3 (.dynsym) 000: 0 (local) 0 (local) 0 (local) 0 (local) 004: 2 (GLIBC_2.4) 0 (local) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 008: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 3 (GCC_3.0) 00c: 2 (GLIBC_2.4) 3 (GCC_3.0) 4 (GCC_3.5) 2 (GLIBC_2.4) 010: 5 (GLIBC_2.17) 0 (local) 0 (local) 2 (GLIBC_2.4) 014: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 4 (GCC_3.5) 2 (GLIBC_2.4) 018: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 01c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 020: 0 (local) 4 (GCC_3.5) 0 (local) 2 (GLIBC_2.4) 024: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 3 (GCC_3.0) 028: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 6 (GLIBC_2.4) 02c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 7 (GLIBC_2.16) 2 (GLIBC_2.4) 030: 2 (GLIBC_2.4) 0 (local) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 034: 0 (local) 0 (local) 2 (GLIBC_2.4) 3 (GCC_3.0) 038: 8 (GCC_3.3) 2 (GLIBC_2.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) 084: 3 (GCC_3.0) 2 (GLIBC_2.4) 0 (local) 4 (GCC_3.5) 088: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 0 (local) 08c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 090: 6 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 0 (local) 094: 1 (global) 1 (global) 1 (global) 1 (global) ...... many more empty entries... 1780: 1 (global) 1 (global) 1 (global) 1 (global) 1784: 1 (global) 1 (global) 1 (global)

Version needs section '.gnu.version_r' contains 4 entries: Addr: 0x0000000000074f9c Offset: 0x074f9c Link: 4 (.dynstr) 000000: Version: 1 File: ld-linux-armhf.so.3 Cnt: 1 0x0010: Name: GLIBC_2.4 Flags: none Version: 10 0x0020: Version: 1 File: libm.so.6 Cnt: 1 0x0030: Name: GLIBC_2.4 Flags: none Version: 6 0x0040: Version: 1 File: libgcc_s.so.1 Cnt: 3 0x0050: Name: GCC_3.3 Flags: none Version: 8 0x0060: Name: GCC_3.5 Flags: none Version: 4 0x0070: Name: GCC_3.0 Flags: none Version: 3 0x0080: Version: 1 File: libc.so.6 Cnt: 4 0x0090: Name: GLIBC_2.18 Flags: none Version: 9 0x00a0: Name: GLIBC_2.16 Flags: none Version: 7 0x00b0: Name: GLIBC_2.17 Flags: none Version: 5 0x00c0: Name: GLIBC_2.4 Flags: none Version: 2

This is a listing of the files from the arm32 system: $ ll /usr/lib/libstdc++* lrwxrwxrwx 1 root root 14 Jun 20 16:01 /usr/lib/libstdc++.so -> libstdc++.so.6 -rwxr-xr-x 1 root root 1404964 Apr 19 2020 /usr/lib/libstdc++.so.6 -rwxr-xr-x 1 root root 1404968 Apr 19 2020 /usr/lib/libstdc++.so.6.0.25 -rw-r--r-- 1 root root 2388 Apr 19 2020 /usr/lib/libstdc++.so.6.0.25-gdb.py

I cannot figure out what version exactly is required by dotnet. GLIBC_2.4, GLIBCXX_3.4.21 ?

The question is: Should I be concerned, or is everithing fine?

Reproduction Steps

run dotnet. This produces the describe output

Expected behavior

No warning message

Actual behavior

does spit out the warning.

Regression?

No response

Known Workarounds

No response

Configuration

net 7.0.8 embedded 32Bit linux system: Linux 4.19.94-gbe5389fd85 #1 SMP PREEMPT Wed May 17 12:21:22 CEST 2023 armv7l GNU/Linux Architexture arm V7

Other information

No response

janvorli commented 11 months ago

dotnet is built against glibc 2.27, so that's what is the required minimum. However, as you can see from the versions you've dumped, the highest version of symbol used is 2.17. That's just because we don't end up using a symbol with newer version, but we cannot guarantee that, so the 2.27 is required. As for libstdc++, based on your symbol dump, the minimum version of the libstdc++ needed is 3.4.21. You can dump all symbol versions in your libstdc++ e.g. this way:

 objdump -T /usr/lib/libstdc++.so.6 | grep -o 'GLIBCXX_[0-9.]* ' | sort | uniq
BennyBread commented 11 months ago

Hi. if I call objdump with GLIBCXX nothing is returned.

when I call it this way:

objdump -T libstdc++.so.6 | grep -o 'GLIBC_[0-9.]* ' | sort | uniq

This is my output:

GLIBC_2.16 GLIBC_2.17 GLIBC_2.18 GLIBC_2.4

Seems like I have glibc 2.18 on my system. And dotnet want's 2.27.

Did I understand this correct?

BennyBread commented 11 months ago

I digged a little more. When I call this:

readelf -V -W /lib/libc.so.6 | grep -o 'GLIBC_[0-9.]*' | sort | uniq

I get his output:

GLIBC_
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_2.18
GLIBC_2.22
GLIBC_2.23
GLIBC_2.24
GLIBC_2.25
GLIBC_2.26
GLIBC_2.27
GLIBC_2.28
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9

It seems like The version of glibc my system has is 2.28.

So everything is alright then? I'm not 100% sure...

ghost commented 9 months ago

Tagging subscribers to this area: @vitek-karas, @agocke, @vsadov See info in area-owners.md if you want to be subscribed.

Issue Details
### Description We are currently having issues with our embedded linux system running dotnet7.0.8 starting dotnet exe spits out "dotnet: /usr/lib/libstdc++.so.6: no version information available (required by dotnet)" multiple times. I've searched a lot and could only find aout that it could be a version mismatch on the system. If I run my program I get the same outputs at startup but the program seems to run fine. From the infos which are stated here: [https://github.com/dotnet/core/blob/main/release-notes/7.0/supported-os.md#linux](https://github.com/dotnet/core/blob/main/release-notes/7.0/supported-os.md#linux) for arm32 is glibc 2.27 the required minimum. My system has libstdc++.so.6.0.25 and libc.so.6 I cannot find out what version exactly is missing/wrong. So: If I do an readelf call on dotnet I get this: $ readelf -VW dotnet Version symbols section '.gnu.version' contains 122 entries: Addr: 0x00000000000009d4 Offset: 0x0009d4 Link: 4 (.dynsym) 000: 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 1 (*global*) 004: 1 (*global*) 1 (*global*) 2 (GLIBC_2.4) 3 (GCC_3.0) ... **Version needs section** '.gnu.version_r' contains 6 entries: Addr: 0x0000000000000ac8 Offset: 0x000ac8 Link: 8 (.dynstr) 000000: Version: 1 File: libpthread.so.0 Cnt: 1 0x0060: Name: GLIBC_2.4 Flags: none Version: 9 0x0010: Version: 1 File: libdl.so.2 Cnt: 1 0x0070: Name: GLIBC_2.4 Flags: none Version: 13 0x0020: Version: 1 File: **libstdc++.so.6** Cnt: 6 0x0080: Name: GLIBCXX_3.4 Flags: none Version: 5 0x0090: Name: GLIBCXX_3.4.9 Flags: none Version: 12 0x00a0: Name: GLIBCXX_3.4.11 Flags: none Version: 8 0x00b0: Name: GLIBCXX_3.4.20 Flags: none Version: 11 0x00c0: Name: GLIBCXX_3.4.21 Flags: none Version: 4 0x00d0: Name: CXXABI_1.3 Flags: none Version: 7 0x0030: Version: 1 File: libgcc_s.so.1 Cnt: 2 0x00e0: Name: GCC_3.0 Flags: none Version: 3 0x00f0: Name: GCC_3.5 Flags: none Version: 6 0x0040: Version: 1 File: libc.so.6 Cnt: 2 0x0100: Name: GLIBC_2.4 Flags: none Version: 2 0x0110: Name: GLIBC_2.16 Flags: none Version: 14 0x0050: Version: 1 File: ld-linux-armhf.so.3 Cnt: 1 0x0120: Name: GLIBC_2.4 Flags: none Version: 10 If I do the same for the libstdc++.so.6 of my system I get this: $ readelf -V libstdc++.so.6 Version symbols section '.gnu.version' contains 6023 entries: Addr: 0x000000000007208e Offset: 0x07208e Link: 3 (.dynsym) 000: 0 (*local*) 0 (*local*) 0 (*local*) 0 (*local*) 004: 2 (GLIBC_2.4) 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 008: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 3 (GCC_3.0) 00c: 2 (GLIBC_2.4) 3 (GCC_3.0) 4 (GCC_3.5) 2 (GLIBC_2.4) 010: 5 (GLIBC_2.17) 0 (*local*) 0 (*local*) 2 (GLIBC_2.4) 014: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 4 (GCC_3.5) 2 (GLIBC_2.4) 018: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 01c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 020: 0 (*local*) 4 (GCC_3.5) 0 (*local*) 2 (GLIBC_2.4) 024: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 3 (GCC_3.0) 028: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 6 (GLIBC_2.4) 02c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 7 (GLIBC_2.16) 2 (GLIBC_2.4) 030: 2 (GLIBC_2.4) 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 034: 0 (*local*) 0 (*local*) 2 (GLIBC_2.4) 3 (GCC_3.0) 038: 8 (GCC_3.3) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 03c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (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: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 0 (*local*) 08c: 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 090: 6 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 0 (*local*) 094: 1 (*global*) 1 (*global*) 1 (*global*) 1 (*global*) ...... many more empty entries... 1780: 1 (*global*) 1 (*global*) 1 (*global*) 1 (*global*) 1784: 1 (*global*) 1 (*global*) 1 (*global*) Version needs section '.gnu.version_r' contains 4 entries: Addr: 0x0000000000074f9c Offset: 0x074f9c Link: 4 (.dynstr) 000000: Version: 1 File: ld-linux-armhf.so.3 Cnt: 1 0x0010: Name: GLIBC_2.4 Flags: none Version: 10 0x0020: Version: 1 File: libm.so.6 Cnt: 1 0x0030: Name: GLIBC_2.4 Flags: none Version: 6 0x0040: Version: 1 File: libgcc_s.so.1 Cnt: 3 0x0050: Name: GCC_3.3 Flags: none Version: 8 0x0060: Name: GCC_3.5 Flags: none Version: 4 0x0070: Name: GCC_3.0 Flags: none Version: 3 0x0080: Version: 1 File: libc.so.6 Cnt: 4 0x0090: Name: GLIBC_2.18 Flags: none Version: 9 0x00a0: Name: GLIBC_2.16 Flags: none Version: 7 0x00b0: Name: GLIBC_2.17 Flags: none Version: 5 0x00c0: Name: GLIBC_2.4 Flags: none Version: 2 This is a listing of the files from the arm32 system: $ ll /usr/lib/libstdc++* lrwxrwxrwx 1 root root 14 Jun 20 16:01 /usr/lib/libstdc++.so -> libstdc++.so.6 -rwxr-xr-x 1 root root 1404964 Apr 19 2020 /usr/lib/libstdc++.so.6 -rwxr-xr-x 1 root root 1404968 Apr 19 2020 /usr/lib/libstdc++.so.6.0.25 -rw-r--r-- 1 root root 2388 Apr 19 2020 /usr/lib/libstdc++.so.6.0.25-gdb.py I cannot figure out what version exactly is required by dotnet. GLIBC_2.4, GLIBCXX_3.4.21 ? The question is: Should I be concerned, or is everithing fine? ### Reproduction Steps run dotnet. This produces the describe output ### Expected behavior No warning message ### Actual behavior does spit out the warning. ### Regression? _No response_ ### Known Workarounds _No response_ ### Configuration net 7.0.8 embedded 32Bit linux system: Linux 4.19.94-gbe5389fd85 #1 SMP PREEMPT Wed May 17 12:21:22 CEST 2023 armv7l GNU/Linux Architexture arm V7 ### Other information _No response_
Author: BennyBread
Assignees: -
Labels: `area-Host`, `untriaged`
Milestone: -
agocke commented 7 months ago

Your glibc version looks fine -- it's the libstdc++ version that's too old. If you rune ldd on the dotnet executable or the coreclr.so libraries, it should show the libstdc++ stuff that's unresolved.