Oh I dont know. This is getting to be a bit annoying. I had already included the inherit cmake line but now it seems maybe that you dont need to put any cmake commands in... not 100% sure, no one seems to explain this, I am not convinced. However I want some extra flags and I have read that you should be able to: TARGET_CFLAGS += "-DBUILD_PYTHON_BINDINGS=ON -DBUILD_SHARED=ON -DBUILD_TOOLS=ON"
but building that gives me + cd /home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/build + do_configure + cd /home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/git + TARGET_CFLAGS:=-DBUILD_PYTHON_BINDINGS=ON -DBUILD_SHARED=ON -DBUILD_TOOLS=ON /home/dave/Documents/Kymati/yocto/build/tmp/work/cortexa53-crypto-phytec-linux/libkymati/1.0-r0/temp/run.do_configure.991537: 159: TARGET_CFLAGS:=-DBUILD_PYTHON_BINDINGS=ON -DBUILD_SHARED=ON -DBUILD_TOOLS=ON: not found Is there a good, really works, actually sets extra flags, really shows and explains with comments and everything example I can look at? This bitbake is clearly clever, so is cmake, but in honesty I really gave up trying to understand any of it and just want it to work, writing the code is one thing but these build systems are a fight all of their own that takes longer than the code to solve the universe ________________________________ From: Mikko Rapeli <mikko.rap...@linaro.org> Sent: 17 October 2023 07:49 To: Dave Hitchman <dave.hitch...@kymati.com> Cc: yocto@lists.yoctoproject.org <yocto@lists.yoctoproject.org> Subject: Re: [yocto] Using cmake... how? Hi, On Mon, Oct 16, 2023 at 03:27:01PM +0000, Dave Hitchman wrote: > So my current recipe for the project works, including building various C, C++ > files > I wanted to now add a library of someone elses creation. > On my machine this library builds using the tools installed so the code is ok > > I added a recipe to my yocto build and it attempts to do the cmake. > > Unfortunately whatever I have tried over 2 days cmake insists: > > 1. On using the from my machine NOT the cross compiling tool set the rest > of the yocto build uses. > | -- The CXX compiler identification is GNU 9.4.0 > | -- The C compiler identification is GNU 9.4.0 > 2. > Getting upset about the flags passed in: > | g++: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead > | cc1plus: error: bad value (‘armv8-a+crc+crypto’) for ‘-march=’ switch > I cant even find where these flags are actually set, where I found them and > thought they were set I altered them to be FRED and nothing changed in the > errors at all. > > Any idea? Surely it should be pretty easy? "inherit cmake" in the recipe and then fix the CMake scripts to use variables from the toolchain file and only append to them. Same problems in all build tools. CMake adds several abstractions on top though so finding out the details may be tricky. See the toolchain.cmake file in recipe build directory. If this is not followed wrong compiler can be used, with wrong flags, using wrong binary, module and header file search paths... Cheers, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61367): https://lists.yoctoproject.org/g/yocto/message/61367 Mute This Topic: https://lists.yoctoproject.org/mt/101998042/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-