I'm trying to run the openssl speed test on a LS1043A-RDB with the latest (18.03) LSDK and I get this error:
openssl: symbol lookup error: openssl: undefined symbol: idea_set_encrypt_key
I was getting the same problem on my previous 17.09 version of the LSDK so yesterday I did a fresh install with the latest flexbuild install
Based on the readme.md, I did:
- Step 1: Login Ubuntu 16.04 host machine and download the flexbuild repository
$ cd flexbuild
$ source setup.env
- Step 2: Download prebuilt bootpartition and components tarballs
$ wget http://www.nxp.com/lgfiles/sdk/lsdk1803/bootpartition_arm64_lts_4.9.tgz
$ wget http://www.nxp.com/lgfiles/sdk/lsdk1803/app_components_arm64.tgz
- Step 3: Generate distro userland, untar prebuilt components tarball and merge it into distro userland
$ flex-builder -i mkrfs -a arm64
$ tar xvzf app_components_arm64.tgz -C build/apps
$ tar xvzf arm64-modules-4.9.79.tgz -C build/rfs/rootfs_ubuntu_xenial_arm64/lib/modules
$ tar xvzf linux-lib-firmware.tgz -C build/rfs/rootfs_ubuntu_xenial_arm64/lib
$ flex-builder -i merge-component -a arm64
- Step 4: Install LSDK onto SD/USB/SATA storage drive
$ flex-installer -b bootpartition_arm64_lts_4.9.tgz -r build/rfs/rootfs_ubuntu_xenial_arm64 -m ls1043ardb -d /dev/sdd
On Target:
user@Ubuntu:~$ uname -a
Linux Ubuntu.ls1043ardb 4.9.79 #1 SMP PREEMPT Thu Mar 22 18:52:26 CST 2018 aarch64 aarch64 aarch64 GNU/Linux
user@Ubuntu:~$ which openssl
/usr/local/bin/openssl
user@Ubuntu:~$ readelf -d /usr/local/bin/openssl | grep 'NEEDED'
0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.0.0]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.0.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [ld-linux-aarch64.so.1]
user@Ubuntu:~$ ldconfig -p |grep -i libssl.so.1.0.0
libssl.so.1.0.0 (libc6,AArch64) => /lib/aarch64-linux-gnu/libssl.so.1.0.0
user@Ubuntu:~$ ldconfig -p |grep -i libcrypto.so.1.0.0
libcrypto.so.1.0.0 (libc6,AArch64) => /lib/aarch64-linux-gnu/libcrypto.so.1.0.0
user@Ubuntu:~$ ldconfig -p |grep -i libc.so.6
libc.so.6 (libc6,AArch64, OS ABI: Linux 3.7.0) => /lib/aarch64-linux-gnu/libc.so.6
user@Ubuntu:~$ ldconfig -p |grep -i ld-linux-aarch64.so.1
ld-linux-aarch64.so.1 (libc6,AArch64) => /lib/aarch64-linux-gnu/ld-linux-aarch64.so.1
ld-linux-aarch64.so.1 (libc6,AArch64) => /lib/ld-linux-aarch64.so.1
I also checked ldd:
user@Ubuntu:~$ ldd /usr/local/bin/openssl
linux-vdso.so.1 => (0x0000ffff966a5000)
libssl.so.1.0.0 => /lib/aarch64-linux-gnu/libssl.so.1.0.0 (0x0000ffff96610000)
libcrypto.so.1.0.0 => /lib/aarch64-linux-gnu/libcrypto.so.1.0.0 (0x0000ffff9646c000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff96325000)
/lib/ld-linux-aarch64.so.1 (0x0000ffff9667a000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff96311000)
Anyone have a clue ?
Thanks
Solved! Go to Solution.
Hello frank_o,
On your target board, please check whether libcrypto.so.1.0.0 exists in the path /usr/local/lib/libcrypto.so.1.0.0.
root@Ubuntu:~# find / -name libcrypto.so.1.0.0
/usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.0
/usr/local/lib/libcrypto.so.1.0.0
If /usr/local/lib/libcrypto.so.1.0.0 exists on your target board, please put /usr/local/ lib in a line before /usr/lib inside /etc/ld.so.conf and then update the linker cache:
File: /etc/ld.so.conf
...
/usr/local/lib
...
/usr/lib
...
$ sudo ldconfig
$ ldd /usr/local/bin/openssl
If /usr/local/lib/libcrypto.so.1.0.0 doesn't exist, please the following procedure to rebuild and install openssl and cryptodev.
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/openssl
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux
$ cd cryptodev-linux
$ make
$ sudo make install
$ sudo modprobe cryptodev
$ make check
Build openssl with cryptodev support:
$ cd openssl
$ ./Configure -DHAVE_CRYPTODEV --prefix=/usr/local/ --openssldir=/usr/local/openssl linux-aarch64 shared
$ make
$ sudo make install
After installation verify that the binary is linking with the correct share library from /usr/local/lib:
$ ldd /usr/local/bin/openssl
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello frank_o,
On your target board, please check whether libcrypto.so.1.0.0 exists in the path /usr/local/lib/libcrypto.so.1.0.0.
root@Ubuntu:~# find / -name libcrypto.so.1.0.0
/usr/lib/aarch64-linux-gnu/libcrypto.so.1.0.0
/usr/local/lib/libcrypto.so.1.0.0
If /usr/local/lib/libcrypto.so.1.0.0 exists on your target board, please put /usr/local/ lib in a line before /usr/lib inside /etc/ld.so.conf and then update the linker cache:
File: /etc/ld.so.conf
...
/usr/local/lib
...
/usr/lib
...
$ sudo ldconfig
$ ldd /usr/local/bin/openssl
If /usr/local/lib/libcrypto.so.1.0.0 doesn't exist, please the following procedure to rebuild and install openssl and cryptodev.
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/openssl
$ git clone https://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux
$ cd cryptodev-linux
$ make
$ sudo make install
$ sudo modprobe cryptodev
$ make check
Build openssl with cryptodev support:
$ cd openssl
$ ./Configure -DHAVE_CRYPTODEV --prefix=/usr/local/ --openssldir=/usr/local/openssl linux-aarch64 shared
$ make
$ sudo make install
After installation verify that the binary is linking with the correct share library from /usr/local/lib:
$ ldd /usr/local/bin/openssl
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Yiping Wang,
your solution worked perfectly. libcrypto.so.1.0.0 was available in /usr/local/lib/ and adding this line on top of file /etc/ld.so.conf solved my problem.
Thank you very much.
Frank