* Cross compilation - Could not find lua libs
@ 2016-06-08 14:30 Jean-Fabien Arnaud
2016-06-09 7:36 ` Klauer, Daniel
2016-06-16 3:05 ` Khem Raj
0 siblings, 2 replies; 3+ messages in thread
From: Jean-Fabien Arnaud @ 2016-06-08 14:30 UTC (permalink / raw)
To: poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1813 bytes --]
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.
$:~/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
[-- Attachment #2: Type: text/html, Size: 6373 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Cross compilation - Could not find lua libs
2016-06-08 14:30 Cross compilation - Could not find lua libs Jean-Fabien Arnaud
@ 2016-06-09 7:36 ` Klauer, Daniel
2016-06-16 3:05 ` Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Klauer, Daniel @ 2016-06-09 7:36 UTC (permalink / raw)
To: Jean-Fabien Arnaud, poky@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
Hello,
in my experience it was also necessary to specify things like CMAKE_FIND_ROOT_PATH, otherwise cmake didn't find libraries in the poky SDK sysroot (also see cmake cross-compiling documentation). Here's what I've been using for cross-compiling with a poky SDK installed to /opt/poky/<version>:
source /opt/poky/<version>/environment-setup-*
cmake <srcdir> \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_VERSION=1 \
-DCMAKE_FIND_ROOT_PATH=/opt/poky/<version>/sysroots/<target> \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
Another important detail is that the poky SDK must include all the *-dev packages needed.
Regards,
Daniel
[-- Attachment #2: Type: text/html, Size: 1894 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Cross compilation - Could not find lua libs
2016-06-08 14:30 Cross compilation - Could not find lua libs Jean-Fabien Arnaud
2016-06-09 7:36 ` Klauer, Daniel
@ 2016-06-16 3:05 ` Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2016-06-16 3:05 UTC (permalink / raw)
To: Jean-Fabien Arnaud; +Cc: poky@yoctoproject.org
On Wed, Jun 8, 2016 at 7:30 AM, Jean-Fabien Arnaud
<jean-fabien.arnaud@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@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-16 3:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 14:30 Cross compilation - Could not find lua libs Jean-Fabien Arnaud
2016-06-09 7:36 ` Klauer, Daniel
2016-06-16 3:05 ` Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.