Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
Fix `GLIBC_2.33' not found (required by /.../libstdc++.so.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
karantan committed Jul 27, 2022
1 parent 90bec0c commit 1fd3e44
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ let
nixpkgs
];

# fix for:
# `nix-instantiate: /nix/store/ikl21vjfq900ccbqg1xasp83kadw6q8y-glibc-2.32-46/lib/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/j132k1ncfn6gjfd2f5s1gz37170rch4h-gcc-11.3.0-lib/lib/libstdc++.so.6)`
patchGLIBC = ''
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib/:$LD_LIBRARY_PATH
'';

# This section is copied from https://github.com/NixOS/nixpkgs/blob/7a100ad9543687d046cfeeb5156dfaa697e1abbd/pkgs/build-support/docker/default.nix#L39-L57
# but adjusted to support additional contents
extraCommands = ''
Expand All @@ -101,7 +107,7 @@ let
# make sure /tmp exists
mkdir -m 1777 tmp
'';
'' + patchGLIBC;
in pkgs.dockerTools.buildImage {
name = "nixpkgs";
# Doesn't make images have a creation date of 1970
Expand Down

0 comments on commit 1fd3e44

Please sign in to comment.