cancel
Showing results for 
Search instead for 
Did you mean: 

Installing libc6-dev library on STM32MP157C-DK2

ArminAmarr
Associate II

Hi,

In order to compile c-project directly on STM32MP157C-DK2 I've installed GCC 8.2.0 on the board but cannot manage installing libc6-dev library (or any other suitable one).

Could you please help me to figure out the proper way how to do?

For now I'm getting the following message when trying to do via apt-get.

Package libc6-dev is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source.

Kind regards,

Alexander Iotko

1 ACCEPTED SOLUTION

Accepted Solutions
AntonioST
ST Employee

Packages *-dev are not distributed but are created while using the distribution package:

https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package

You can follow the steps in the wiki page and, if you do not need/want to rebuild the whole image (chapter 6), you can just build the libc with

bitbake glibc

You will then find the -dev package in

tmp-glibc/deploy/deb/cortexa7t2hf-neon-vfpv4/libc6-dev_2.28-r0.0_armhf.deb

or similar path, depending on the specific version you are using.

View solution in original post

8 REPLIES 8
AntonioST
ST Employee

Packages *-dev are not distributed but are created while using the distribution package:

https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package

You can follow the steps in the wiki page and, if you do not need/want to rebuild the whole image (chapter 6), you can just build the libc with

bitbake glibc

You will then find the -dev package in

tmp-glibc/deploy/deb/cortexa7t2hf-neon-vfpv4/libc6-dev_2.28-r0.0_armhf.deb

or similar path, depending on the specific version you are using.

ArminAmarr
Associate II

Hello @AntonioST​ 

Thank you, it has helped.

Now I faced one more issue - there is no execvp command in STLinux and I cannot find it in distributive (there is only execvp.c as a part of Linux kernel).

Could you please advice me how to install or "enable" it?

Kind regards,

Alexander Iotko

AntonioST
ST Employee

I'm sorry but I'm not aware of any execvp command. Please point me to the right direction.

There is instead a execvp() function provided by libc, that is of course part of STLinux.

Since it is a standard functionality, you can find on-line several examples of using it

http://google.com/search?q=execvp+example

Thank you for your advice and sorry, my bad, now the problem is different.

I'm getting the following messages when trying to install the python package bluepy.

As far as I found on the Internet it's needed to install gcc-multilib, at the same time, I couldn't find anything like in the distribution packages even though I've rebuilt the whole image.

Could you please help me to figure out how to deal with the issue?

/usr/lib/gcc/arm-ostl-linux-gnueabi/8.2.0/../../../../arm-ostl-linux-gnueabi/bin/ld: cannot find crtbegin.o: No such file or directory
 
/usr/lib/gcc/arm-ostl-linux-gnueabi/8.2.0/../../../../arm-ostl-linux-gnueabi/bin/ld: cannot find -lgcc
 
/usr/lib/gcc/arm-ostl-linux-gnueabi/8.2.0/../../../../arm-ostl-linux-gnueabi/bin/ld: cannot find -lgcc_s

Kind regards,

Alexander Iotko

AntonioST
ST Employee

gcc-multilib is for 64 bits platforms to compile for either 32 or 64 bits. It does not apply to STM32MP1xx that is 32 bits only.

My suggestion for installing bluepy is to first build pip on the PC, with

bitbake python3-pip

then install it on the target and there run

pip3 install bluepy

Thank you for the advice, I already have pip3 installed on the target (just did it via apt-get install python3-pip, it works in the last version of STLinux released 2 weeks ago).

At the same time, the package contains c-code and gcc is called when I run pip3 install bluepy.

I've installed several -dev packages in the way you suggested, gcc and few more packages.

It seems now it's finally (almost) compiled :)

I'm just trying to figure out how to manage hopefully the last issue with lgcc and crtbegin.o, maybe you could help me with it?

Kind regards,

Alexander Iotko

Understand!

In this case my suggestion is to build bluepy in yocto with bitbake.

There is still no official support, as far as I know, but you can copy the recipe from

https://github.com/csonsino/meta-bluepy

I have tested and it compiles smoothly

I have created a folder "bluepy" in layers/meta-st/meta-st-stm32mp/recipes-connectivity

and inside I have copied the files bluepy.inc and bluepy_1.3.0.bb from the git above.

Then, "bitbake bluepy" builds it

Hello, Antonio,

Thank you very much for your help, it works!

Kind regards,

Alexander Iotko