You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
idf.py menuconfig error related to xtensa-esp-elf tool #235
I am using a Jetson Xavier running ROS2 and an ESP32 WROOME
I installed the ESP-IDF and created my own freertos project and pasted the micro-ros component folder.
When attempting to select the middleware as instructed using idf.py menuconfig generated an error:
It is concerning a libmicroros.a file which is not in the microros component folder.
I created my own freertos project and pasted the microros component folder in it. Then I added the dependencies following this:
I ran idf.py then attempted to select the micro-ROS middleware following this:
The complete error from running idf.py menuconfig is:
objpkjnfp@teambot-desktop:~/freertos_project$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/objpkjnfp/freertos_project/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/objpkjnfp/freertos_project"...
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/home/objpkjnfp/freertos_project/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.25.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/objpkjnfp/freertos_project/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python (found version "3.8.10") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "my-freertos-project" version: 1
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/include;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:139: /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at components/micro_ros_espidf_component/CMakeLists.txt:77 (message):
FAILED: 2
-- Configuring incomplete, errors occurred!
See also "/home/objpkjnfp/freertos_project/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
Reacted by erikdominguez01, nname, Jaime de Castro, MarcusWu, nao-ri and nakamuraaoi
Facing the same problem here also on humble branch
`-- Adding linker script /home/jayanth/Developments/espidf/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/include;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:151: /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/CMakeLists.txt:90 (message):
FAILED: 2
-- Configuring incomplete, errors occurred!
See also "/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/examples/int32_publisher/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1`
I'd like to point out that if you;re using any additional pckg, you should check that the addiotnal or extra pckg is being rebuilt when building the firmware, if you look in the extra-pckg folder, you may get the idea and besides ensure your build completes sucessfully, if not try building for esp32 dev kit board and see if it builds.
Hello, in 2024 I faced this issue and somehow managed to resolve it. This week, I encountered it again and found what is supposedly the solution:
Based on my tests, try changing your Linux locale. Apparently, it has some relation to the error that occurred. In all the tests I performed, this fixed the libmicroros compilation issue.
Activity
pablogs9 commentedon Mar 19, 2024
Could you first build the library and then try to open the menuconfig? Let me know if this works
gsoto-tellez commentedon Mar 20, 2024
Yes I built it and got these errors:

pablogs9 commentedon Mar 20, 2024
Why are you using micro_ros_setup? This is an standalone module for ESPIDF.
gsoto-tellez commentedon Mar 20, 2024
My apologies I sent the wrong screenshot. That was when I was following the micro-ROS documentation. This is the error I get when I build.

pablogs9 commentedon Mar 21, 2024
I need the complete log and the steps you followed to reach this error.
gsoto-tellez commentedon Mar 22, 2024
I created my own freertos project and pasted the microros component folder in it. Then I added the dependencies following this:


I ran idf.py then attempted to select the micro-ROS middleware following this:
The complete error from running idf.py menuconfig is:
objpkjnfp@teambot-desktop:~/freertos_project$ idf.py menuconfig
Executing action: menuconfig
Running cmake in directory /home/objpkjnfp/freertos_project/build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python -DESP_PLATFORM=1 -DCCACHE_ENABLE=0 /home/objpkjnfp/freertos_project"...
-- IDF_TARGET is not set, guessed 'esp32' from sdkconfig '/home/objpkjnfp/freertos_project/sdkconfig'
-- Found Git: /usr/bin/git (found version "2.25.1")
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file /home/objpkjnfp/freertos_project/sdkconfig
-- Compiler supported targets: xtensa-esp-elf
-- Found Python3: /home/objpkjnfp/.espressif/python_env/idf5.3_py3.8_env/bin/python (found version "3.8.10") found components: Interpreter
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS
-- Performing Test C_COMPILER_SUPPORTS_WFORMAT_SIGNEDNESS - Success
-- App "my-freertos-project" version: 1
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/memory.ld
-- Adding linker script /home/objpkjnfp/freertos_project/build/esp-idf/esp_system/ld/sections.ld.in
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script /home/objpkjnfp/esp/esp-idf/components/soc/esp32/ld/esp32.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp32-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/include;
/home/objpkjnfp/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:139: /home/objpkjnfp/freertos_project/components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at components/micro_ros_espidf_component/CMakeLists.txt:77 (message):
FAILED: 2
-- Configuring incomplete, errors occurred!
See also "/home/objpkjnfp/freertos_project/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
mackaygrange commentedon Oct 20, 2024
I am having this exact same issue. Is there any update on this?
Ericc99 commentedon Feb 12, 2025
I have encontered the same issue as well, any updates?
k-jayanth commentedon Feb 15, 2025
Facing the same problem here also on humble branch
`-- Adding linker script /home/jayanth/Developments/espidf/esp-idf/components/soc/esp32s3/ld/esp32s3.peripherals.ld
-- Using Micro XRCE-DDS middleware
mkdir -p /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros; cd /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/libmicroros;
for file in $(find /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/lib/ -name '*.a'); do
folder=$(echo $file | sed -E "s/(.+)/(.+).a/\2/");
mkdir -p $folder; cd $folder; /home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar x $file;
for f in *; do
mv $f ../$folder-$f;
done;
cd ..; rm -rf $folder;
done ;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp32s3-elf-ar rc -s libmicroros.a *.obj; cp libmicroros.a /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component;
cd ..; rm -rf libmicroros;
cp -R /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/include;
/home/jayanth/.espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/xtensa-esp-elf-ar: *.obj: No such file or directory
cp: cannot stat 'libmicroros.a': No such file or directory
cp: cannot stat '/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/micro_ros_src/install/include': No such file or directory
make: *** [libmicroros.mk:151: /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/libmicroros.a] Error 1
CMake Error at /home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/CMakeLists.txt:90 (message):
FAILED: 2
-- Configuring incomplete, errors occurred!
See also "/home/jayanth/Developments/espidf/Samples/extra_components/micro_ros_espidf_component/examples/int32_publisher/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1`
rehmaan-dev commentedon Feb 20, 2025
I'd like to point out that if you;re using any additional pckg, you should check that the addiotnal or extra pckg is being rebuilt when building the firmware, if you look in the extra-pckg folder, you may get the idea and besides ensure your build completes sucessfully, if not try building for esp32 dev kit board and see if it builds.
k-jayanth commentedon Feb 26, 2025
yes it got resolved after cloning and rebuilding from scratch. Thanks
bernacbs commentedon Apr 21, 2025
Hello, in 2024 I faced this issue and somehow managed to resolve it. This week, I encountered it again and found what is supposedly the solution:
Based on my tests, try changing your Linux locale. Apparently, it has some relation to the error that occurred. In all the tests I performed, this fixed the libmicroros compilation issue.
sudo apt update && sudo apt install localessudo locale-gen en_US en_US.UTF-8sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8export LANG=en_US.UTF-8than:
make -f libmicroros.mk cleanon microros root.Delete /build on IDF project e try
idf.py set-target <target>again :).