Use libLexActivator with arm-buildroot-linux-musleabihf

Hi Adnan,

Still the same link issues when linking the static lib, here is an excerpt of them:
LexBotan.cpp:(.text+0x127c): undefined reference to std::__throw_bad_array_new_length()' LexBotan.cpp:(.text+0x11f64): undefined reference to __select_time64’
LexBotan.cpp:(.text+0x18e88): undefined reference to __time64' LexBotan.cpp:(.text+0x18ea4): undefined reference to __gmtime64_r’
LexBotan.cpp:(.text+0x18f80): undefined reference to __clock_gettime64' LexBotan.cpp:(.text+0x235e8): undefined reference to __getrusage_time64’
LexBotan.cpp:(.text+0x236a4): undefined reference to __stat_time64' LexAbstraction.cpp:(.text+0x738): undefined reference to __stat_time64’
timing.c:(.text+0x30): undefined reference to `__gettimeofday_time64’

Sorry to insist again, but can the LexActivator lib be built with a customer toolchain? I’m guessing that some NRE will be needed for moving forward.

Pat

Hi Pat,

We have build the LexActivator library using a compiler older than your toolchain v9.3. It should work now.

We will officially include this in our upcoming release.

Hi Adnan,
Yes the link stage with the static lib does work now, thank you very much.
We have no way to test it, so we will see how it works on the customer side. I will let you know.
Pat

Hi Pat,

You can easily test this inside a docker image:

docker run -it -v $PWD:$PWD -w $PWD arm32v7/alpine:3.11

Ensure your binary is in the directory where you run this command and then execute your binary inside the container:

./my-app

Before running the above docker command you have to setup qemu-static so that your x86 machine supports running arm binaries. For that just execute the following command:

docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

For details refer to the following:

Hi Adnan,
Thanks for sharing this.
I had done some similar tests. But it doesn’t work, even the simplest program (xx.cpp) :
#include
int main()
{
std::cout << “Hello c++\n”;
}
If built with the customer toolchain, it doesn’t run in the docker image:
Error loading shared library libstdc++.so.6: No such file or directory (needed by ./xx.out)
Error loading shared library libgcc_s.so.1: No such file or directory (needed by ./xx.out)
Error relocating ./xx.out: _ZNSt8ios_base4InitC1Ev: symbol not found
Error relocating ./xx.out: _ZNSt8ios_base4InitD1Ev: symbol not found
Error relocating ./xx.out: _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc: symbol not found
Error relocating ./xx.out: _ZSt4cout: symbol not found

The Linux system and toolchain built by the customer seem specific. So let see how it works on the device of the customer.
Pat

Try running the app in the following Docker image:

docker run -it -v $PWD:$PWD -w $PWD cryptlex/gcc-9.3-musl-armhf:1

Hi Adnan,
Sorry for the delay, I was out the office last week.
Thanks for sharing this docker image: I have been able to test my build successfully, that’s great, thank you.
Pat