Skip to content

Unfound glibc version results in error message which does not make sense #2024

@krpors

Description

@krpors

I'm using haxeflixel to build a project. After updating Lime, I am unable to run my project like so:

$ haxelib run lime test neko

Called from lime/_internal/backend/native/NativeCFFI.hx line 647
Called from lime/system/CFFI.hx line 182
Called from lime/system/CFFI.hx line 317
Uncaught exception - Could not find lime.ndll. This file is provided with Lime's Haxelib releases, but not via Git. Please copy it from Lime's latest Haxelib release into either /home/krpors/haxelib/lime/8,3,0/ndll/Linux or /home/krpors/haxelib/lime/8,3,0/ndll/Linux64, as appropriate for your system. Advanced users may run `lime rebuild cpp` instead.

Even though the file is there, the error reports that it "cannot be found". The real reason however, is that my Linux distribution does not have the required glibc version (I'm using glibc 2.31 btw):

$ ldd lime.ndll

./lime.ndll: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by ./lime.ndll)
./lime.ndll: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ./lime.ndll)
./lime.ndll: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by ./lime.ndll)
./lime.ndll: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./lime.ndll)
./lime.ndll: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./lime.ndll)
./lime.ndll: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./lime.ndll)
	linux-vdso.so.1 (0x00007ffe6b791000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f06268cc000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f062677d000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0626762000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0626570000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0627459000)

I admittedly failed to suspect any linking failures because of the original error message. Apparently, the original error message is discarded (see this line of code).

Is there any reason why the original code doesn't just (re)throw the error resulting from the load() call? If I remove the try/catch, the code reports what I expected:

Called from lime/_internal/backend/native/NativeCFFI.hx line 647
Called from lime/system/CFFI.hx line 182
Called from lime/system/CFFI.hx line 291
Called from lime/system/CFFI.hx line 112
Called from /usr/share/haxe/std/neko/Lib.hx line 35
Uncaught exception - load.c(237) : Failed to load library : ./lime.ndll (/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by ./lime.ndll))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions