SleipnirGroup / Choreo

A graphical tool for planning time-optimized trajectories for autonomous mobile robots in the FIRST Robotics Competition.
BSD 3-Clause "New" or "Revised" License
150 stars 46 forks source link

Bundle libwebkit2gtk-4.0.so with standalone Linux executable #917

Closed calcmogul closed 2 weeks ago

calcmogul commented 2 weeks ago

Choreo can't run on Ubuntu 24.04. https://github.com/wpilibsuite/WPILibInstaller-Avalonia/issues/465

calcmogul commented 2 weeks ago

I think we'll just have to ship the AppImage for Linux. Here's the shared libraries I had to bundle:

patchelf --set-rpath '$ORIGIN' target/x86_64-unknown-linux-gnu/release/choreo target/x86_64-unknown-linux-gnu/release/choreo-cli
zip -j ${{ matrix.artifact-name }}-standalone.zip target/x86_64-unknown-linux-gnu/release/choreo target/x86_64-unknown-linux-gnu/release/choreo-cli /lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so.37 /lib/x86_64-linux-gnu/libjavascriptcoregtk-4.0.so.18 /lib/x86_64-linux-gnu/libicui18n.so.70 /lib/x86_64-linux-gnu/libicuuc.so.70 /lib/x86_64-linux-gnu/libicudata.so.70

The shared libraries alone are insufficient.

[tav@myriad tmp]$ LD_LIBRARY_PATH=. ./choreo
INFO | 23:24:41.374| gui/src/tauri.rs:153            | Starting Choreo 2025.0.0-beta.6 x86_64-unknown-linux-gnu
TRACE| 23:24:41.375| unknown                         | registering event source with poller: token=Token(1), interests=READABLE

** (choreo:888032): ERROR **: 15:24:41.402: Unable to spawn a new child process: Failed to spawn child process “/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/WebKitNetworkProcess” (No such file or directory)
Trace/breakpoint trap (core dumped)

It also takes up more space than the AppImage.

   78.9 MiB [################]  libwebkit2gtk-4.0.so.37
   29.2 MiB [#####           ]  libjavascriptcoregtk-4.0.so.18                                                        
   28.1 MiB [#####           ]  libicudata.so.70
   12.5 MiB [##              ]  choreo
    3.5 MiB [                ]  choreo-cli
    3.2 MiB [                ]  libicui18n.so.70
    2.0 MiB [                ]  libicuuc.so.70
.rwxr-xr-x   88M tav  11 Nov 15:19  choreo_2025.0.0-beta-6_amd64.AppImage