babashka / babashka-sql-pods

Babashka pods for SQL databases
Eclipse Public License 1.0
84 stars 16 forks source link

Support for Apple M1 chip #51

Open jarppe opened 2 years ago

jarppe commented 2 years ago

I would like to use Babashka Postgres pod with Apple M1 machines.

Currently this fails with message No executable found for pod org.babashka/postgresql (0.1.0) and OS Linux/aarch64

----- Error --------------------------------------------------------------------
Type:     java.lang.IllegalArgumentException
Message:  No executable found for pod org.babashka/postgresql (0.1.0) and OS Linux/aarch64
Location: <expr>:1:26

----- Context ------------------------------------------------------------------
1: (require 'babashka.pods) (babashka.pods/load-pod 'org.babashka/postgresql "0.1.0")
                            ^--- No executable found for pod org.babashka/postgresql (0.1.0) and OS Linux/aarch64

----- Stack trace --------------------------------------------------------------
user - <expr>:1:26
borkdude commented 2 years ago

@jarppe Why does it say linux? Are you running in Docker?

lunik1 commented 1 year ago

I don't know why @jarppe had "OS Linux" but here's the error I get trying to run the postgres pod on M1:

----- Error --------------------------------------------------------------------
Type:     java.io.IOException
Message:  Cannot run program "/Users/xxx/.local/share/.babashka/pods/repository/org.babashka/postgresql/0.1.0/mac_os_x/aarch64/pod-babashka-postgresql": error=86, Bad CPU type in executable
Location: xxx
borkdude commented 1 year ago

@lunik1 Can you try installing rosetta2? We should provide M1 binaries, agreed, but Rosetta is a good workaround for the meanwhile.

lunik1 commented 1 year ago

Strange, I thought I had it installed. Anyway works now, cheers.