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

**URL:** <https://forums.digi.com/t/how-to-generate-libbeecrypt-so-and-add-it-to-the-cross-compile-toolchain/19292>\
**Category:** Linux\
**Tags:** cross-compile, imx6ul\
**Created:** [March 12, 2018, 10:03am UTC](https://forums.digi.com/t/how-to-generate-libbeecrypt-so-and-add-it-to-the-cross-compile-toolchain/19292 "2018-03-12T10:03:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![YounesC](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@YounesC](https://forums.digi.com/u/YounesC)\
**Post date:** [March 12, 2018, 10:03am UTC](https://forums.digi.com/t/how-to-generate-libbeecrypt-so-and-add-it-to-the-cross-compile-toolchain/19292/1 "2018-03-12T10:03:56Z")

</div>

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:

> **[ConnectCore 6UL SBC Express | DEY-2.2](https://docs.digi.com/resources/documentation/digidocs/90001548/)**

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

---

<div class="post-metadata">

**Author:** ![LeonidM](https://avatars.discourse-cdn.com/v4/letter/l/d26b3c/32.png) [@LeonidM](https://forums.digi.com/u/LeonidM)\
**Post date:** [March 12, 2018, 5:57pm UTC](https://forums.digi.com/t/how-to-generate-libbeecrypt-so-and-add-it-to-the-cross-compile-toolchain/19292/2 "2018-03-12T17:57:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![YounesC](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@YounesC](https://forums.digi.com/u/YounesC)\
**Post date:** [March 13, 2018, 7:54am UTC](https://forums.digi.com/t/how-to-generate-libbeecrypt-so-and-add-it-to-the-cross-compile-toolchain/19292/3 "2018-03-13T07:54:14Z")

</div>

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
