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

error on start - lacks support for Mac/aarch64 architecture? #85

Open
kapilt opened this issue May 18, 2024 · 2 comments
Open

error on start - lacks support for Mac/aarch64 architecture? #85

kapilt opened this issue May 18, 2024 · 2 comments

Comments

@kapilt
Copy link

kapilt commented May 18, 2024

this is on a new m3 MacBook Pro

❯ anvil-app-server --app pide
Found Anvil App Server JAR in package directory
[INFO  anvil.app-server.postgres] Launching embedded Postgres database. Find Postgres daemon logs in the ' .anvil-data ' directory.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: Cannot run program ".anvil-data/db-bin/PG-a2a9bc65661eac6f108fc920268a87b3/bin/initdb": error=86, Bad CPU type in executable
        at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
        at clojure.core$deref_future.invokeStatic(core.clj:2292)
        at clojure.core$future_call$reify__8097.deref(core.clj:6894)
        at clojure.core$deref.invokeStatic(core.clj:2312)
        at clojure.core$deref.invoke(core.clj:2298)
        at anvil.app_server.postgres$start_postgres_with_timeout.invokeStatic(postgres.clj:47)
        at anvil.app_server.postgres$start_postgres_with_timeout.invoke(postgres.clj:37)
        at anvil.app_server.postgres$launch_bundled_db_BANG_.invokeStatic(postgres.clj:146)
        at anvil.app_server.postgres$launch_bundled_db_BANG_.invoke(postgres.clj:87)
        at anvil.app_server.run$with_bundled_postgres_if_configured.invokeStatic(run.clj:318)
        at anvil.app_server.run$with_bundled_postgres_if_configured.invoke(run.clj:311)
        at anvil.app_server.run$with_bundled_postgres_if_configured.invokeStatic(run.clj:312)
        at anvil.app_server.run$with_bundled_postgres_if_configured.invoke(run.clj:311)
        at anvil.app_server.run$_main.invokeStatic(run.clj:411)
        at anvil.app_server.run$_main.doInvoke(run.clj:407)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at anvil.app_server.run.main(Unknown Source)
Caused by: java.lang.RuntimeException: java.io.IOException: Cannot run program ".anvil-data/db-bin/PG-a2a9bc65661eac6f108fc920268a87b3/bin/initdb": error=86, Bad CPU type in executable
        at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:637)
        at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.initdb(EmbeddedPostgres.java:252)
        at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.<init>(EmbeddedPostgres.java:159)
        at io.zonky.test.db.postgres.embedded.EmbeddedPostgres$Builder.start(EmbeddedPostgres.java:583)
        at anvil.app_server.postgres$start_postgres_with_timeout$fn__536.invoke(postgres.clj:39)
        at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1570)
Caused by: java.io.IOException: Cannot run program ".anvil-data/db-bin/PG-a2a9bc65661eac6f108fc920268a87b3/bin/initdb": error=86, Bad CPU type in executable
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at io.zonky.test.db.postgres.embedded.EmbeddedPostgres.system(EmbeddedPostgres.java:626)
        ... 10 more
Caused by: java.io.IOException: error=86, Bad CPU type in executable
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
        at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
        at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 12 more
Failed to start built-in Postgres database: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: Cannot run program ".anvil-data/db-bin/PG-a2a9bc65661eac6f108fc920268a87b3/bin/initdb": error=86, Bad CPU type in executable
More logs are available in .anvil-data/postgres.log.
Some common causes of this problem:
 - Are you launching this server as 'root' on a UNIX system? 
   Postgres will not run as root; try launching the server as an ordinary user.
 - Are you running this server on an unusual architecture or OS? (Mac OS X/aarch64)
@kapilt
Copy link
Author

kapilt commented May 18, 2024

perhaps update the install instructions to switch from pgcli to postgresql-server if that's what's required, bundling in only works if you handle common os/architectures.

@seoungbae-park
Copy link

Same error

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

No branches or pull requests

2 participants