| Summary: | meson.cross file missing from SDKs installed without sudo | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Toni Lammi <toni.lammi> |
| Component: | devtools / tool chain | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, randy.macleod, yoann.congal |
| Version: | unspecified | ||
| Target Milestone: | 5.1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Toni Lammi
2024-09-04 07:12:13 UTC
Toni, Thanks for the fairly detailed report. It's good to see people listing the branch used! ;-) It seems odd and certainly there shouldn't be anything in the SDK that changes if run under sudo. If there is, it's a regression. Can you document what your host distro is, in case that's something unusual or important. I know that Fedora 40 has some interesting new security policies for example. Qi, Can you please test / debug this issue? (In reply to Randy MacLeod from comment #1) > Toni, > > Thanks for the fairly detailed report. It's good to see people listing the > branch used! ;-) > > It seems odd and certainly there shouldn't be anything in the SDK that > changes if run under sudo. If there is, it's a regression. > > Can you document what your host distro is, in case that's something unusual > or important. I know that Fedora 40 has some interesting new security > policies for example. > > Qi, > > Can you please test / debug this issue? I can do it in October if there's nobody else looking into this issue. > Can you document what your host distro is, in case that's something
> unusual or important. I know that Fedora 40 has some interesting
> new security policies for example.
The host distro is Manjaro Linux.
I reran the installer within a Ubuntu 22.04 container and the cross file is where it should.
I guess this is not an issue then since Manjaro is not a supported distro? Though I'm wondering if this will bite the supported distros later.
Thanks Qi. Toni, I've lowered the importance of the defect to medium since it seems to only be happening on an unsupported distro. We'll see what Qi finds out when he works on this in a few weeks. I'm also concerned that we'll eventually encounter this problem on a future supported distro so investigating and fixing the issue and adding a test case that compares set of files installed with and without sudo seems like a good idea to me. (In reply to Toni Lammi from comment #3) > > Can you document what your host distro is, in case that's something > > unusual or important. I know that Fedora 40 has some interesting > > new security policies for example. > > The host distro is Manjaro Linux. > > I reran the installer within a Ubuntu 22.04 container and the cross file is > where it should. > > I guess this is not an issue then since Manjaro is not a supported distro? > Though I'm wondering if this will bite the supported distros later. Hi Toni, If you still have the environment, you can check if meson-setup.py is under post-relocate-setup.d/ directory. The cross files should be setup by this script. Maybe you can run this script manually to see if things work. Regards, Qi > If you still have the environment, you can check if meson-setup.py is under > post-relocate-setup.d/ directory. The cross files should be setup by this > script. Maybe you can run this script manually to see if things work. That fixes the issue. I also found the real cause for this when testing this. The reason for missing meson.cross is that my user account has LD_LIBRARY_PATH set. This results in print ``` ================================================= You are about to install the SDK to "/home/user/sdk-test". Proceed [Y/n]? Y Extracting SDK.............................................................................................done Setting it up...done Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH' but please check why this was set in the first place and that it's safe to unset. The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set. For more references see: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80 http://xahlee.info/UnixResource_dir/_/ldpath.html /home/user/sdk-test/post-relocate-setup.sh: Failed to source /home/user/sdk-test/environment-setup-armv8a-<distro> with status 1 SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/user/sdk-test/environment-setup-armv8a-<distro> ``` I wonder if the error here could be a bit clearer? At least the first time I missed the whole message. Also the script exits with 0. (In reply to Toni Lammi from comment #6) > > If you still have the environment, you can check if meson-setup.py is under > > post-relocate-setup.d/ directory. The cross files should be setup by this > > script. Maybe you can run this script manually to see if things work. > > That fixes the issue. I also found the real cause for this when testing this. > > The reason for missing meson.cross is that my user account has > LD_LIBRARY_PATH set. This results in print > > ``` > ================================================= > You are about to install the SDK to "/home/user/sdk-test". Proceed [Y/n]? Y > Extracting > SDK.......................................................................... > ...................done > Setting it up...done > Your environment is misconfigured, you probably need to 'unset > LD_LIBRARY_PATH' > but please check why this was set in the first place and that it's safe to > unset. > The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set. > For more references see: > http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80 > http://xahlee.info/UnixResource_dir/_/ldpath.html > /home/user/sdk-test/post-relocate-setup.sh: Failed to source > /home/user/sdk-test/environment-setup-armv8a-<distro> with status 1 > SDK has been successfully set up and is ready to be used. > Each time you wish to use the SDK in a new shell session, you need to source > the environment setup script e.g. > $ . /home/user/sdk-test/environment-setup-armv8a-<distro> > ``` > > I wonder if the error here could be a bit clearer? At least the first time I > missed the whole message. Also the script exits with 0. Got it. Thanks for the detailed info. I've sent out a patch to oe-core. https://lists.openembedded.org/g/openembedded-core/message/205342 Merged: commit a24875260426249ead98b4ea3a1566b45f929905 Author: Chen Qi <Qi.Chen@windriver.com> Date: Wed Oct 9 01:56:47 2024 -0700 toolchain-shar-extract.sh: exit when post-relocate-setup.sh fails When LD_LIBRARY_PATH is set, post-relocate-setup.sh will fail and exit properly. But such failure is ignored and the SDK installation will continue and tell user that things succeed. This is misleading. So exit immediately if post-relocate-setup.sh fails. Fixes [Yocto #15586] (From OE-Core rev: c8e2dcc1f71aa33cc6e56dfdebebbe7ef010c944) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Issue resolved. |