<p style="white-space: pre-wrap; word-wrap: break-word;">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). <br>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:</p><p style="white-space: pre-wrap; word-wrap: break-word;">root@b4860qds:# patchelf --set-rpath /mnt/nfs/bdlibs ../srslte/bin/srsenb<br>root@b4860qds:# ../srslte/bin/srsenb srsenb.conf<br>../srslte/bin/srsenb: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory</p><p style="white-space: pre-wrap; word-wrap: break-word;">And when we patch it with the --force-path option it works:</p><p style="white-space: pre-wrap; word-wrap: break-word;">root@b4860qds:# patchelf --force-rpath --set-rpath /mnt/nfs/bdlibs ../srslte/bin/srsenb<br>root@b4860qds:# ../srslte/bin/srsenb srsenb.conf<br>---  Software Radio Systems LTE eNodeB  ---</p><p style="white-space: pre-wrap; word-wrap: break-word;">Reading configuration file srsenb.conf...<br>WARNING: Could not verify cpu0 scaling governor<br>WARNING: Could not verify cpu1 scaling governor</p><p style="white-space: pre-wrap; word-wrap: break-word;">For an extra information, this is the contents of the folder with the toolchain libraries (what I call the new environment)</p><p style="white-space: pre-wrap; word-wrap: break-word;">root@b4860qds:~# ls /mnt/nfs/bdlibs/<br>ld-2.32.so                          libc-2.32.so                        libelf-0.181.so                     libmbedx509.so                      libsctp.so.1<br>ld.so.1                             libc.so.6                           libelf.so                           libmbedx509.so.0                    libsctp.so.1.0.17<br>libanl-2.32.so                      libconfig++.so                      libelf.so.1                         libmbedx509.so.2.16.10              libstdc++.so<br>libanl.so.1                         libconfig++.so.11                   libgcc_s.so                         libmem.so                           libstdc++.so.6<br>libasan.so                          libconfig++.so.11.0.2               libgcc_s.so.1                       libnss_dns-2.32.so                  libstdc++.so.6.0.28<br>libasan.so.6                        libconfig.so                        libinproctrace.so                   libnss_dns.so.2                     libthread_db-1.0.so<br>libasan.so.6.0.0                    libconfig.so.11                     libipc.so                           libnss_files-2.32.so                libthread_db.so.1<br>libasm-0.181.so                     libconfig.so.11.0.2                 libm-2.32.so                        libnss_files.so.2                   libutil-2.32.so<br>libasm.so                           libcrypt-2.32.so                    libm.so.6                           libpthread-2.32.so                  libutil.so.1<br>libasm.so.1                         libcrypt.so.1                       libmbedcrypto.so                    libpthread.so.0                     libz.so<br>libatomic.so                        libdl-2.32.so                       libmbedcrypto.so.2.16.10            libresolv-2.32.so                   libz.so.1<br>libatomic.so.1                      libdl.so.2                          libmbedcrypto.so.3                  libresolv.so.2                      libz.so.1.2.11<br>libatomic.so.1.2.0                  libdw-0.181.so                      libmbedtls.so                       librt-2.32.so                       malloc_interceptor_bt.so<br>libboost_program_options.so         libdw.so                            libmbedtls.so.12                    librt.so.1<br>libboost_program_options.so.1.75.0  libdw.so.1                          libmbedtls.so.2.16.10               libsctp.so</p><p style="white-space: pre-wrap; word-wrap: break-word;">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.<br></p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24272">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24272">change 24272</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/24272"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2d4a105d4843c0d31d6b5d8f8d4195247b290aec </div>
<div style="display:none"> Gerrit-Change-Number: 24272 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: alealcon <alejandro.leal@srs.io> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 01 Jun 2021 10:13:55 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>