-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4.4 on Raspberry Pi 4 ... "gcc is not able to compile a simple test program." (IDFGH-6180) #7857
Comments
Hello @csBlueChip I don't get the error you are reporting with either
Hopefully this can shed some light on the issue you are seeing. Thanks P.S. Have you verified there is enough free space on your drive? |
Felix. Thank You. Your success has led me to the source of my problem! I pasted your exact commands to a "clean" user, and got the same problem (again) ...Then I repeated the exercise on an x86 Debian VM! ...Success! It seems the source of the problem is that I have been using a Raspberry Pi 4 as my μC dev box ...
I'm not sure if you are the right person to ask this question, but: Is IDF v4.4 expected to work on a Pi4? ...Should I change the title of this Issue? Or start another? Or <other please specify>? ...Either way I offer my help to test any potential fixes. On the bright side, Thank You for prompting me to realise the issue and find a functional workaround. BC PS. Yes. There is sufficient free space:
|
Hello @csBlueChip Thank you for your feedback. Unfortunately I don't know it IDF v4.4 is supposed to work on a Pi4 at this point in time and I don't posses a Pi4 so I cannot test myself. So yes, I'd suggest you change the title to indicate the issue is in conjunction with the Pi4. Hopefully somebody with better knowledge than me can help you figuring out what's causing the issue on the Pi4. Thanks |
@csBlueChip Our tools team is looking into this issue currently. |
Hey @0xjakob, |
same problem on my raspberry pi 4 after update the esp-idf to latest code on master branch |
it seems that the toolchain has some problems. if use host gcc, compile is ok. |
ok.... after add these params, compile is ok now.. pi@raspberrypi: |
@zikalino |
Hi, I'm experiencing the same issue. I thought I'd mention that if instead of using If there's something I can do to narrow this issue down and help you debug it, please let me know. |
Thanks for reporting and sorry for the late response! Could you please run |
|
always the same type of error and
|
Thank you for following up, @igrr. I get the same "not a dynamic executable" message from
|
Just for info I did install version 4.3 which is working fine |
I have the same problem and had to go back to v4.3.1 (esp-2021r1-8.4.0) to fix it as v.4.3.2 (stable) uses the newer compiler. |
I confirm that v4.3.1 (esp-2021r1-8.4.0) works on a Raspberry Pi 3 running Debian 11 (bullseye), while v4.3.2 (stable, uses esp-2021r2-8.4.0) doesn't work and yields the same issue as above. Edit: there is no file named liblto_plugin.so in ~/.espressif/tools/xtensa-esp32-elf/esp-2021r1-8.4.0. This file seems to be a new dependency in esp-2021r2-8.4.0 (which has liblto_plugin.so but still doesn't work.) |
I also confirm that v4.3.1 (esp-2021r1-8.4.0) works on Raspberry Pi 4 (2 GB model) with Raspberry Pi OS 32 bit (based on Debian 11). However, IDF v4.4 and v4.3.1 do NOT work, for the same issue as described as OP. I also investigated whether said file was present and it was. |
My heart goes out to all those waiting for this issue to be fixed. I have shed many a tear and wept daily since discovering this unfortunate problem. This issue is the source of persistent pain and great suffering and it will be a day of great joy and celebration when the issue is resolved. |
All the weeping due to this unfortunate issue resulted me having a chronic dehydration condition. However, what I have discovered is that ESP-IDF v4.4 and gcc do appear to work as expected for the ESP32 on a Raspberry Pi 4 if the 64-bit version of Raspberry Pi OS is used. Up until now I had been using the 32-bit version of Raspberry Pi OS as the 64-bit version was still in beta. This is no longer the case and the first non-beta 64-bit version of Raspberry Pi OS was released recently so I gave it a try. Raspberry Pi OS 64-bit is being used:
ESP-IDF v4.4 is being used:
So I am now happy 😄 I guess it's only the 32-bit Xtensa compilers that are broken the 64-bit compilers appear to work. |
Thank @fivdi, for cheering and guiding us through these dark times. The latest version also works on my Pi after moving to the 64-bit Raspberry PI OS. However, many of us cannot ditch the 32-bit OS and reinstall everything, at least until their next holiday. Some even have to stay 32-bit for compatibility. I hope that this issue will not be closed until addressed. |
all, the fix for this issue should be available in master soon, i will keep an eye on updates, and post more information soon |
Is there any more information available yet? |
@csBlueChip We are on our way to get a new release of the toolchain. It is a big release with updating GCC and newlib versions. There is a chance to get a fix for the issue too |
Thank you. After 3 years of waiting, it is good to know that Espressif are "on their way" to releasing a devkit which will unlock the USB features of the chip, and there is "a chance" that it will work :) |
Any new updates on this? I installed 64 bit RPi OS recently, but I have yet to migrate my whole toolchain (which is based on a modified MicroPython codebase). I would like to update to IDF 4.4 (for ESP32 S3 support), but I am unable. I have a working executable generated from IDF 4.2.0, but I would prefer to use IDF 4.4. |
Hi @RSC-Games ! The new toolchain with ARM*@linux fixes will come to master branch already on these days. Also the fixes will be ported to v4.4, but I'm not sure about ETA |
Hi, I have got also this problem on v4.4 with Raspberry Pi 4. |
@MMucka right, for v4.4 we can open this |
What I have done:
but in tools, there is still old gcc
So I tried to apply changes from bf43076 for tools/tools.json and tools/toolchain_version.mk, but I have still problem to build simple test program. |
I have not verified that the latest commit works, because I migrated my toolchain to rpi 4 64 bit on Monday. I'll have to dig out my 32 bit sd card. However, when I cloned IDF 5.0 it reported using GCC 11.2 and the compiler was esp-2022r1. I'm running IDF 4.4 and it reports using GCC 8.4 and esp-2021r2. This works for me, but then again I'm using 64 bit. If you can, then I would suggest using IDF 5.0, but for me, Micropython does not support IDF 5, so I'm stuck with 4.4. |
Thanks for reporting, fix is available at 0007754, feel free to reopen. |
Is this fix not available in the latest 5.1.2? I still get:
|
Hi.
If I do this everything works exactly as expected:
However, the author of TinyUSB (@hathach) has told me that TinyUSB does not (and will not in the forseeable future) do what I need, so I need to use v4.4 of the IDF.
If I erase everything (and clear the environment) ...and repeat all the above steps using
-b release/v4.4
, theset-target
command fails with:The directory
/home/esp/blink/build/CMakeFiles/CMakeTmp
DOES exist:~/blink $ ls -ald /home/esp/blink/build/CMakeFiles/CMakeTmp drwxr-xr-x 2 esp esp 4096 Nov 8 21:27 /home/esp/blink/build/CMakeFiles/CMakeTmp
And so does
/home/esp/tools/tools/xtensa-esp32s2-elf/esp-2021r2-8.4.0/xtensa-esp32s2-elf/bin/../libexec/gcc/xtensa-esp32s2-elf/8.4.0/liblto_plugin.so
:The log files don't give me any further clues:
The same error happens if I use
master
or4.4-dev
branches, or if I usegit
to switch branches from4.3.1
(as per the official docs) ...IE.4.3.1
is the only version I can get to work - and I need v4.4 for the native USB support!I'm out of ideas! Can anybody help please?
Thanks,
BC
The text was updated successfully, but these errors were encountered: