RPATH/RUNPATH not passed to compiled binaries. #1402

Open
opened 2026-02-03 16:09:21 +00:00 by ober · 0 comments
ober commented 2026-02-03 16:09:21 +00:00 (Migrated from github.com)

I build gerbil with:
./configure CFLAGS="-I/home/linuxbrew/.linuxbrew/opt/openssl@3/include" LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/openssl@3/lib -Wl,-rpath=/home/linuxbrew/.linuxbrew/opt/openssl@3/lib"

This is to force it to use ssl from homebrew, and not the host system ssl.
The resulting binaries for gerbil all work with the proper ssl.
However any project built in gerbil results in the binaries NOT having the RUNPATH/RPATH set.
For now my fix is to just use patchelf to set rpath directly in the generated binary.
patchelf --set-rpath /home/linuxbrew/.linuxbrew/opt/openssl@3/lib .gerbil/bin/kunabi

I build gerbil with: ./configure CFLAGS="-I/home/linuxbrew/.linuxbrew/opt/openssl@3/include" LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/openssl@3/lib -Wl,-rpath=/home/linuxbrew/.linuxbrew/opt/openssl@3/lib" This is to force it to use ssl from homebrew, and not the host system ssl. The resulting binaries for gerbil all work with the proper ssl. However any project built in gerbil results in the binaries NOT having the RUNPATH/RPATH set. For now my fix is to just use patchelf to set rpath directly in the generated binary. patchelf --set-rpath /home/linuxbrew/.linuxbrew/opt/openssl@3/lib .gerbil/bin/kunabi
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil#1402
No description provided.