chmorgan / esphttpd-freertos

freertos example of libesphttpd for esp32 and esp8266
53 stars 14 forks source link

Cannot Build - try_compile command is not scriptable #26

Closed mriksman closed 4 years ago

mriksman commented 4 years ago

I get this as soon as I try and build;

    Syntax error in cmake code at
      C:/VSCode/Projects/esphttpd-freertos/build/build_properties.temp.cmake:2
    when parsing string
      C:\Python\python.exe
    Invalid escape sequence \P

In the temp file I see;

set(PYTHON C:\Python\python.exe)
set(IDF_PATH c:/vscode/sdk/esp8266/esp8266_rtos_sdk)

How can I get this script to use double backslashes or a forward slash? This should be mandatory in the build script to catch Windows environments

mriksman commented 4 years ago

Issue with idf.py. Needed to replace the slashes. os.environ["PYTHON"] = sys.executable.replace('\\', '/')

Now I have the error

  CMake Error at C:/Program
  Files/CMake/share/cmake-3.17/Modules/CheckCSourceCompiles.cmake:109
  (try_compile):
    try_compile command is not scriptable

Has anyone actually built this on Windows..?

mriksman commented 4 years ago

I see Pull Request here has the fix https://github.com/chmorgan/libesphttpd/pull/77 This PR also fixes my original problem with the PYTHON path. New issue; ESP8266 RTOS SDK isn't supported. cgiflash.ccalls
if (esp_image_verify(ESP_IMAGE_VERIFY_SILENT, &part_pos, &data) != ESP_OK) { which doesn't exist in ESP8266 RTOS SDK v3.3

chmorgan commented 4 years ago

Hi @mriksman. I checked in with @phatpaul to see if he would have a chance to look at the changes. I'm not super active with this repo but I'm also weary of just merging changes. Have you tested with the changes from #77?

mriksman commented 4 years ago

Well, #77 allowed me to get past this issue, but I still couldn’t compile. I’m running ESP8266 RTOS SDK, and the cgiflash.c file is trying to use a function that is only available in the ESP-IDF SDK. Strange, because I see lots of work with #ifdef ESP32, yet this one was missed. Someone needs to verify what I am seeing; that it doesn’t compile with the latest ESP8266 RTOS SDK. Thanks for the quick reply.

phatpaul commented 4 years ago

@mriksman please test with the latest. I realize the esp_image_verify() may still be a problem, but you should be able to comment it out to make it compile.