Makefile environment variables do not work on some host
A message that is not in the archive (sent off-list or not yet received): [email protected]
I just tried with other versions of Ubuntu: with 18.04.5 and 20.10, they have the same issue as 20.04.2.
With 21.04, it can't compile pseudo_git.bb, I believe it's because of the new version of GCC.
How can it work perfectly with Debian but not Ubuntu?
Quoted 44 lines · Aymeric Dumaz via lists.yoctoproject.org
Hello,
I have created a recipe to call multiple makefile and set a variable if it's not defined inside them, meaning I set it before "
oe_runmake". It works as expected on a Debian testing, but with a Ubuntu base chroot it does not.I have written a simple recipe and the steps I used to configure the Ubuntu chroot; on Debian I can see "var -bar-" inside log.do_compile, but on Ubuntu it will only be "var --".
I'm not sure where the bug is located; I'm using Dunfell but I always thought the host running Yocto was not relevant during the compilation.
Thanks.### Ubuntu chroot: download the image [0], extract it and start the chroot, update it [1], add the en_US.UTF-8 locale [2], install Yocto dependencies [3], then add an user.
### testvar.bb
SRC_URI= "file://Makefile"
LICENSE = "CLOSED"
S = "${WORKDIR}"
do_compile(){
FOO=baroe_runmake
}###
Makefile
all:@echo "var -$(FOO)-"clean:
[0] http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.2-base-amd64.tar.gz
[1] apt update && apt upgrade
[2] apt install locales && dpkg-reconfigure locales - select "159" then "3"
[3] apt install python3 python3-distutils binutils chrpath cpio cpp
diffstat g++ gawk gcc git make patch wget xxd