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

[RSDK-4146] hotfix-add-nlopt #212

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

nicksanford
Copy link
Collaborator

@nicksanford nicksanford commented Jul 21, 2023

post facto ticket

Adds nlopt to app image as it is now a hard RDK requirement to provide nlopt.

Fixes cartographer-module not booting on linux as the app image doesn't contain the nlopt dynamic lib which RDK requires:

robot_server.process.cartographer-module_./cartographer-module.StdErr pexec/managed_process.go:222 \_ /tmp/appimage_extracted_81e530268ca6420dff0edd4f4f8e5ec8/usr/bin/cartographer-module: error while loading shared libraries: libnlopt.so.0: cannot open shared object file: No such file or directory

Manual testing:

Linux aarch64 (fresh raspberry pi raspian lite OS installed using https://docs.viam.com/installation/prepare/rpi-setup/):

sudo curl -o /usr/local/bin/rplidar-module https://storage.googleapis.com/packages.viam.com/apps/rplidar/rplidar-module-stable-aarch64.AppImage

sudo curl -o /usr/local/bin/cartographer-module-latest https://storage.googleapis.com/packages.viam.com/apps/slam-servers/cartographer-module-latest-aarch64.AppImage

# cartographer-module-patch copied from being built within canon

nickpi@nickpi:~ $ /usr/local/bin/cartographer-module-stable --version
2023-07-21T11:56:44.703-0400    INFO    cartographerModule      module/main.go:35       viam:slam:cartographer  {"version": "v0.3.19", "git_rev": "d12161af532c247bebc8a1f250c5d957f05f82ee"}
nickpi@nickpi:~ $ /usr/local/bin/cartographer-module-latest --version
/tmp/.mount_cartogYLR9q1/usr/bin/cartographer-module: error while loading shared libraries: libnlopt.so.0: cannot open shared object file: No such file or directory
nickpi@nickpi:~ $ /usr/local/bin/cartographer-module-patch --version
2023-07-21T11:57:13.543-0400    INFO    cartographerModule      module/main.go:35       viam:slam:cartographer  {"git_rev": "796f7d108c0ca00a9c4e4d5f31a1cd414096ac9a"}

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jul 21, 2023
@nicksanford nicksanford marked this pull request as ready for review July 21, 2023 16:05
@JohnN193 JohnN193 added the appimage Build AppImage of PR label Jul 21, 2023
Copy link
Collaborator

@EshaMaharishi EshaMaharishi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the speedy investigation and fix!

Note, we should also update the brew formula for cartographer-module to depend on nlopt0: https://github.com/viamrobotics/homebrew-brews/blob/35e903c5be3f50fc7a1ec294c40302cd5d14e45d/Formula/cartographer-module.rb#L10-L20

@@ -77,6 +77,7 @@ AppDir:
- libglx0:arm64
- libgl1:arm64
- libglvnd0:arm64
- libnlopt0:arm64
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[note to self] We have our own brew formula for nlopt0 that's pinned at v2.7.1 so that installations through brew will use that specific version.

This should also include v2.7.1, since that's the version of libnlopt0 in bullseye: https://packages.debian.org/bookworm/libnlopt0

@nicksanford nicksanford merged commit f1cddbb into viam-modules:main Jul 21, 2023
10 checks passed
@nicksanford nicksanford changed the title hotfix-add-nlopt [RSDK-4146] hotfix-add-nlopt Jul 21, 2023
pstrutz pushed a commit to pstrutz/viam-cartographer that referenced this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appimage Build AppImage of PR safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants