Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrecognized glibc version: 2.31.9000 unrecognized C ABI #5082

Closed
Jan200101 opened this issue Apr 17, 2020 · 4 comments
Closed

Unrecognized glibc version: 2.31.9000 unrecognized C ABI #5082

Jan200101 opened this issue Apr 17, 2020 · 4 comments
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals.
Milestone

Comments

@Jan200101
Copy link
Contributor

I came across this when compiling the documentation on a fedora-rawhide-x86_64 system

log

docgen example code 248/259...OK
docgen example code 249/259...OK
docgen example code 250/259...OK
docgen example code 251/259...Unrecognized glibc version: 2.31.9000
unrecognized C ABI

The following command exited with code 1:
../out/build-zig-x86_64-linux-gnu/zig build-exe docgen_tmp/test.zig --name test --color on --cache on -lc 
doc/langref.html.in:9461:20: error: example failed to compile
      {#link_libc#}

I don't know how to fix this since I find the abi.txt to be very confusing though I am willing to help test on my local machine

@andrewrk andrewrk added bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. labels May 30, 2020
@andrewrk andrewrk added this to the 0.7.0 milestone May 30, 2020
@andrewrk
Copy link
Member

This appears to be a missing pattern awareness in the glibc version detection code which is here:

zig/lib/std/zig/system.zig

Lines 544 to 557 in 5168271

fn glibcVerFromSO(so_path: [:0]const u8) !std.builtin.Version {
var link_buf: [std.os.PATH_MAX]u8 = undefined;
const link_name = std.os.readlinkZ(so_path.ptr, &link_buf) catch |err| switch (err) {
error.AccessDenied => return error.GnuLibCVersionUnavailable,
error.FileSystem => return error.FileSystem,
error.SymLinkLoop => return error.SymLinkLoop,
error.NameTooLong => unreachable,
error.FileNotFound => return error.GnuLibCVersionUnavailable,
error.SystemResources => return error.SystemResources,
error.NotDir => return error.GnuLibCVersionUnavailable,
error.Unexpected => return error.GnuLibCVersionUnavailable,
};
return glibcVerFromLinkName(link_name);
}

@Jan200101 would you be able to try this?

  • Use the ldd command on /usr/bin/env to find a list of shared libraries.
  • Find the one that has libc.so.6 => (and then a path name) and tell me what the path name is, as well as the output of readlink pathname (where pathname is the path name that ldd printed)

@Jan200101
Copy link
Contributor Author

Jan200101 commented May 30, 2020

sentry:~/ $ ldd /usr/bin/env
    linux-vdso.so.1 (0x00007ffdb4dd6000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f75741d0000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f75743f2000)

sentry:~/ $ readlink /lib64/libc.so.6
libc-2.31.9000.so

@darltrash
Copy link

#6192 that also happens to me

@Jan200101
Copy link
Contributor Author

Jan200101 commented Aug 29, 2020

I believe the only real fix for this would be adding all X.Y.9000 and X.Y.90 glibc versions but that would be a bunch of work for what would effectively be supporting the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals.
Projects
None yet
Development

No branches or pull requests

3 participants