Giter Club home page Giter Club logo

Comments (10)

sitepodmatt avatar sitepodmatt commented on September 25, 2024 1

Works

[matt@fedora ~]$ ./bb
Babashka v1.3.183-SNAPSHOT REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.

user=> 

from babashka.

borkdude avatar borkdude commented on September 25, 2024

This doesn't ring a bell. Have you tried compiling babashka on Asahi linux itself from source?
If that also doesn't work, what I would do is the following:

Make an Hello World GraalVM binary in Java. Compile it on Asahi (or other aarch64 linux) and make an issue with GraalVM about it. Also link the issue here.

from babashka.

borkdude avatar borkdude commented on September 25, 2024

From the GraalVM Slack:

Peter Zhelezniakov
1 minute ago
IIRC binaries built on a system with 4K pages cannot run on systems with 16K pages
Peter Zhelezniakov
< 1 minute ago
But that can probably be fixed using -H:PageSize=

from babashka.

borkdude avatar borkdude commented on September 25, 2024

More news: setting -H:PageSize=16K might help since it will work on 4K page size systems too (since 16 is a multiple of 4).

from babashka.

lewurm avatar lewurm commented on September 25, 2024

If you running native-image directly on Asahi it should work as it will pick up the right pagesize. I did a couple of GraalVM smoke tests when when the Asahi installer was released a couple months ago, and that worked fine.

Alas during native-image build-time we assume the pagesize to be constant (= the value set via -H:PageSize=) and thus the generated code only works with that pagesize (or smaller). Unlikely that we'll fix that anytime soon, especially because the easy workaround here is to use -H:PageSize=16K.

from babashka.

lewurm avatar lewurm commented on September 25, 2024

FWIW, as marcan suggested, the better choice for shipping is -H:PageSize=64K on linux-aarch64. Should be future proofed then 😉

from babashka.

sitepodmatt avatar sitepodmatt commented on September 25, 2024

Managed to get to compile and run with

diff --git a/script/compile b/script/compile
index 964a2b06..fcc8e47d 100755
--- a/script/compile
+++ b/script/compile
@@ -39,6 +39,7 @@ args=("-jar" "$BABASHKA_JAR"
       # "-H:DashboardDump=reports/dump"
       # "-H:+DashboardPretty"
       # "-H:+DashboardJson"
+      "-H:PageSize=64K"
       "-H:ReportAnalysisForbiddenType=java.awt.Toolkit:InHeap,Allocated"
       "--verbose"
       "--no-fallback"

Would make a PR but I guess we need this flag optional based on arch type?

from babashka.

borkdude avatar borkdude commented on September 25, 2024

@sitepodmatt I can make a branch so you can test the binary on Asahi. If it works, then we'll keep the flag for linux aarch64.

from babashka.

sitepodmatt avatar sitepodmatt commented on September 25, 2024

@borkdude sounds good

from babashka.

borkdude avatar borkdude commented on September 25, 2024

@sitepodmatt Here's the link to the binary: https://output.circle-artifacts.com/output/job/046077be-445a-4499-943d-40641c55e411/artifacts/0/release/babashka-1.3.183-SNAPSHOT-linux-aarch64-static.tar.gz

Can you let me know if it works on Asahi?

from babashka.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.