There is a problem with cmake-native provided cmake, when building canopenterm from meta-oe layer, it is hanging in do_configure in cmake call forever. There is no change in canopenterm recipe and it hangs in same way if the recipe is upgraded to 1.14 as well. so it seems something has crept into cmake or maybe other dependencies which is causing this. It is always reproducible. bitbake canopenterm after adding meta-oe to bblayers. here is cmake invocation cmdline cmake -G Ninja -DCMAKE_MAKE_PROGRAM=ninja /mnt/b/yoe/master/build/tmp/work/armv8a-yoe-linux/canopenterm/1.0.14/sources/canopenterm-1.0.14 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_INSTALL_BINDIR:PATH=bin -DCMAKE_INSTALL_SBINDIR:PATH=sbin -DCMAKE_INSTALL_LIBEXECDIR:PATH=libexec -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=../com -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=/var -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_INCLUDEDIR:PATH=include -DCMAKE_INSTALL_DATAROOTDIR:PATH=share -DPYTHON_EXECUTABLE:PATH=/usr/bin/python3 -DPython_EXECUTABLE:PATH=/usr/bin/python3 -DPython3_EXECUTABLE:PATH=/usr/bin/python3 -DLIB_SUFFIX= -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/mnt/b/yoe/master/build/tmp/work/armv8a-yoe-linux/canopenterm/1.0.14/toolchain.cmake -DCMAKE_NO_SYSTEM_FROM_IMPORTED=1 -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON -DBUILD_YOCTO=ON -Wno-dev
Looks like cmake is infinitely looping looking for lua. You should file a bug upstream.
Yes it's infinitely looping doing a find for LUA_INCLUDE_DIR, finds /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/recipe-sysroot/usr/include/ which does in fact contain lua.h but then adds it to the ignore list and tries again.
So cmake 4.3 contains a fix for the lua detection breaking with lua 5.5 but this then make canopenterm fail to compile.
What are the errors ? I have an upgrade slotted in master-next for canopenterm to 1.0.14 in master-next maybe that helps ? ofcourse it has a patch to workaround the cmake issue but that can be ignored.
| In file included from /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/recipe-sysroot/usr/include/lua.h:28, | from /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/sources/canopenterm-1.0.13/src/core/core.h:13, | from /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/sources/canopenterm-1.0.13/src/api/pyt hon_sdo.c:10: | /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/recipe-sysroot/usr/include/luaconf.h:91:2: error: #error "POSIX is not compatible with C89" | 91 | #error "POSIX is not compatible with C89" | | ^~~~~
We suspect that this is an issue with the canopenterm code. WE have recently updated cmake so re-open this issue if there's evidence that cmake really is at fault.
(In reply to Ross Burton from comment #5) > | In file included from > /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/recipe- > sysroot/usr/include/lua.h:28, > | from > /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/sources/ > canopenterm-1.0.13/src/core/core.h:13, > | from > /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/sources/ > canopenterm-1.0.13/src/api/pyt > hon_sdo.c:10: > | > /work/ross/build/tmp/work/cortexa57-poky-linux/canopenterm/1.0.13/recipe- > sysroot/usr/include/luaconf.h:91:2: error: #error "POSIX is not compatible > with C89" > | 91 | #error "POSIX is not compatible with C89" > | | ^~~~~ this is solvable, I think C89 pinning needs to be dropped for it to work with latest lua, I have sent a patch for it.
(In reply to Randy MacLeod from comment #6) > We suspect that this is an issue with the canopenterm code. > WE have recently updated cmake so re-open this issue if there's evidence > that cmake really is at fault. To set the resolution a bit clear so its really not INVALID but This was a regression in cmake 4.2.3 which got fixed in 4.3.0