testpmd fails to run because librte_pmd_bond.so is missing - dpdk

I have built and installed DPDK v.18.11.9 on Centos 7 using x86_64-native-linuxapp-gcc and option:
CONFIG_RTE_BUILD_SHARED_LIB=y
We want to run testpmd but it fails to load:
$ ./x86_64-native-linuxapp-gcc/app/testpmd
./x86_64-native-linuxapp-gcc/app/testpmd: error while loading shared
libraries: librte_pmd_bond.so.2.1: cannot open shared object file: No such file or directory
This is expected as lib/ does not contain librte_pmd_bond.so.
What build options should I use to build this library?
Best regards
David

This is a common error when one forgets to point the application elf the path for libraries. When DPDK libraries are built with shared mode, one has to specify the path to dpdk shared object via LD_LIBRARY_PATH. In failing to do so we get
# ldd app/testpmd
linux-vdso.so.1 (0x00007fff3eeb2000)
librte_pmd_bond.so.2.1 => not found
librte_pmd_dpaa.so.1.1 => not found
librte_pmd_ixgbe.so.2.1 => not found
librte_pmd_i40e.so.2.1 => not found
librte_pmd_bnxt.so.2.1 => not found
librte_pmd_softnic.so.1.1 => not found
librte_pdump.so.2.1 => not found
librte_metrics.so.1.1 => not found
librte_bitratestats.so.2.1 => not found
librte_latencystats.so.1.1 => not found
librte_bpf.so.1.1 => not found
librte_gro.so.1.1 => not found
librte_gso.so.1.1 => not found
librte_mbuf.so.4.1 => not found
librte_net.so.1.1 => not found
librte_ethdev.so.11.1 => not found
librte_mempool.so.5.1 => not found
librte_ring.so.2.1 => not found
librte_eal.so.9.1 => not found
librte_cmdline.so.2.1 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1474089000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1473c98000)
/lib64/ld-linux-x86-64.so.2 (0x00007f14745cf000)
Thereby running the application we get
# ./app/testpmd
./app/testpmd: error while loading shared libraries: librte_pmd_bond.so.2.1: cannot open shared object file: No such file or directory
To fix the error, as mentioned above use
export LD_LIBRARY_PATH=[path to dpdk shared libraries]
this resolves the dependencies and application runs.

Related

ldd does not find shared object and findes it at the same time

I was trying to deploy project with linuxdeployqt and when I run it with this command
linuxdeployqt ./installer-base-temp/TargetX -bundle-non-qt-libs -qmldir="../source/" -extra-plugins=sqldrivers,iconengines,mediaservice -always-overwrite -unsupported-allow-new-glibc
it shows the following error
ERROR: ldd outputLine: "libsamba-debug-samba4.so => not found"
ERROR: for binary: "/usr/lib64/samba/libsamba-modules-samba4.so"
ERROR: Please ensure that all libraries can be found by ldd. Aborting.
The strange thing is that when I run ldd /usr/lib64/samba/libsamba-modules-samba4.so
this is what I get
linux-vdso.so.1 (0x00007ffc295ea000)
libsamba-util.so.0 => /lib64/libsamba-util.so.0 (0x00007fb854716000)
libsamba-errors.so.1 => /lib64/libsamba-errors.so.1 (0x00007fb8545ca000)
libsamba-debug-samba4.so => not found
libtalloc.so.2 => /lib64/libtalloc.so.2 (0x00007fb8545bd000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb8543bc000)
libgenrand-samba4.so => /usr/lib64/samba/libgenrand-samba4.so (0x00007fb8543b5000)
libsocket-blocking-samba4.so => /usr/lib64/samba/libsocket-blocking-samba4.so (0x00007fb8543b0000)
libsamba-debug-samba4.so => /usr/lib64/samba/libsamba-debug-samba4.so (0x00007fb8543a3000)
libtime-basic-samba4.so => /usr/lib64/samba/libtime-basic-samba4.so (0x00007fb85439e000)
...
So ldd actually finds libsamba-debug-samba4.so to be located at /usr/lib64/samba/libsamba-debug-samba4.so, but at the same time it does not find it.
I have already tired to reinstall the package with sudo dnf reinstall samba-client-libs and after that run ldconfig, moreover I have tried to run it after removing /etc/ld.so.cache. It had no effect.
I am running Fedora 36 Workstation, with kernel version 5.17.13-300.fc36.x86_64.
Can someone explain why this happens and how to fix it.

