Skip to main content
Visitor II
February 28, 2023
Question

STM32MP1 trying to add GCC

  • February 28, 2023
  • 1 reply
  • 2792 views

Hello,

I have several python modules I am trying to install that require building something in C. I've read through this and completed a build. I got to the part about adding layers and I'm lost. I've not built a distribution using these tools before and layers are a foreign concept. I can't tell a) what layer GCC is in, nor b) how to add that layer to the final image to be flashed.

Any advice? I've found an older thread but this method is not longer supported by bitbake.

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 28, 2023

    Hi @Community member​ 

    Could you share python modules you need?

    Thx

    Olivier

    jgauthierAuthor
    Visitor II
    February 28, 2023

    I'm looking to add python-can which requires logging, which requires sqlite3, which requires building.

    I am trying to add FastAPI, and it's web server (uvicorn) which also has build requirements.

    I did not check if these are available through apt, because I assumed they werent.

    I discovered that the syntax is actually:

    IMAGE_INSTALL:append = " packagegroup-core-buildessential"

    and I am trying to run my image again

    ST Employee
    February 28, 2023

    Hi @Community member​ 

    the package python3-can is available in our repository:

    root@stm32mp1:~# apt-cache policy python3-can
    python3-can:
     Installed: (none)
     Candidate: 4.0.0-r0
     Version table:
     4.0.0-r0 500
     500 http://packages.openstlinux.st.com/4.1 kirkstone/untested armhf Packages

    You can install it with the command apt-get install

    root@stm32mp1:~# apt-get install python3-can --assume-yes
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
     python3-aenum python3-pkg-resources python3-plistlib python3-sqlite3
     python3-wrapt
    The following NEW packages will be installed:
     python3-aenum python3-can python3-pkg-resources python3-plistlib
     python3-sqlite3 python3-wrapt
    0 upgraded, 6 newly installed, 0 to remove and 1 not upgraded.
    Need to get 517 kB/753 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Get:1 http://packages.openstlinux.st.com/4.1 kirkstone/untested armhf python3-aenum armhf 3.1.11-r0 [189 kB]
    Get:2 http://packages.openstlinux.st.com/4.1 kirkstone/untested armhf python3-wrapt armhf 1.14.0-r0 [38.1 kB]
    Get:3 http://packages.openstlinux.st.com/4.1 kirkstone/untested armhf python3-can armhf 4.0.0-r0 [290 kB]
    Fetched 517 kB in 1s (907 kB/s)
     
    The software package is provided AS IS, and by downloading it, you agree to be
    bound to the terms of the software license agreement (SLA).
    The detailed content licenses can be found at
    https://wiki.st.com/stm32mpu/wiki/OpenSTLinux_licenses.
     
    Selecting previously unselected package python3-aenum.
    (Reading database ... 15212 files and directories currently installed.)
    Preparing to unpack .../0-python3-aenum_3.1.11-r0_armhf.deb ...
    Unpacking python3-aenum (3.1.11-r0) ...
    Selecting previously unselected package python3-plistlib.
    Preparing to unpack .../1-python3-plistlib_3.10.4-r0_armhf.deb ...
    Unpacking python3-plistlib (3.10.4-r0) ...
    Selecting previously unselected package python3-pkg-resources.
    Preparing to unpack .../2-python3-pkg-resources_59.5.0-r0_armhf.deb ...
    Unpacking python3-pkg-resources (59.5.0-r0) ...
    Selecting previously unselected package python3-sqlite3.
    Preparing to unpack .../3-python3-sqlite3_3.10.4-r0_armhf.deb ...
    Unpacking python3-sqlite3 (3.10.4-r0) ...
    Selecting previously unselected package python3-wrapt.
    Preparing to unpack .../4-python3-wrapt_1.14.0-r0_armhf.deb ...
    Unpacking python3-wrapt (1.14.0-r0) ...
    Selecting previously unselected package python3-can.
    Preparing to unpack .../5-python3-can_4.0.0-r0_armhf.deb ...
    Unpacking python3-can (4.0.0-r0) ...
    Setting up python3-aenum (3.1.11-r0) ...
    Setting up python3-sqlite3 (3.10.4-r0) ...
    Setting up python3-wrapt (1.14.0-r0) ...
    Setting up python3-plistlib (3.10.4-r0) ...
    Setting up python3-pkg-resources (59.5.0-r0) ...
    Setting up python3-can (4.0.0-r0) ...

    Does it fulfill your requirements?

    Best regards,

    --JM