too-recent import error

27 views
Skip to first unread message

prasun3

unread,
Jul 4, 2024, 12:25:16 AMJul 4
to DynamoRIO Users
Hi

I am seeing this error while trying to create a package on Ubuntu 22 (gcc 11). I am able to do a regular build without errors.

I know there were some issues with newer glibc versions and Ubuntu 22 but I am not fully on top of all the details and what is expected to work.

I did see issue 5130 (drrun has too-recent import) but that has been fixed already and I am on the latest rev (commit 628314df334a214275b8aeaaaf2ae605fa440cc3).

This is the cmd I ran (I think this is close to what the CI runs)

$ ctest -VV -S "../dynamorio/make/package.cmake,automated_ci;build=1;64_only"

-- The C compiler identification is GNU 11.3.0


[ 31%] Linking C executable ../bin64/drconfig
CMake Error at /home/jenkins/DR/dynamorio/core/CMake_readelf.cmake:165 (message):
  *** Error:
  /home/jenkins/DR/release/build_debug-64/bin64/drconfig
  has too-recent import(s):

     GLOBAL DEFAULT  UND _[...]@GLIBC_2.34

glibc version is 2.35

$ /lib64/ld-linux-x86-64.so.2 --version
ld.so (Ubuntu GLIBC 2.35-0ubuntu3.1) stable release version 2.35.
Copyright (C) 2022 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.

Thanks
Prasun

Derek Bruening

unread,
Jul 8, 2024, 12:22:05 PMJul 8
to prasun3, DynamoRIO Users
The newer glibc issues you are referring to are not related: those are private loader transparency challenges from hidden undocumented glibc interfaces.

The "too-recent-import" is a regular library import in the front-end binaries which will limit on which older platforms you can use those binaries.  If you are building on the same platform you're running, you can disable that check.  You've deleted the actual symbol name from your pasted error message (I assume you replaced it with "_[...]") so it's hard to say what a code fix would entail if you need to run on older platforms yet can't build with an older toolchain.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/abb7f608-9929-47a9-82d1-aa10fd544228n%40googlegroups.com.

Prasun

unread,
Jul 9, 2024, 10:35:37 AMJul 9
to Derek Bruening, DynamoRIO Users
How do I disable that check?

I did not remove the symbol name. The error message actually says "_[...]".

Derek Bruening

unread,
Jul 9, 2024, 7:22:41 PMJul 9
to Prasun, DynamoRIO Users
I think you'd have to modify the cmake code to not pass `check_libc` to `CMake_readelf.cmake` or otherwise disable the check in the cmake code.
If you wanted to add a cmake config option for building and running only on the same system to make it easier that sounds good (just make sure our package builds meant to run on older systems have the option off): a pull request for that would be appreciated.

Derek Bruening

unread,
Jul 9, 2024, 7:23:34 PMJul 9
to Prasun, DynamoRIO Users
For the weird message: best to go into the cmake code and get the full output as its attempt to summarize or identify the symbol may be mangling the symbol name??

Prasun

unread,
Jul 10, 2024, 1:49:25 AMJul 10
to Derek Bruening, DynamoRIO Users
I needed to add '--wide' to the readelf command line. It shows the symbol name now

     GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.34


glibc 2.34 has a hard break where you cannot compile with 2.34 and have it work with older glibc versions even if you use those version headers. It will always link __libc_start_main@GLIBC_2.34 (it's some kind of new security hardening measure, see https://sourceware.org/bugzilla/show_bug.cgi?id=23323).

Following the bugzilla link I see this
    A new symbol version __libc_start_main@@GLIBC_2.34 is introduced because
    new binaries running on an old libc would not run their ELF
    constructors, leading to difficult-to-debug issues.

Derek Bruening

unread,
Jul 10, 2024, 1:03:43 PMJul 10
to Prasun, DynamoRIO Users
Reply all
Reply to author
Forward
0 new messages