Error while loading shared libraries: libpython2.7.so.1.0

Since a few days I get the following error when I try to open python that was installed with conda. The only thing that changed is that I changed the group of the files located in /software and gave the group read and write writes.
/software/local/share/bcbio/anaconda/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
I tried many different things. I first look at the output of ldd
ldd /software/local/share/bcbio/anaconda/bin/python
linux-vdso.so.1 => (0x00007ffd11bfc000)
libpython2.7.so.1.0 => /software/local/share/bcbio/anaconda/bin/../lib/libpython2.7.so.1.0 (0x00007f276fa9b000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00000036be600000)
libdl.so.2 => /lib64/libdl.so.2 (0x00000033bd800000)
libutil.so.1 => /lib64/libutil.so.1 (0x00000033bec00000)
libm.so.6 => /lib64/libm.so.6 (0x00000033be000000)
libc.so.6 => /lib64/libc.so.6 (0x00000033bd400000)
/lib64/ld-linux-x86-64.so.2 (0x00000033bd000000)
And looked at the permission of the librarie, which seemed to be correct:
ls -lah /software/local/share/bcbio/anaconda/bin/../lib/libpython2.7.so.1.0
-rwxrwsr-x+ 1 vsc lp_neuro 7.7M Jun 7 2018 /software/local/share/bcbio/anaconda/bin/../lib/libpython2.7.so.1.0
I also tried to export different environment variables:
export LD_LIBRARY_PATH=/software/local/share/bcbio/anaconda/bin/../lib/;
export PYTHONHOME=/software/local/share/bcbio/anaconda/bin/../lib/;
export PYTHONPATH=/software/local/share/bcbio/anaconda/bin/../lib/;
Since it is a conda installation of python, solutions needing root access (which I do not have) are of no uses. E.g. editing /etc/ld.so.conf is no option for me.
Is there a way to fix this issue?

mysql driver for qt database fedora

I understand it's the 100s time someone ask this but I'm still unable to have QMYSQL working.
So I installed qt-mysql but I'm still having the
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
I copied /usr/lib64/qt4/plugins/sqldrivers/libqsqlmysql.so into /usr/lib64/qt5/plugins/sqldrivers/libqsqlmysql.so but no changes ...
I've also added QT += sql into the .pro file.
So what do I have to do ?
P.S. : I'm on Fedora 21 and I'm using QtCreator 3.3.2 based on Qt 5.4.1.
P.P.S : I also checked if the .so had dependencies problem but there's none :
$ ldd libqsqlmysql.so
linux-vdso.so.1 => (0x00007fff665d1000)
libmysqlclient.so.18 => /usr/lib64/mysql/libmysqlclient.so.18 (0x00007fcb07294000)
libQtSql.so.4 => /lib64/libQtSql.so.4 (0x00007fcb07052000)
libQtCore.so.4 => /lib64/libQtCore.so.4 (0x00007fcb06b63000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcb06947000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fcb06638000)
libm.so.6 => /lib64/libm.so.6 (0x00007fcb0632f000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fcb06118000)
libc.so.6 => /lib64/libc.so.6 (0x00007fcb05d5b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fcb05b56000)
libz.so.1 => /lib64/libz.so.1 (0x00007fcb05940000)
libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00007fcb0573e000)
libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007fcb05404000)
librt.so.1 => /lib64/librt.so.1 (0x00007fcb051fc000)
/lib64/ld-linux-x86-64.so.2 (0x00007fcb07aa6000)
You can't just copy the Qt4 MYSQL driver into Qt5. Install it from the same place you installed the rest of Qt5. (Package qt5-qtbase-mysql perhaps: https://apps.fedoraproject.org/packages/qt5-qtbase-mysql ).
You should build mysql driver manually. The only driver that comes with the default installation of Qt is Sqlite driver.
Follow the instructions in http://doc.qt.io/qt-5.4/sql-driver.html#qmysql
Install mySQL connector.
Follow instructions here
libmysql.dll needs to be located somewhere where it can be found by the application. To make this happen, you can list it in your global PATH in Control Panel/System/Advanced System Settings/Environment variables or put libmysql.dll in the same folder as the Qt dlls in yourQtDirectory/bin.

