[poky] Cross compilation - Could not find lua libs

Khem Raj raj.khem at gmail.com
Wed Jun 15 20:05:20 PDT 2016


On Wed, Jun 8, 2016 at 7:30 AM, Jean-Fabien Arnaud
<jean-fabien.arnaud at src-solution.com> wrote:
> Hello
>
> I would like to compile https://github.com/sbernard31/lualwm2m with a poky
> toolchain, but it can not find lua library and i do not know why.
>
> Lua 5.1 is installed, and I have no problem to compile with the « default »
> gcc.

lua should also be added to your SDK and Lua is in another layer in
meta-openembedded. So add that layer to your project
as well as to one of images and then do -cpopulate_sdk <image> this
should hopefully add needed lua dev libs and headers
to your SDK.

>
>
>
> $:~/build_arm$ cmake
> -DCMAKE_C_COMPILER=/opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
> ../lualwm2m/
>
> -- The C compiler identification is GNU 4.8.2
>
> -- Check for working C compiler:
> /opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
>
> -- Check for working C compiler:
> /opt/poky/1.6.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
> -- works
>
> -- Detecting C compiler ABI info
>
> -- Detecting C compiler ABI info - done
>
> CMake Error at
> /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
> (message):
>
>   Could NOT find Lua51 (missing: LUA_LIBRARIES) (found version "5.1.5")
>
> Call Stack (most recent call first):
>
>   /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
> (_FPHSA_FAILURE_MESSAGE)
>
>   /usr/share/cmake-2.8/Modules/FindLua51.cmake:76
> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>
>   CMakeLists.txt:3 (find_package)
>
>
>
> $:~/build_arm$ cmake ../lualwm2m/
>
> -- The C compiler identification is GNU 4.8.4
>
> -- Check for working C compiler: /usr/bin/cc
>
> -- Check for working C compiler: /usr/bin/cc -- works
>
> -- Detecting C compiler ABI info
>
> -- Detecting C compiler ABI info - done
>
> -- Found Lua51:
> /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so
> (found version "5.1.5")
>
> -- Configuring done
>
> -- Generating done
>
> -- Build files have been written to: /home/jf/build_arm
>
>
>
> I hope i am publishing on the good ML, if anybody can tell me what am I
> doing wrong ?
>
>
>
> Thank you
>
> Jean Fabien
>
>
> --
> _______________________________________________
> poky mailing list
> poky at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>


More information about the poky mailing list