How to generate libbeecrypt.so and add it to the cross compile toolchain ?

Host OS: Ubuntu 16.04 LTS x86_64
Target: ConnectCore i.MX6UL Starter
Target OS: Embedded Linux
Build Environment: DEY-2.2 | cortexa7hf-neon-dey-linux-gnueabi dey-2.2-r3 toolchain
Issue: Can’t find libbeecrypt.so shared library

I installed the pre-compiled toolchain following this link:
https://www.digi.com/resources/documentation/digidocs/90001548/#task/eclipse_ide/new/1_install_a_pre_compiled_toolchain.htm%3FTocPath%3DDigi%2520Embedded%2520Yocto|Application%2520development|Develop%2520using%2520command%2520line|_____1

Then exported the toolchain environment by:

. /opt/dey/2.2-r3/environment-setup-cortexa7hf-neon-dey-linux-gnueabi

When trying to cross compile my application, the linker real-ld says that the -lbeecrypt library is not found.
-lbeecrypt is included in my LDFLAGS Makefile.

On the environment-setup-cortexa7hf-neon-dey-linux-gnueabi, the linker is configured as the following:

export SDKTARGETSYSROOT=/opt/dey/2.2-r3/sysroots/cortexa7hf-neon-dey-linux-gnueabi

export LD=“arm-dey-linux-gnueabi-ld --sysroot=$SDKTARGETSYSROOT”

I tried to search for libbeerypt.so on the cross compile toolchain installed under:
/opt/dey/2.2-r3
It’s neither under sysroots/cortexa7hf-neon-dey-linux-gnueabi/lib directory nor sysroots/cortexa7hf-neon-dey-linux-gnueabi/usr/lib directory.
Where (lib and usr/lib) I can find all other libraries that I need to compile my application, included in my LDFLAGS Makefile.

But I can find the beecrypt sources under:
sysroots/cortexa7hf-neon-dey-linux-gnueabi/usr/src/debug/rpm/5.4.16-r0/rpm-5.4.15/beecrypt

My question is how to build these beecrypt sources to generate a libbeecrypt.so shared library included in lib or usr/lib directories ?
This way the linker real-ld can match with -lbeecrypt library.

Thanks in advance for your help.

Regards.

YC

try to add it to your workspace project for your platform, bitbake it, then do “bitbake -c populate_sdk dey-image-qt”
This should generate both target images and sdk that include the library. Once its there you can find where it goes if you still want to.

1 Like

Hi Leonid,

Thanks for your answer.

I did it but a bit differently.

On my dey-image-tiny, I added the beecrypt package to the IMAGE_INSTALL, then bitbake this image.

After flashing the target with this new image, I found under /usr/lib directory these two shared libraries:
libbeecrypt.so.7 & libbeecrypt.so.7.0.0 .

I took the libbeecrypt.so.7, renamed it to libbeecrypt.so and put it in the cross compile toolchain under:
/opt/dey/2.2-r3/sysroots/cortexa7hf-neon-dey-linux-gnueabi/usr/lib/

It worked, because I have no more the error telling that the linker real-ld couldn’t find -lbeecrypt .

Regards.

YC