[main] Step 5/7 : RUN npm install -g esy && esy install && esy build
[main] /usr/local/bin/esy -> /usr/local/lib/node_modules/esy/_build/default/esy/bin/esyCommand.exe
[main] > [email protected] postinstall /usr/local/lib/node_modules/esy/node_modules/esy-solve-cudf
[main] > node ./postinstall.js
[main] > [email protected] postinstall /usr/local/lib/node_modules/esy
[main] > node ./postinstall.js
[main] + [email protected]
[main] added 3 packages in 7.565s
[main] /bin/sh: 1: esy: Exec format error
[main]
[main] Removing intermediate container d239c1278268
[main] The command '/bin/sh -c npm install -g esy && esy install && esy build' returned a non-zero code: 2
Thanks for the issue, @willswire . Just curious - is this issue specific to Revery, or do other projects like hello-reason fail to build as well?
@bryphe can confirm that the issue is with Esy
```bash-4.4# git clone https://github.com/bryphe/revery-quick-start
Cloning into 'revery-quick-start'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 296 (delta 5), reused 6 (delta 3), pack-reused 280
Receiving objects: 100% (296/296), 532.61 KiB | 3.41 MiB/s, done.
Resolving deltas: 100% (95/95), done.
bash-4.4# cd revery-quick-start
bash-4.4# esy install
bash: /usr/local/bin/esy: cannot execute binary file: Exec format error
bash-4.4#
Would love to use Revery on the RPi4.
esy has https://github.com/esy/esy/issues/88 open for cross compilation
Has anyone successfully built natively, at least?
Would you like to share your findings here? @EduardoRFS
Have you tested the last esy binary ?
Latest esy binary from an npm install, x86-64.

@shayne I did built it before the change to skia, you need to bootstrap esy yourself, then it will works, but right know it fails to build on skia, so we have work to do.
Previously esy wasn't building on ARM neither on 32bit platforms, now you can get it to work.
Thanks @EduardoRFS, made progress. esy is built and running on the RPi (albeit with a few hacks).
Building revery at 758631f -- found that #include <gtk/gtk.h> wasn't resolving /usr/include/gtk-3.0/gtk/gtk.h (one of many). Hacked around those in the Native dune file. Now the linker is failing, coming back to perhaps the pkg-config isn't working properly.
Any ideas?
/usr/bin/ld: src/Native/libRevery_Native_stubs.a(dialog_gtk.o): undefined reference to symbol 'g_strjoin'
/usr/bin/ld: //usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0: error adding symbols: DSO missing from command line
Manually added the output of pkg-config --libs gtk+=3.0 to src/Native/dune c_library_flags. It builds. Success!
Revery on a Raspberry Pi

@shayne nice job, weird, here I have problem with skia
Edit:
Oh wait, didn't saw that you have tried without skia, btw I did the same thing with GTK when I built it last time
Strangely I have the same problem on Ubuntu on WSL 2
Done the same thing and it's working, thanks @shayne !
Posting here my src/Native/dune, I ran pkg-config --cflags --libs gtk+-3.0 and split the output: includes goes to c_flags and -l goes to c_library_flags
Not sure if pthread is needed
(library
(name Revery_Native)
(public_name Revery.Native)
(preprocess (pps lwt_ppx))
(library_flags (:include flags.sexp))
(js_of_ocaml (javascript_files dialog.js))
(c_names Revery_Native dialog dialog_cocoa dialog_win32 dialog_gtk notification notification_cocoa utilities ReveryAppDelegate ReveryProgressBar icon icon_cocoa icon_win32)
(c_flags :standard -Wall -Wextra -Werror
-pthread
-I/usr/include/gtk-3.0
-I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0
-I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount
-I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
(:include c_flags.sexp))
(c_library_flags
-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0
-lglib-2.0
(:include c_library_flags.sexp))
(libraries sdl2))
(copy_files cocoa/*)
(rule
(targets flags.sexp c_flags.sexp c_library_flags.sexp)
(deps (:discover config/discover.exe))
(action (run %{discover})))
Most helpful comment
Manually added the output of
pkg-config --libs gtk+=3.0tosrc/Native/dunec_library_flags. It builds. Success!Revery on a Raspberry Pi