Compilation problem with CMake build system under Windows 7

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Compilation problem with CMake build system under Windows 7

Postby squonk11 » Thu Jan 03, 2019 8:02 pm

After poitively installing and using the CMake build system on Windows 10 I now tried to install the same on a Windows 7 PC - unfortunatley without success. I am running in compilation errors:

Code: Select all

Checking Python dependencies...
Python requirements from c:\Users\de527\esp\esp-idf\requirements.txt are satisfied.
Running ninja in directory C:\Users\de527\esp\hello_world\build
Executing "ninja all"...
[46/785] Performing build step for 'bootloader'
FAILED: esp-idf/bootloader-prefix/src/bootloader-stamp/bootloader-build bootloader/bootloader.elf bootloader/bootloader.bin bootloader/bootl
oader.map
cmd.exe /C "cd /D C:\Users\de527\esp\hello_world\build\bootloader && "C:\Program Files\CMake\bin\cmake.exe" --build ."
[1/1] Generating ../bootloader.bin
FAILED: bootloader.bin
cmd.exe /C "cd /D C:\Users\de527\esp\hello_world\build\bootloader && C:\Users\de527\esp\esp-idf\components\esptool_py\esptool\esptool.py --c
hip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o C:/Users/de527/esp/hello_world/build/bootloader/bootloader.bin boo
tloader.elf"
ninja: build stopped: subcommand failed.
[51/785] Building C object esp-idf/heap/CMakeFiles/idf_component_heap.dir/heap_caps.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
I am using ESP-IDF version v3.3-beta1-169-g3c94b6e10
python --version: Python 2.7.15
pip list:

Code: Select all

Package          Version
---------------- ---------------------
asn1crypto       0.24.0
bottle           0.12.16
certifi          2018.11.29
cffi             1.11.5
chardet          3.0.4
click            5.1
colorama         0.4.1
cryptography     2.4.2
enum34           1.1.6
future           0.17.1
idna             2.8
ipaddress        1.0.22
pip              18.1
platformio       3.6.3
pycparser        2.19
pyparsing        2.3.0
pyserial         3.4
requests         2.21.0
semantic-version 2.6.0
setuptools       39.0.1
six              1.10.0
urllib3          1.24.1
virtualenv       16.2.0
wxPython-Phoenix 3.0.3.dev2352+3f4646c
Do you have any hint what could be the problem?
"Whoever believes to be someone has stopped becoming someone"
Sokrates

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: Compilation problem with CMake build system under Windows 7

Postby squonk11 » Fri Jan 04, 2019 2:25 pm

Now I was able to advance a little bit on this topic:
In general I am having the problem on the windows 7 machine that the invocation of "idf.py build" has exactly no output like so:

Code: Select all

C:\Users\de527\esp\blink>idf.py build

C:\Users\de527\esp\blink>
also invoking idf.py without any arguments has not output although I would expect at least the usage info, like this:

Code: Select all

C:\Users\de527\esp\blink>python %IDF_PATH%\tools\idf.py
usage: idf.py [-h] [-p PORT] [-b BAUD] [-C PROJECT_DIR] [-B BUILD_DIR]
              [-G {Ninja,MinGW Makefiles}] [-n] [-v]
              [-D DEFINE_CACHE_ENTRY [DEFINE_CACHE_ENTRY ...]] [--no-ccache]
              {all,fullclean,app,size-components,erase_flash,partition_table-flash,menuconfig,size,partition_table,size-files,monitor,flash,
app-flash,erase_otadata,build,confserver,reconfigure,bootloader,bootloader-flash,bootloader-clean,defconfig,clean,read_otadata}
              [{all,fullclean,app,size-components,erase_flash,partition_table-flash,menuconfig,size,partition_table,size-files,monitor,flash
,app-flash,erase_otadata,build,confserver,reconfigure,bootloader,bootloader-flash,bootloader-clean,defconfig,clean,read_otadata} ...]
idf.py: error: too few arguments
I guess this is some problem with the python installation. I am able to start the compile proces by entering:

Code: Select all

python %IDF_PATH%\tools\idf.py build
But during the following compile process other python scripts are called by ninja; e.g. esptool.py etc. and again these scripts are not executed and cause the error message described in my first post on this topic.
I am able to correctly compile the project if I edit all generated *.ninja files and add "python" in front of every invocation of a separate python script.
Unfortunately I am no expert for python and python installation; so, I don't know how to fix this issue. Does somebody have a useful hint for me?
"Whoever believes to be someone has stopped becoming someone"
Sokrates

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Compilation problem with CMake build system under Windows 7

Postby ESP_Roland » Mon Jan 07, 2019 7:48 am

Could you check please that py files are assocated with Python (default application for file type)?

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: Compilation problem with CMake build system under Windows 7

Postby squonk11 » Mon Jan 07, 2019 8:58 am

This, indeed, is a strange thing on my PC: In the file associations I see that it is linked with pythonw.exe (which surely is wrong). But I am not able to change this setting - even not as administrator level.
But: when I look into the registry (HKEY_CLASSES_ROOT) I see that ".py" is linked to "Python.File". And Python.File is set to

Code: Select all

"C:\Python27\python.exe" "%1" %*
in

Code: Select all

HKEY_CLASSES_ROOT\Python.File\shell\open\command
. So, this looks o.k. in my point of view.
"Whoever believes to be someone has stopped becoming someone"
Sokrates

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Compilation problem with CMake build system under Windows 7

Postby ESP_Roland » Mon Jan 07, 2019 12:22 pm

Thank you squonk11 for checking the association. If you put the following line of code into idf.py

Code: Select all

import pdb; pdb.set_trace()
at the top of the file (after the imports) then does it produce any output?

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: Compilation problem with CMake build system under Windows 7

Postby squonk11 » Mon Jan 07, 2019 2:28 pm

no, also this does not help; no output.
I also put

Code: Select all

print "Hello"
before and after the import lines; but also this does not produce any output.
"Whoever believes to be someone has stopped becoming someone"
Sokrates

User avatar
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Compilation problem with CMake build system under Windows 7

Postby ESP_Roland » Tue Jan 08, 2019 8:32 am

I think that the scripts are started in the background with their standard output and error output redirected. Usually, when a script fails, it prints something. I never saw this kind of silent failure before. I had no luck finding this problem on the Internet.

What you could do is to try to create a simple py file with only a single print in it and try to run it. I think it will not print anything at all. Please try to reinstall your Python. You can try even Python 3 which should also work.

squonk11
Posts: 69
Joined: Wed Mar 01, 2017 6:53 pm
Location: Germany

Re: Compilation problem with CMake build system under Windows 7

Postby squonk11 » Thu Jan 17, 2019 4:57 pm

A re-installation of Python27 and the whole tool-chain did the job. Thank you for your support.
"Whoever believes to be someone has stopped becoming someone"
Sokrates

Who is online

Users browsing this forum: asargent, Gaston1980 and 167 guests