<p style="white-space: pre-wrap; word-wrap: break-word;">Hi Pau, some comments for each question:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> - Should I remove the function and add that parameter to the normal patchelf function? This will help us (as I prefer to set an absolute path on deploy rather that on build), but if you don't approve to modify the rpath inside the srs-enb.py file it doesn't make sense this change and we can remove this commit.</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">- I agree with you that it makes sense to have different build scripts, each of them supporting different platforms (ppc, aarch64, armv7). What I don't like is that I must set an absolute path for the patchelf utility in those scripts, because if I have 2 different boards with the same platform (ppc for example) that path can change between boards due hardware specs. I would really love to avoid that. <br>If you prefer that I add a jenkins-build-stslte-bbu.sh I'm thinking to add 2 variables to the jenkins-build-commmon.sh: PATCHELF_RPATH_ARGS='--set-rpath' and PATCHELF_RPATH_DIR='$ORIGIN/../lib/' by default. The jenkins-build-stslte-bbu.sh will overwrite those values to PATCHELF_RPATH_ARGS='--force-rpath --set-rpath' and PATCHELF_RPATH_DIR='/mnt/nfs/bdlibs/'. The call within the *-common.sh would be:<br> if [ -d bin/ ]; then<br> find bin -depth -type f -exec patchelf $PATCHELF_RPATH_ARGS $PATCHELF_RPATH_DIR {} \;<br> fi<br> if [ -d sbin/ ]; then<br> find sbin -depth -type f -exec patchelf $PATCHELF_RPATH_ARGS $PATCHELF_RPATH_DIR {} \;</pre><p style="white-space: pre-wrap; word-wrap: break-word;">Does it sound good to you?</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">One last question regarding the patchelf that is done in jenkins-build-common.sh. Why does that script sets the rpath? Is there a file where the "LD_LIBRARY_PATH" is not set before launching the binary?<br>I ask this, because I configure the rpath and the dynamic-linker in the toolchain, and I've tested that removing the call to "add_rpath" in the jenkins-build-common.sh makes the srsenb works without patching it or configuring the LD_LIBRARY_PATH in enb-srs.py.<br> </pre><ul><li>I did that test. I removed the rpath from a binary and run ldd</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">root@b4860qds:# LD_LIBRARY_PATH='/mnt/nfs/osmo-gsm-tester-srsenb/srslte/lib:/mnt/nfs/bdlibs' /mnt/nfs/ldd ../srslte/bin/srsenb srsenb.conf <br>/bin/sh: /lib/ld.so.1: version `GLIBC_2.22' not found (required by /mnt/nfs/bdlibs/libc.so.6)</p><p style="white-space: pre-wrap; word-wrap: break-word;">It uses the system's ld (/lib/ld.so.1) instead of the toolchain's ld (/mnt/nfs/bdlibs/ld.so.1). Perhaps is because we're using LD_LIBRARY_PATH. Here is the linker section of the srsenb (which points to the right ld):</p><p style="white-space: pre-wrap; word-wrap: break-word;">root@b4860qds:# readelf -l srsenb</p><p style="white-space: pre-wrap; word-wrap: break-word;">El tipo del fichero elf es EXEC (Fichero ejecutable)<br>Entry point 0x10020fb8<br>There are 10 program headers, starting at offset 52</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Encabezados de Programa:<br> Tipo Desplaz DirVirt DirFĂsica TamFich TamMem Opt Alin<br> PHDR 0x000034 0x10000034 0x10000034 0x00140 0x00140 R 0x4<br> INTERP 0x000174 0x10000174 0x10000174 0x00018 0x00018 R 0x1<br> [Requesting program interpreter: /mnt/nfs/bdlibs/ld.so.1]</pre><p style="white-space: pre-wrap; word-wrap: break-word;"><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: Thu, 03 Jun 2021 14:49:44 +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>