Build libimxvpuapi failed with can't find hantro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Build libimxvpuapi failed with can't find hantro

2,466 Views
bolun_liu
Contributor I

Build libimxvpuapi failed with can't find hantro

Hi community:

    i met building failure against libimxvpuapi.

    My build command is :

    ./waf configure --sysroot-path=/ --imx-platform=imx8mm

    And the output are:

Setting top to : /home/liubolun/libimxvpuapi-master
Setting out to : /home/liubolun/libimxvpuapi-master/build
Checking for 'gcc' (C compiler) : /usr/bin/gcc
Checking for compiler switch -Wextra : yes
Checking for compiler switch -Wall : yes
Checking for compiler switch -pedantic : yes
Checking for compiler switch -fPIC : yes
Checking for compiler switch -DPIC : yes
Checking for compiler switch -O2 : yes
Checking for compiler switch -std=gnu99 : yes
Now checking the combination of CFLAGS -Wextra -Wall -pedantic -fPIC -DPIC -O2 -std=gnu99
Checking if this combination works : yes
Checking for compiler switch -std=c99 : yes
Now checking the combination of CFLAGS -Wextra -Wall -pedantic -fPIC -DPIC -O2 -std=c99
Checking if this combination works : yes
Checking for program 'pkg-config' : /usr/bin/pkg-config
Checking for 'libimxdmabuffer >= 0.9.0' : yes
Using "/" as sysroot path
Checking for library hantro : not found
The configuration failed

   From the config.log:

   

----------------------------------------
Checking for library hantro
==>

int main(int argc, char **argv) {
(void)argc; (void)argv;
return 0;
}

<==
[1/2] Compiling ^[[32mbuild/.conf_check_b5a36a83ff5f00b0672e56e461c10790/test.c^[[0m

['/usr/bin/gcc', '-Wextra', '-Wall', '-pedantic', '-fPIC', '-DPIC', '-O2', '-pthread', '../test.c', '-c', '-o/home/liubolun/libimxvpuapi-master/build/.conf_check_b5a36a83ff5f00b0672e56e461c10790/testbuild/test.c.1.o']
[2/2] Linking ^[[33mbuild/.conf_check_b5a36a83ff5f00b0672e56e461c10790/testbuild/testprog^[[0m

['/usr/bin/gcc', '-pthread', 'test.c.1.o', '-o/home/liubolun/libimxvpuapi-master/build/.conf_check_b5a36a83ff5f00b0672e56e461c10790/testbuild/testprog', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-lhantro']
err: /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libhantro.so when searching for -lhantro
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libhantro.so when searching for -lhantro
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/5/../../../libhantro.so when searching for -lhantro
/usr/bin/ld: skipping incompatible //usr/lib/libhantro.so when searching for -lhantro
/usr/bin/ld: cannot find -lhantro

is there any missing or misconfiguration on my Linux host Ubuntu 16.04?

  thank you in advanced.

BRs.

0 Kudos
Reply
5 Replies

2,344 Views
jimmychan
NXP TechSupport
NXP TechSupport

Please follow the Yocto user's guide to build the bsp.

0 Kudos
Reply

2,344 Views
bolun_liu
Contributor I

hello jimmychan, thank you for you comments.

The fact is that i build yocto by myself.

The libhantro.so that i built out are all  ARM aarch64.

The other question is that is there any source code about libhantro?

thank you.

0 Kudos
Reply

2,344 Views
jimmychan
NXP TechSupport
NXP TechSupport

Yes, the BSP is used to build for the i.MX processor which is ARM cores inside.

0 Kudos
Reply

2,344 Views
bolun_liu
Contributor I

Seemed i find the root cause.

The libhantro.so that is required by libimxvpapi is ARM aarch64, version. But i built libimxvpuapi on Ubuntu 16.04 which request X86 version of this lib.

So is there any method to get the X86 version of this lib?

Or is there anyone else building libimxvpapi on Ubuntu 16.04?

thank you.

0 Kudos
Reply

2,344 Views
bolun_liu
Contributor I

Add more information:

1. I tried to build libimxvpuapi on my Linux Host--Linux liubolun-OptiPlex-7040 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux;

2. the libhantro.so is derived from L4.14.98_2.0.0_ga_images_MX8MMEVK/usr/lib which is download from NXP web;

3. the result of file libhantro.so is:

/usr/lib/libhantro.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=663e023f6f0d5d4eed7e66e214e160b35c59fe97, stripped

4. I copy the libhantro.so and libhantro_h1.so to /usr/lib/ and copy hantro_enc and hantro_dec folder to /usr/include/

Then i run the waf configure command and met the configure failed(ld error)

Any suggestions again this issue?

thank you.

0 Kudos
Reply