Bug 14091 - 3.1.2 (not an option above) gcc: not found
Summary: 3.1.2 (not an option above) gcc: not found
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 3.1.4
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 3.1.4
Assignee: Steve Sakoman
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2020-10-16 01:28 UTC by Robert Berger
Modified: 2020-10-29 07:13 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Berger 2020-10-16 01:28:13 UTC
When I install a 3.1.2 "classic" SDK I get this:

-->

+ cd /home/student/yocto-download/20201015-1
+ cd toolchain/x86_64
+ ./resy-glibc-x86_64-core-image-sato-sdk-armv7at2hf-vfp-multi-v7-ml-toolchain-3.1.2.sh -d /opt/resy/3.1.2/multi-v7-ml/imx6q-phytec-mira-rdk-nand -y
./resy-glibc-x86_64-core-image-sato-sdk-armv7at2hf-vfp-multi-v7-ml-toolchain-3.1.2.sh: 29: gcc: not found
Resy (Reliable Embedded Systems Reference Distro) SDK installer version 3.1.2
=============================================================================
You are about to install the SDK to "/datastore/opt/resy/3.1.2/multi-v7-ml/imx6q-phytec-mira-rdk-nand". 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.
 $ . /datastore/opt/resy/3.1.2/multi-v7-ml/imx6q-phytec-mira-rdk-nand/environment-setup-armv7at2hf-vfp-resy-linux-gnueabi

<--

Further investigation shows:

21 # Some systems don't have /usr/sbin or /sbin in the cleaned environment PATH but we make need it 
     22 # for the system's host tooling checks
     23 tweakpath /usr/sbin
     24 tweakpath /sbin
     25 
     26 INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
     27 SDK_ARCH=$(echo x86_64 | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
     28 
     29 INST_GCC_VER=$(gcc --version | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p')
     30 SDK_GCC_VER=''


gcc does not seem to be needed on the host. At least the "classic" SDK installs.

It looks like the extensible SDK might need it:

139 # SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above
    140 if [ "$SDK_EXTENSIBLE" = "1" ]; then
    141         DEFAULT_INSTALL_DIR="~/resy_sdk"
    142         if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \
    143                 [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then
    144                 echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version."
    145                 exit 1
    146         fi
    147 fi


-->

gcc

Command 'gcc' not found, but can be installed with:

sudo apt install gcc

<--
Comment 1 akuster 2020-10-18 13:45:22 UTC
can you provide steps to reproduce?
Comment 2 akuster 2020-10-18 13:45:52 UTC
do you know if Master has this?
Comment 3 Richard Purdie 2020-10-19 10:13:08 UTC
I think this has been fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?h=master-next&id=61dbba9fabfcc271974303b149ec17aae5ee9e55

Moving bug over to Steve for dunfell.
Comment 4 Robert Berger 2020-10-20 07:05:37 UTC
Yes RP is (as usually) right.

On master the classic SDK does not require any host gcc:

sdk@0f962b9d9570:/workdir/build/qemux86-64-master/tmp/deploy/sdk$ ./poky-glibc-x86_64-core-image-minimal-core2-64-qemux86-64-toolchain-3.1+snapshot.sh
Poky (Yocto Project Reference Distro) SDK installer version 3.1+snapshot
========================================================================
Enter target directory for SDK (default: /opt/poky/3.1+snapshot): /tmp/classic-sdk
You are about to install the SDK to "/tmp/classic-sdk". Proceed [Y/n]? Y
Extracting SDK.............................

The extensible SDK does:

sdk@0f962b9d9570:/workdir/build/qemux86-64-master/tmp/deploy/sdk$ ./poky-glibc-x86_64-core-image-minimal-core2-64-qemux86-64-toolchain-ext-3.1+snapshot.sh
Poky (Yocto Project Reference Distro) Extensible SDK installer version 3.1+snapshot
===================================================================================
ERROR: the SDK requires the following missing utilities, please install them:  gcc

not quite sure why a host gcc needs to be installed for me to install an extensible SDK.;)

I thought we try to avoid host gcc dependencies e.g. with the uninative tarball.
Comment 5 Robert Berger 2020-10-20 08:56:51 UTC
extentible SDK/gcc clarified here:

https://www.yoctoproject.org/irc/%23yocto.2020-10-20.log.html#t2020-10-20T14:04:06

and here:

https://www.yoctoproject.org/irc/%23yocto.2020-10-20.log.html#t2020-10-20T15:27:59

just in case someone else wants to look it up.