Hi, I was trying to install the buildtools by using the scripts/install-buildtools script, however the call fails. The issue seems a bit weird, as IMHO the script would always fail, hence I am not sure whether it's really an issue or I am misusing the script. Anyway, I am using the script from the poky repository, commit 17ce3395.
The command executed: > > ./scripts/install-buildtools --debug --without-extended-buildtools > --directory ./build-tools --base-url > https://downloads.yoctoproject.org/releases/yocto --release yocto-4.0.14 > --installer-version 4.0.14 The command fails and its output is given in [1]. Now, I dug a bit deeper and found two potential issues (if they are even issues, I am not sure anymore). 1. First one is in here ( https://git.openembedded.org/openembedded-core/tree/scripts/install-buildtools#n304 ). Basically, while environment variables are read from build-tools/environment-setup-x86_64-pokysdk-linux (see [2] for its content), some of them are read with double quotes (e.g. PATH ) and as such written in os.environ ( here ( https://git.openembedded.org/openembedded-core/tree/scripts/install-buildtools#n306 ) ), which makes them not correctly used later on. Some come without the double quotes and are fine to be used (e.g., PKG_CONFIG_LIBDIR ). 2. Another issue I found is related to this line ( https://git.openembedded.org/openembedded-core/tree/scripts/install-buildtools#n334 ). If the command is called with --directory , as in my case, the function starts_with will always fail because which_tool which is an absolute path will never start with install_dir which is a relative path. The only case where this is not an issue is when --directory is either an absolute path or if omitted, since INSTALL_DIR is used in that case and its a full path already. Now my question is am I misunderstanding something or am I misusing the install-buildtools script somehow? If this is really an issue I'd be more than happy to provide a patch. Aleksandar [1] > > anikolic@OG05N004CC:~/git/poky$ ./scripts/install-buildtools --debug > --without-extended-buildtools --directory ./build-tools --base-url > https://downloads.yoctoproject.org/releases/yocto --release yocto-4.0.14 > --installer-version 4.0.14 > DEBUG: milestone regex: None > INFO: Fetching buildtools installer > INFO: Fetching buildtools installer checksum > DEBUG: checksum regex match: <re.Match object; span=(0, 113), > match='62e811c2f1a91f6d2d5e07ee3031af9bff58c15f515ff5968> > DEBUG: checksum: > 62e811c2f1a91f6d2d5e07ee3031af9bff58c15f515ff59688bf39f1f8a4341d > DEBUG: path: None > DEBUG: filename: x86_64-buildtools-nativesdk-standalone-4.0.14.sh > INFO: Checksum success > INFO: Making installer executable > DEBUG: os.stat_result(st_mode=33252, st_ino=410381, st_dev=2080, > st_nlink=1, st_uid=1000, st_gid=1000, st_size=29509071, > st_atime=1703001641, st_mtime=1699048064, st_ctime=1703001641) > Build tools installer version 4.0.14 > ==================================== > You are about to install the SDK to "/home/anikolic/git/poky/build-tools". > Proceed [Y/n]? Y > Extracting SDK...........done > Setting it up...done > 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/anikolic/git/poky/build-tools/environment-setup-x86_64-pokysdk-linux > > INFO: Setting up the environment > DEBUG: export regex: <re.Match object; span=(0, 309), match='export > PATH="/home/anikolic/git/poky/build-tools/> > DEBUG: env_var: PATH > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/usr/bin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/usr/sbin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/bin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/sbin:$PATH" > > DEBUG: export regex: <re.Match object; span=(0, 96), match='export > OECORE_NATIVE_SYSROOT="/home/anikolic/git/> > DEBUG: env_var: OECORE_NATIVE_SYSROOT > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux" > DEBUG: export regex: <re.Match object; span=(0, 123), match='export > GIT_SSL_CAINFO="/home/anikolic/git/poky/bu> > DEBUG: env_var: GIT_SSL_CAINFO > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > DEBUG: export regex: <re.Match object; span=(0, 122), match='export > SSL_CERT_FILE="/home/anikolic/git/poky/bui> > DEBUG: env_var: SSL_CERT_FILE > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > DEBUG: export regex: <re.Match object; span=(0, 127), match='export > REQUESTS_CA_BUNDLE="/home/anikolic/git/pok> > DEBUG: env_var: REQUESTS_CA_BUNDLE > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > DEBUG: export regex: <re.Match object; span=(0, 123), match='export > CURL_CA_BUNDLE="/home/anikolic/git/poky/bu> > DEBUG: env_var: CURL_CA_BUNDLE > DEBUG: env_val: > "/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > DEBUG: export regex: <re.Match object; span=(0, 80), > match='HOST_PKG_PATH=$(command -p pkg-config --variable=> > DEBUG: env_var: HOST_PKG_PATH > DEBUG: env_val: $(command -p pkg-config --variable=pc_path pkg-config > 2>/dev/null) > DEBUG: export regex: <re.Match object; span=(0, 254), match='export > PKG_CONFIG_LIBDIR=/home/anikolic/git/poky/> > DEBUG: env_var: PKG_CONFIG_LIBDIR > DEBUG: env_val: > /home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux//usr/lib/pkgconfig:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux//usr/share/pkgconfig:${HOST_PKG_PATH:-/usr/lib/pkgconfig:/usr/share/pkgconfig} > > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > DEBUG: export regex: None > INFO: Testing installation > DEBUG: extended regex: None > DEBUG: install_dir: ./build-tools > DEBUG: cmd: ['/usr/bin/which', 'tar'] > DEBUG: tool: tar > DEBUG: proc.args: ['/usr/bin/which', 'tar'] > DEBUG: proc.communicate(): output b'' > DEBUG: proc.communicate(): errors None > DEBUG: which tar: > ERROR: Something went wrong: tar not found in ./build-tools > ERROR: Something went wrong: installation failed > [2] > > export > PATH="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/usr/bin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/usr/sbin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/bin:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/sbin:$PATH" > > export > OECORE_NATIVE_SYSROOT="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux" > > export > GIT_SSL_CAINFO="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > export > SSL_CERT_FILE="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > export > REQUESTS_CA_BUNDLE="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > export > CURL_CA_BUNDLE="/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux/etc/ssl/certs/ca-certificates.crt" > > HOST_PKG_PATH=$(command -p pkg-config --variable=pc_path pkg-config > 2>/dev/null) > export > PKG_CONFIG_LIBDIR=/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux//usr/lib/pkgconfig:/home/anikolic/git/poky/build-tools/sysroots/x86_64-pokysdk-linux//usr/share/pkgconfig:${HOST_PKG_PATH:-/usr/lib/pkgconfig:/usr/share/pkgconfig} > > if [ -d "$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then > for envfile in $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do > . $envfile > done > fi > # We have to unset this else it can confuse oe-selftest and other tools > # which may also use the overlapping namespace. > unset OECORE_NATIVE_SYSROOT >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61989): https://lists.yoctoproject.org/g/yocto/message/61989 Mute This Topic: https://lists.yoctoproject.org/mt/103264959/21656 Mute #kirkstone:https://lists.yoctoproject.org/g/yocto/mutehashtag/kirkstone Mute #poky:https://lists.yoctoproject.org/g/yocto/mutehashtag/poky Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-