Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266: xtensa-lx106-elf-g++: error: ..... /core/build.opt: No such file or directory #13

Open
TobyChaloner opened this issue Jul 14, 2024 · 0 comments · May be fixed by #14
Open

ESP8266: xtensa-lx106-elf-g++: error: ..... /core/build.opt: No such file or directory #13

TobyChaloner opened this issue Jul 14, 2024 · 0 comments · May be fixed by #14

Comments

@TobyChaloner
Copy link

With esp8266 version 3.1.2

-- Check for working CXX compiler: /home/.../.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++ - broken
CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler
    "/home/.../.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++"
  is not able to compile a simple test program.
    Building CXX object CMakeFiles/cmTC_c666f.dir/testCXXCompiler.cxx.o
xtensa-lx106-elf-gcc/3.1.0-gcc10.3-e5f9fec/bin/xtensa-lx106-elf-g++      ...     -DESP8266    @/home/  ...  /esp8266/core/build.opt 
    xtensa-lx106-elf-g++: error: /home/   ...   /esp8266/core/build.opt: No such file or directory

The compilation is looking for a file ${CMAKE_BINARY_DIR}/core/build.opt

The file platform.txt at

$HOME/.arduino15/packages/esp8266/hardware/esp8266/3.1.2/platform.txt

has the line

build.opt.fqfn={build.path}/core/build.opt

I'm tempted to suggest changing Arduino-toolchain.cmake from

# Workaround for CMAKE_TRY_COMPILE_TARGET_TYPE. For later ESP32 cores this file is missing
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build_opt.h" "")

to

# Workaround for CMAKE_TRY_COMPILE_TARGET_TYPE. For later ESP32 cores this file is missing
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build_opt.h" "")


file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/core)
file(TOUCH ${CMAKE_BINARY_DIR}/core/build.opt)

However this seems simplistic. Is there a way at this level of interrogating whether there is a property or whatever called build.opt.fqfn, so making the creation of the empty file conditional on the board requiring it?

@TobyChaloner TobyChaloner linked a pull request Jul 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant