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

fix: widen aarch64 linux minimum GLIBC version by improving sysroot build #23791

Merged
merged 23 commits into from
May 15, 2024

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented May 13, 2024

Fixes the sysroot to make it more reliable on aarch64. The sysroot we download as part of the build process now includes a small script to set up the linker flags required to build in that sysroot.

Fixes #23775

Before:

matt@raspberrypi:~ $ ~/.deno/bin/deno 
/home/matt/.deno/bin/deno: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/matt/.deno/bin/deno)

After:

matt@raspberrypi:/tmp $ ./deno
Deno 1.43.3
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.

@mmastrac mmastrac changed the title fix: improve sysroot [WIP] fix: fix aarch64 linux GLIBC version by improving sysroot build [WIP] May 13, 2024
@@ -95,51 +95,41 @@ sudo mount --rbind /home /sysroot/home
sudo mount -t proc /proc /sysroot/proc
cd

if [[ \`uname -m\` == "aarch64" ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer necessary -- maybe because we're fixing up symlinks in the sysroot now?

@mmastrac mmastrac changed the title fix: fix aarch64 linux GLIBC version by improving sysroot build [WIP] fix: widen aarch64 linux minimum GLIBC version by improving sysroot build May 14, 2024
@@ -700,6 +701,24 @@ const ci = {
"df -h",
].join("\n"),
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary is now smoke-tested (in sysroot and normally) after it boots to get faster feedback.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thanks!

@mmastrac mmastrac requested a review from bartlomieju May 14, 2024 14:51
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
\${{ env.RUSTFLAGS }}
--cfg tokio_unstable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need tokio_unstable? Or is it to support tokio monitor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was here previously. I imagine it's just for the monitor.

@mmastrac mmastrac merged commit 366aab9 into denoland:main May 15, 2024
17 checks passed
bartlomieju pushed a commit that referenced this pull request May 16, 2024
…uild (#23791)

Fixes the sysroot to make it more reliable on aarch64. The sysroot we
download as part of the build process now includes a small script to set
up the linker flags required to build in that sysroot.

Fixes #23775 

Before:

```
matt@raspberrypi:~ $ ~/.deno/bin/deno 
/home/matt/.deno/bin/deno: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/matt/.deno/bin/deno)
```

After:

```
matt@raspberrypi:/tmp $ ./deno
Deno 1.43.3
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run-tim error: deno: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by deno)
2 participants