Change in osmo-gsm-tester[master]: util: adds the feature to force the rpath when patching files.

alealcon gerrit-no-reply at
Tue Jun 1 10:13:55 UTC 2021

alealcon has posted comments on this change. ( )

Change subject: util: adds the feature to force the rpath when patching files.

Patch Set 1:

It is patching the srsenb binary. We have a custom toolchain for the BBU embedded Linux (libs + ld). BBU is a ppc with an old linux kernel (Linux b4860qds 3.12.37) and our toolchain contains up to date versions of the libraries that we need to run the srsenb, so we don't want the systems libraries and our toolchain libraries to mix (we don't add out libraries to the system's enviroment, we keep them isolated to they don't mix). 
When we build the srsenb binary, we specify the rpath and the dynamic linker, so it points to our toolchain environment instead of the systems defaults. This is what happens when we don't force the rpath and we try to launch the srsenb:

root at b4860qds:# patchelf --set-rpath /mnt/nfs/bdlibs ../srslte/bin/srsenb
root at b4860qds:# ../srslte/bin/srsenb srsenb.conf
../srslte/bin/srsenb: error while loading shared libraries: cannot open shared object file: No such file or directory

And when we patch it with the --force-path option it works:

root at b4860qds:# patchelf --force-rpath --set-rpath /mnt/nfs/bdlibs ../srslte/bin/srsenb
root at b4860qds:# ../srslte/bin/srsenb srsenb.conf
---  Software Radio Systems LTE eNodeB  ---

Reading configuration file srsenb.conf...
WARNING: Could not verify cpu0 scaling governor
WARNING: Could not verify cpu1 scaling governor

For an extra information, this is the contents of the folder with the toolchain libraries (what I call the new environment)

root at b4860qds:~# ls /mnt/nfs/bdlibs/                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

I added the new function to patch with --force-rpath option to avoid modifying the previous patch function, because the --force-rapth option sets the RPATH variable which is deprecated, while with the normal patch function RUN_PATH variable is set.

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I2d4a105d4843c0d31d6b5d8f8d4195247b290aec
Gerrit-Change-Number: 24272
Gerrit-PatchSet: 1
Gerrit-Owner: alealcon <alejandro.leal at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin at>
Gerrit-Comment-Date: Tue, 01 Jun 2021 10:13:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list