Error build simple project eclipse hello_world for the esp-wroom-32, failed installation package cryptography

lucia_microtech
Posts: 1
Joined: Thu Jun 25, 2020 1:38 pm

Error build simple project eclipse hello_world for the esp-wroom-32, failed installation package cryptography

Postby lucia_microtech » Thu Jun 25, 2020 1:49 pm

Hello,

I have a problem to use the esp-wroom-32 microprocessor with eclipse on windows 10.

I have follow this document (Build and Flash with Eclipse IDE, in site espressif.com) for installation
The installation procedure was performed without errors.

I use ad IDE Eclipse for the implementation of my project and I started with the simple project hello_word (${IDF_PATH}/examples/get-started/hello_world).

When I tried building the simple project as hello_word, (${IDF_PATH}/examples/get-started/hello_world), in particulare i tried to build All,

Eclipse returns the following error :

08:55:56 **** Build of configuration Default for project helloWorld ****
python "E:\\esp\\esp-idf/tools/windows/eclipse_make.py" all
Running make in 'E:/esp/esp-idf/examples/get-started/hello_world'
including E:/esp/esp-idf/components/app_update/Makefile.projbuild...
including E:/esp/esp-idf/components/bootloader/Makefile.projbuild...
including E:/esp/esp-idf/components/bootloader_support/Makefile.projbuild...
including E:/esp/esp-idf/components/coap/Makefile.projbuild...
including E:/esp/esp-idf/components/efuse/Makefile.projbuild...
including E:/esp/esp-idf/components/esp32/Makefile.projbuild...
including E:/esp/esp-idf/components/esptool_py/Makefile.projbuild...
including E:/esp/esp-idf/components/mbedtls/Makefile.projbuild...
including E:/esp/esp-idf/components/nghttp/Makefile.projbuild...
including E:/esp/esp-idf/components/partition_table/Makefile.projbuild...
including E:/esp/esp-idf/components/ulp/Makefile.projbuild...
including E:/esp/esp-idf/components/unity/Makefile.projbuild...
Toolchain path: E:/msys32/opt/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a5
Compiler version: 5.2.0
PROJECT_PATH= COMPONENT_DIRS= make -C E:/esp/esp-idf/components/bootloader/subproject V=1 BUILD_DIR_BASE=E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader TEST_COMPONENTS= TESTS_ALL= EXCLUDE_COMPONENTS= E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader.bin
make[1]: Entering directory 'E:/esp/esp-idf/components/bootloader/subproject'
including E:/esp/esp-idf/components/esptool_py/Makefile.projbuild...
including E:/esp/esp-idf/components/bootloader_support/Makefile.projbuild...
including E:/esp/esp-idf/components/bootloader/subproject/main/Makefile.projbuild...
including E:/esp/esp-idf/components/efuse/Makefile.projbuild...
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader_support -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/bootloader_support/component.mk COMPONENT_NAME=bootloader_support build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader_support'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader_support'
Target 'component-bootloader_support-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/bootloader_support/libbootloader_support.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/log -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/log/component.mk COMPONENT_NAME=log build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/log'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/log'
Target 'component-log-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/log/liblog.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/spi_flash -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/spi_flash/component.mk COMPONENT_NAME=spi_flash build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/spi_flash'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/spi_flash'
Target 'component-spi_flash-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/spi_flash/libspi_flash.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/micro-ecc -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/micro-ecc/component.mk COMPONENT_NAME=micro-ecc build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/micro-ecc'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/micro-ecc'
make: *** [E:\esp\esp-idf/make/project.mk:501: check_python_dependencies] Error 1
Target 'component-micro-ecc-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/micro-ecc/libmicro-ecc.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/soc -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/soc/component.mk COMPONENT_NAME=soc build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/soc'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/soc'
Target 'component-soc-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/soc/libsoc.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/main -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/bootloader/subproject/main/component.mk COMPONENT_NAME=main build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/main'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/main'
Target 'component-main-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/main/libmain.a'
make -C E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/efuse -f E:/esp/esp-idf/make/component_wrapper.mk COMPONENT_MAKEFILE=E:/esp/esp-idf/components/efuse/component.mk COMPONENT_NAME=efuse build
make[2]: Entering directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/efuse'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/efuse'
Target 'component-efuse-build' responsible for 'E:/esp/esp-idf/examples/get-started/hello_world/build/bootloader/efuse/libefuse.a'
make[1]: Leaving directory 'E:/esp/esp-idf/components/bootloader/subproject'
python E:/esp/esp-idf/tools/check_python_dependencies.py
The following Python requirements are not satisfied:
cryptography>=2.1.4
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run "E:/msys32/mingw32/bin/python.exe -m pip install --user -r E:/esp/esp-idf\\requirements.txt" for resolving the issue.
"python E:\esp\esp-idf/tools/windows/eclipse_make.py all" terminated with exit code 2. Build might be incomplete.


