[Solved]Error during compile example with stable branch

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

[Solved]Error during compile example with stable branch

Postby newsettler_AI » Mon Aug 19, 2019 4:27 pm

Hi.

I'm trying to compile default example (hello_world) and getting error during compile.

My setup:

1) win10;

2) idf version v3.3-rc-8-gbeb34b539
got this one from release/v3.3 brach with command:

Code: Select all

$ git clone --recursive https://github.com/espressif/esp-idf.git --branch release/v3.3
3) toolchain: 20181001
got this one from this link:
https://docs.espressif.com/projects/esp ... hain-setup

Code: Select all

$ xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc.exe (crosstool-NG esp32-2019r1) 8.2.0




Error log:

Code: Select all

CC build/app_trace/app_trace_util.o
CC build/app_trace/gcov/gcov_rtio.o
AR build/app_trace/libapp_trace.a
Project is not inside a git repository, will not use 'git describe' to determine PROJECT_VER.
App "hello-world" version: 1
CC build/app_update/esp_app_desc.o
CC build/app_update/esp_ota_ops.o
AR build/app_update/libapp_update.a
CXX build/asio/asio/asio/src/asio.o
In file included from c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\cstdlib:75,
                 from c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\ext\string_conversions.h:41,
                 from c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\bits\basic_string.h:6391,
                 from c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\include\c++\8.2.0\string:52,
                 from C:/ESP32/TOOLS/esp-idf/components/asio/asio/asio/include/asio/impl/error.ipp:19,
                 from C:/ESP32/TOOLS/esp-idf/components/asio/asio/asio/include/asio/impl/src.hpp:22,
                 from C:/ESP32/TOOLS/esp-idf/components/asio/asio/asio/src/asio.cpp:11:
c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\stdlib.h:155:44: error: expected initializer before '__result_use_check'
 void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
                                            ^~~~~~~~~~~~~~~~~~
c:\esp32\tools\msys32_esp32-2019r1\opt\xtensa-esp32-elf\xtensa-esp32-elf\sys-include\stdlib.h:340:52: error: expected initializer before '__alloc_align'
 void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
                                                    ^~~~~~~~~~~~~
make[1]: *** [/c/ESP32/TOOLS/esp-idf/make/component_wrapper.mk:290: asio/asio/src/asio.o] Error 1
make: *** [C:/ESP32/TOOLS/esp-idf/make/project.mk:552: component-asio-build] Error 2

I want to use STABLE branch of IDF with GCC compiler. What versions of compiler do I need to use?
Last edited by newsettler_AI on Fri Aug 23, 2019 11:17 am, edited 1 time in total.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Error during compile example with stable branch

Postby ESP_Angus » Tue Aug 20, 2019 11:55 pm

Hi Al,
newsettler_AI wrote:
Mon Aug 19, 2019 4:27 pm
3) toolchain: 20181001
got this one from this link:
https://docs.espressif.com/projects/esp ... hain-setup

Code: Select all

$ xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc.exe (crosstool-NG esp32-2019r1) 8.2.0
Something unexpected has happened here because the 20181001 Windows package should include a xtensa-esp32-elf-gcc 5.2.0 release, not one based on gcc 8.2.0 (that is a 2019 release, as per the "esp32-2019r1" in the crosstool version string).

The errors you're getting are due to the toolchain mismatch. Probably there is also a warning printed earlier in the build log about "Expected to see toolchain 5.2.0 but the toolchain version is 8.2.0" or similar.

Suggest re-unzipping the toolchain zip and checking that there isn't another toolchain on the PATH which is replacing the one in the MINGW32 environment. Then the build should succeed.

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: Error during compile example with stable branch

Postby newsettler_AI » Wed Aug 21, 2019 5:22 pm

Hi ESP_Angus,

thank for assistance.

Indeed, toolchain was modified by idf_windows_installer (https://docs.espressif.com/projects/esp ... -installer) while I tried other options.
Now I have changed to version 5.2.0:

Code: Select all

$ xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc.exe (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a5) 5.2.0
But now I having another problem:

Code: Select all

$ make menuconfig
DEFCONFIG
make: *** No rule to make target «defconfig», needed by «menuconfig».  Stop.

IDF seems not corrupted:

Code: Select all

user@DESKTOP-KI53PC4 MINGW32 /c/ESP32/TOOLS/esp-idf
$ git status
On branch release/v3.3
Your branch is up-to-date with «origin/release/v3.3».

nothing to commit, working directory clean
Version:

Code: Select all

user@DESKTOP-KI53PC4 MINGW32 /c/ESP32/TOOLS/esp-idf
$ git describe
v3.3-rc-8-gbeb34b539
What else should I try?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Error during compile example with stable branch

Postby ESP_Angus » Thu Aug 22, 2019 2:43 am

Hi Al,

Thanks for the detailed update and sorry it's still not working.

What is the IDF_PATH variable set to?


Angus

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: Error during compile example with stable branch

Postby newsettler_AI » Thu Aug 22, 2019 3:02 pm

ESP_Angus wrote:
Thu Aug 22, 2019 2:43 am
Hi Al,

Thanks for the detailed update and sorry it's still not working.

What is the IDF_PATH variable set to?


Angus
Hi ESP_Angus,

My IDF_PATH:

Code: Select all

$ printenv IDF_PATH
C:/ESP32/TOOLS/esp-idf
Example which I'm trying to compile is hello_world , I moved it from idf folder to
C:/ESP32/Projects/BASE/hello_world

its bare project:

Code: Select all

user@DESKTOP-KI53PC4 MINGW32 /c/ESP32/Projects/BASE/hello_world
$ ls
CMakeLists.txt  main  Makefile  README.md
No spaces in path to project.

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: Error during compile example with stable branch

Postby newsettler_AI » Thu Aug 22, 2019 3:45 pm

UPDATE

I have completely delete esp-idf folder and clone it again with command

Code: Select all

$ git clone --recursive https://github.com/espressif/esp-idf.git --branch release/v3.3
And now...

IDF have other version!

Code: Select all

$ git describe
v3.3-rc-24-g148a26980
It occurs that stable v3.3 branch still in development :?

https://github.com/espressif/esp-idf/co ... lease/v3.3

During August more then 10 commits to release branch.

This is confusing me.
Are there any really STABLE branch, which I can use any time and be sure that this code is not modifying?

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Error during compile example with stable branch

Postby ESP_Angus » Fri Aug 23, 2019 1:33 am

Hi Al,
newsettler_AI wrote:
Thu Aug 22, 2019 3:45 pm
It occurs that stable v3.3 branch still in development :?

https://github.com/espressif/esp-idf/co ... lease/v3.3

During August more then 10 commits to release branch.

This is confusing me.
Are there any really STABLE branch, which I can use any time and be sure that this code is not modifying?
release/v3.3 is a release branch not a release version. Our release versions are git tags, not branches.

v3.3 is not yet a stable release, so the latest pre-release is v3.3-rc. The v3.3 final release (due very soon) will be based on the "release/v3.3" branch, though.

Right now the latest stable release is v3.2.2

You can read more about ESP-IDF versioning here: https://docs.espressif.com/projects/esp ... sions.html

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: Error during compile example with stable branch

Postby newsettler_AI » Fri Aug 23, 2019 11:17 am

Hi ESP_Angus,

thanks for clarifying!

P.S. Example from IDF version v3.3-rc-24-g148a26980 compiled without issues.

Who is online

Users browsing this forum: No registered users and 132 guests