tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
673 stars 220 forks source link

Error while cmake a program #126

Closed fikroyy closed 3 years ago

fikroyy commented 3 years ago

Hi @tonyp7,

I want to ask some question about cmake. What is payload for cmake this program?

I try to cmake but not success.

$ sudo cmake -DVENDOR=espressif -DBOARD=esp32_devkitc -DCOMPILER=xtensa-esp32 -DCMAKE_TOOLCHAIN_FILE='/home/monhack/esp/esp-idf/tools/cmake/project.cmake' -DCMAKE_C_COMPILER='/home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc' -DCMAKE_CXX_COMPILER='/home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++' -DCMAKE_ASM_COMPILER='/home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc' -DCMAKE_MAKE_PROGRAM='/home/monhack/.espressif/tools/ninja' -DAFR_BOARD='espressif.esp32_devkitc' -S . -B wifi_1

CMake Error at CMakeLists.txt:5 (include):
  include could not find load file:

    /tools/cmake/project.cmake

CMake Warning at /home/monhack/esp/esp-idf/tools/cmake/idf.cmake:24 (message):
  IDF_PATH environment variable not found.  Setting IDF_PATH to
  '/home/monhack/esp/esp-idf'.
Call Stack (most recent call first):
  /home/monhack/esp/esp-idf/tools/cmake/project.cmake:7 (include)
  wifi_1/CMakeFiles/3.18.1/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:7 (project)

-- The C compiler identification is GNU 5.2.0
-- The CXX compiler identification is GNU 5.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - broken
CMake Error at /usr/local/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/home/monhack/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/monhack/Documents/Kerjaan/esp32-wifi-manager/examples/default_demo/wifi_1/CMakeFiles/CMakeTmp

    Run Build Command(s):/home/monhack/.espressif/tools/ninja cmTC_90512/fast && ninja: error: loading 'build.ninja': No such file or directory

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)

-- Configuring incomplete, errors occurred!
See also "/home/monhack/Documents/Kerjaan/esp32-wifi-manager/examples/default_demo/wifi_1/CMakeFiles/CMakeOutput.log".
See also "/home/monhack/Documents/Kerjaan/esp32-wifi-manager/examples/default_demo/wifi_1/CMakeFiles/CMakeError.log".

please help me to solve this problem, Thanks :)

hanhdt commented 3 years ago

Not sure why don't you use ESP-IDF to build project?

$idf.py build
fikroyy commented 3 years ago

Thanks @hanhdt,

i follow you instruction, but error

/home/pckharisma-2/esp/esp-idf/tools/idf.py build flash monitor -p /dev/ttyUSB0
Setting IDF_PATH environment variable: /home/pckharisma-2/esp/esp-idf
WARNING: Support for Python 2 is deprecated and will be removed in future versions.
The following Python requirements are not satisfied:
gdbgui==0.13.2.0
pygdbmi<=0.9.0.2
python-socketio<5; python_version<="2.7"
kconfiglib==13.7.1
Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
Diagnostic information:
    IDF_PYTHON_ENV_PATH: (not set)
    Python interpreter used: /usr/bin/python
    Warning: python interpreter not running from IDF_PYTHON_ENV_PATH
    PATH: /home/pckharisma-2/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/pckharisma-2/esp/xtensa-esp32-elf/bin

ESP-IDF v4.4-dev-4-g73db14240-dirty
fikroyy commented 3 years ago

finally solved