Then i tried to execute the following command (python2.7 -m pip install --user -r $IDF_PATH/requirements.txt) with E:\msys32\mingw32.exe and I obtained the following error :

Tech@DESKTOP-74RLIOE MINGW32 ~
$ python2.7 -m pip install --user -r $IDF_PATH/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developme ... -2-support
Requirement already satisfied: setuptools in e:/msys32/mingw32/lib/python2.7/site-packages (from -r E:/esp/esp-idf/requirements.txt (line 4)) (36.6.0.post20171017)
Requirement already satisfied: pyserial>=3.0 in e:/msys32/mingw32/lib/python2.7/site-packages (from -r E:/esp/esp-idf/requirements.txt (line 8)) (3.4)
Requirement already satisfied: future>=0.15.2 in e:/msys32/home/tech/.local/lib/python2.7/site-packages (from -r E:/esp/esp-idf/requirements.txt (line 9)) (0.18.2)
Collecting cryptography>=2.1.4
Using cached cryptography-2.9.2.tar.gz (517 kB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: E:/msys32/mingw32/bin/python2.7.exe E:/msys32/mingw32/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
cwd: None
Complete output (64 lines):
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/developme ... -2-support
Collecting setuptools>=40.6.0
Using cached setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting cffi!=1.11.3,>=1.8
Using cached cffi-1.14.0.tar.gz (463 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy setup.py install for cffi, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, pycparser, cffi
Running setup.py install for cffi: started
Running setup.py install for cffi: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: E:/msys32/mingw32/bin/python2.7.exe -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:/users/tech/appdata/local/temp/pip-install-mf4gbm/cffi/setup.py'"'"'; __file__='"'"'c:/users/tech/appdata/local/temp/pip-install-mf4gbm/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record c:/users/tech/appdata/local/temp/pip-record-pqh9b9/install-record.txt --single-version-externally-managed --prefix c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay --compile --install-headers c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay/include/python2.7/cffi
cwd: c:/users/tech/appdata/local/temp/pip-install-mf4gbm/cffi/
Complete output (45 lines):

No working compiler found, or bogus compiler options passed to
the compiler from Python's standard "distutils" module. See
the error messages above. Likely, the problem is not related
to CFFI but generic to the setup.py of any Python package that
tries to compile C code. (Hints: on OS/X 10.8, for errors about
-mno-fused-madd see http://stackoverflow.com/questions/22313407/
Otherwise, see https://wiki.python.org/moin/CompLangPython or
the IRC channel #python on irc.freenode.net.)

Trying to continue anyway. If you are trying to install CFFI from
a build done in a different context, you can ignore this warning.

running install
running build
running build_py
creating build
creating build/lib.mingw-2.7
creating build/lib.mingw-2.7/cffi
copying cffi/api.py -> build/lib.mingw-2.7/cffi
copying cffi/backend_ctypes.py -> build/lib.mingw-2.7/cffi
copying cffi/cffi_opcode.py -> build/lib.mingw-2.7/cffi
copying cffi/commontypes.py -> build/lib.mingw-2.7/cffi
copying cffi/cparser.py -> build/lib.mingw-2.7/cffi
copying cffi/error.py -> build/lib.mingw-2.7/cffi
copying cffi/ffiplatform.py -> build/lib.mingw-2.7/cffi
copying cffi/lock.py -> build/lib.mingw-2.7/cffi
copying cffi/model.py -> build/lib.mingw-2.7/cffi
copying cffi/pkgconfig.py -> build/lib.mingw-2.7/cffi
copying cffi/recompiler.py -> build/lib.mingw-2.7/cffi
copying cffi/setuptools_ext.py -> build/lib.mingw-2.7/cffi
copying cffi/vengine_cpy.py -> build/lib.mingw-2.7/cffi
copying cffi/vengine_gen.py -> build/lib.mingw-2.7/cffi
copying cffi/verifier.py -> build/lib.mingw-2.7/cffi
copying cffi/__init__.py -> build/lib.mingw-2.7/cffi
copying cffi/_cffi_include.h -> build/lib.mingw-2.7/cffi
copying cffi/parse_c_type.h -> build/lib.mingw-2.7/cffi
copying cffi/_embedding.h -> build/lib.mingw-2.7/cffi
copying cffi/_cffi_errors.h -> build/lib.mingw-2.7/cffi
running build_ext
building '_cffi_backend' extension
creating build/temp.mingw-2.7
creating build/temp.mingw-2.7/c
i686-w64-mingw32-gcc -fno-strict-aliasing -march=i686 -mtune=generic -O2 -pipe -fwrapv -D__USE_MINGW_ANSI_STDIO=1 -DNDEBUG -DNDEBUG -I/usr/include/ffi -I/usr/include/libffi -IE:/msys32/mingw32/include/python2.7 -c c/_cffi_backend.c -o build/temp.mingw-2.7/c/_cffi_backend.o
error: command 'i686-w64-mingw32-gcc' failed: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: E:/msys32/mingw32/bin/python2.7.exe -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:/users/tech/appdata/local/temp/pip-install-mf4gbm/cffi/setup.py'"'"'; __file__='"'"'c:/users/tech/appdata/local/temp/pip-install-mf4gbm/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record c:/users/tech/appdata/local/temp/pip-record-pqh9b9/install-record.txt --single-version-externally-managed --prefix c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay --compile --install-headers c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay/include/python2.7/cffi Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: E:/msys32/mingw32/bin/python2.7.exe E:/msys32/mingw32/lib/python2.7/site-packages/pip install --ignore-installed --no-user --prefix c:/users/tech/appdata/local/temp/pip-build-env-jzwygg/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.

Then I tried to install the package cryptography with the command pacman --->$ pacman -S mingw-w64-i686-python2-cryptography

Tech@DESKTOP-74RLIOE MINGW32 ~
$ pacman -S mingw-w64-i686-python2-cryptography
risoluzione delle dipendenze in corso...
ricerca dei pacchetti in conflitto in corso...

Pacchetti (6) mingw-w64-i686-python2-asn1crypto-0.22.0-1
mingw-w64-i686-python2-cffi-1.10.0-1
mingw-w64-i686-python2-idna-2.6-1
mingw-w64-i686-python2-pyasn1-0.2.3-1
mingw-w64-i686-python2-pycparser-2.17-1
mingw-w64-i686-python2-cryptography-1.9-1

Dimensione totale dei pacchetti da scaricare: 0,97 MiB
Dimensione totale dei pacchetti da installare: 6,08 MiB

:: Vuoi procedere con l'installazione? [S/n] S
:: Download dei pacchetti in corso...
mingw-w64-i686-pyth... 163,4 KiB 228K/s 00:01 [#####################] 100%
mingw-w64-i686-pyth... 211,1 KiB 640K/s 00:00 [#####################] 100%
mingw-w64-i686-pyth... 89,9 KiB 552K/s 00:00 [#####################] 100%
mingw-w64-i686-pyth... 82,7 KiB 1008K/s 00:00 [#####################] 100%
mingw-w64-i686-pyth... 155,4 KiB 1009K/s 00:00 [#####################] 100%
mingw-w64-i686-pyth... 287,6 KiB 819K/s 00:00 [#####################] 100%
(6/6) verifica delle chiavi presenti nel porta... [#####################] 100%
(6/6) verifica dell'integrità dei pacchetti [#####################] 100%
(6/6) caricamento dei file dei pacchetti [#####################] 100%
(6/6) controllo dei conflitti in corso [#####################] 100%
(6/6) controllo dello spazio disponibile sul d... [#####################] 100%
:: Elaborazione delle modifiche al pacchetto...
(1/6) installazione in corso di mingw-w64-i686... [#####################] 100%
(2/6) installazione in corso di mingw-w64-i686... [#####################] 100%
(3/6) installazione in corso di mingw-w64-i686... [#####################] 100%
(4/6) installazione in corso di mingw-w64-i686... [#####################] 100%
(5/6) installazione in corso di mingw-w64-i686... [#####################] 100%
(6/6) installazione in corso di mingw-w64-i686... [#####################] 100%


Then I tried building the simple project as hello_word (${IDF_PATH}/examples/get-started/hello_world),
eclipse returns the previuos error :

python E:/esp/esp-idf/tools/check_python_dependencies.py
The following Python requirements are not satisfied:
cryptography>=2.1.4
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run "E:/msys32/mingw32/bin/python.exe -m pip install --user -r E:/esp/esp-idf\\requirements.txt" for resolving the issue.
"python E:\esp\esp-idf/tools/windows/eclipse_make.py all" terminated with exit code 2. Build might be incomplete.

But if I edit the file "${IDF_PATH}/requirements.txt" as following :

# This is a list of python packages needed for ESP-IDF. This file is used with pip.
# Please see the Get Started section of the ESP-IDF Programming Guide for further information.
#
setuptools
# The setuptools package is required to install source distributions and on some systems is not installed by default.
# Please keep it as the first item of this list.
#
pyserial>=3.0
future>=0.15.2
cryptography>=1.0.0
pyparsing>=2.0.3,<2.4.0

The project build correctly but the correct "${IDF_PATH}/requirements.txt" is the following :

# This is a list of python packages needed for ESP-IDF. This file is used with pip.
# Please see the Get Started section of the ESP-IDF Programming Guide for further information.
#
setuptools
# The setuptools package is required to install source distributions and on some systems is not installed by default.
# Please keep it as the first item of this list.
#
pyserial>=3.0
future>=0.15.2
cryptography>=2.1.4
pyparsing>=2.0.3,<2.4.0

How can I fix this problem?

Right now I am stuck with the project and I would need to move forward with the implementation.

Best regards
Lucia
  1. [Codebox=c file=Untitled.c]
[/Codebox]

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

Re: Error build simple project eclipse hello_world for the esp-wroom-32, failed installation package cryptography

Postby ESP_Angus » Fri Jun 26, 2020 4:02 am

Hi lucia,

Which ESP-IDF version are you using?

MSYS2 project removed Python 2 packages (as Python 2 are now end of life) so we had to rebuild the MSYS2 Windows environments to use Python 3.

If you're using ESP-IDF v3.3: We haven't released ESP-IDF v3.3.3 with this fix yet, but it should be possible to download a new precompiled environment from here and continue using it with the v3.x ESP-IDF version that you're currently using.

If you're using ESP-IDF v4.0 or newer, then strongly recommend updating to the new Eclipse plugin which uses the CMake-based build system instead and doesn't require MSYS2 (it also has other new features):
https://docs.espressif.com/projects/esp ... setup.html

Who is online

Users browsing this forum: No registered users and 110 guests