Can CRC mismatch cause error in connection with libnetcdff.so.6?

When I run my Fortran code under Ubuntu 14.04 OS I get the following error:error while loading shared libraries: libnetcdff.so.6: cannot open shared object file: No such file or directory. I saw the ld path with ldd KiD_SC_2D.exe but it seems that libnetcdff is found:
beata#beata-HP-Z420-Workstation:~/Downloads/kid_a_setup/bin$ ldd KiD_SC_2D.exe
linux-vdso.so.1 => (0x00007fffd83a4000)
libnetcdff.so.6 => /home/beata/netcdf/lib/libnetcdff.so.6 (0x00007f3849432000)
libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f3849101000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3848dfa000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3848be4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f384881f000)
libnetcdf.so.7 => /home/beata/netcdf/lib/libnetcdf.so.7 (0x00007f3848533000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f38482f7000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3849694000)
When I had run gdb I got the following warning:
warning: the debug information found in "/lib64/ld-2.19.so" does not match "/lib64/ld-linux-x86-64.so.2" (CRC mismatch)
Is it possible that this warning causes the matter of libnetcdff.so.6? As so how I can fix this CRC mismatch?
Is it possible that this warning causes the matter of libnetcdff.so.6?
No, it's entirely unrelated.
As so how I can fix this CRC mismatch?
The mismatch says that the installed version of libc6 and libc6-dbg packages do not match. Update libc6-dbg to match installed libc6, and the warning should go away.
As for why libnetcdff.so.6 is not found, you are not telling us the whole story. Clearly ldd does find it, and running KiD_SC_2D.exe should as well. To debug this, you may wish to run it like so:
cd ~/Downloads/kid_a_setup/bin
env LD_DEBUG=files,libs ./KiD_SC_2D.exe
That should tell you where the dynamic linker is looking for libnetcdff.

libcudart and local build of gcc link against wrong glibc

I am trying to get CUDA5 to work on a shared cluster.
When I invoke the local gcc to build large applications it works just fine. When I use the CUDA wrapper I get an error saying that it can't find certain parts of glib.
Why is CUDA looking at /lib64/libc.so.6, if I specified the local gcc library directory?
[uid002#n001 cuda5test]$ ldd /home/ex/uid002/cuda/lib64/libcudart.so
/home/ex/uid002/cuda/lib64/libcudart.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/ex/uid002/cuda/lib64/libcudart.so)
linux-vdso.so.1 => (0x00007fff277ff000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f5328da6000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5328b89000)
librt.so.1 => /lib64/librt.so.1 (0x00007f5328981000)
libstdc++.so.6 => /home/ex/uid002/gcc/lib64/libstdc++.so.6 (0x00007f532867d000)
libm.so.6 => /lib64/libm.so.6 (0x00007f53283f8000)
libgcc_s.so.1 => /home/ex/uid002/gcc/lib64/libgcc_s.so.1 (0x00007f53281e3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f5327e67000)
/lib64/ld-linux-x86-64.so.2 (0x000000335ae00000)
And
[uid002#n001 cuda5test]$ echo $LD_LIBRARY_PATH
/home/ex/uid002/cuda/lib64:/home/ex/uid002/gmp/lib:/home/ex/uid002/mpfr/lib:/home/ex/uid002/mpc/lib:/home/ex/uid002/gcc/lib64
I have tried to reinstall the CUDA package, and this was no help.
libcudart.so: /lib64/libc.so.6: version `GLIBC_2.14' not found
This error means that the libcudart.so library was linked on a system with glibc-2.14 or later. You can only use that library if your system (both at link time and at runtime) has glibc version >= 2.14. Your system does not satisfy prerequisite for libcudart.so. You'll have to use older version of libcudart.so, or upgrade your system.
(Be careful: upgrading glibc incorrectly is a sure way to render the system un-bootable.)
Why is CUDA looking at /lib64/libc.so.6, if I specified the local gcc library directory?
Glibc is not part of GCC distribution, and is completely independent. "local gcc library directory" is unlikely to have libc.so in it.