mirrexagon / nixpkgs-esp-dev

Nix flake and overlay for ESP8266 and ESP32 development.
Creative Commons Zero v1.0 Universal
143 stars 71 forks source link

Trying to use this with CLion but getting an Error #40

Open nmcbride opened 8 months ago

nmcbride commented 8 months ago

Hello,

I am trying to get this working with CLion and PlatformIO. Sadly I do not know a lot about this yet but learning quick. When CLion tries to make a PlatformIO project using the Clang from this build I get the following error. I was hoping perhaps you could point me in the right direction as to a resolution. Thank you.

-- The C compiler identification is Clang 15.0.0
-- The CXX compiler identification is Clang 15.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/clang
-- Check for working C compiler: /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/clang - broken
CMake Error at /var/home/<user>/.local/share/JetBrains/Toolbox/apps/clion/bin/cmake/linux/x64/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/tmp/cmake_check_environment/_build13292948200471213125/CMakeFiles/CMakeScratch/TryCompile-qcRleM'

    Run Build Command(s): /var/home/<user>/.local/share/JetBrains/Toolbox/apps/clion/bin/ninja/linux/x64/ninja -v cmTC_09736
    [1/2] /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/clang   -fcolor-diagnostics -MD -MT CMakeFiles/cmTC_09736.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_09736.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_09736.dir/testCCompiler.c.o -c /tmp/cmake_check_environment/_build13292948200471213125/CMakeFiles/CMakeScratch/TryCompile-qcRleM/testCCompiler.c
    [2/2] : && /var/home/<user>/.local/share/JetBrains/Toolbox/apps/clion/bin/cmake/linux/x64/bin/cmake -E rm -f libcmTC_09736.a && /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/llvm-ar qc libcmTC_09736.a  CMakeFiles/cmTC_09736.dir/testCCompiler.c.o && /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/llvm-ranlib libcmTC_09736.a && :
    FAILED: libcmTC_09736.a 
    : && /var/home/<user>/.local/share/JetBrains/Toolbox/apps/clion/bin/cmake/linux/x64/bin/cmake -E rm -f libcmTC_09736.a && /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/llvm-ar qc libcmTC_09736.a  CMakeFiles/cmTC_09736.dir/testCCompiler.c.o && /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/llvm-ranlib libcmTC_09736.a && :
    /nix/store/d8751552vm8chxr61079a05ha0036zhs-esp-clang-esp-idf-v5.1.2/bin/llvm-ar-unwrapped: error: expected [relpos] for 'a', 'b', or 'i' modifier
    ninja: build stopped: subcommand failed.

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

-- Configuring incomplete, errors occurred!

Error code: 1
mirrexagon commented 1 month ago

Sorry for not replying for so long! Unfortunately I don't know much about this specifically either. The tools have been updated at least once since, so maybe that will help?