-
-
Notifications
You must be signed in to change notification settings - Fork 839
Description
What kind of issue is this?
-
Question.
This issue tracker is not the place for questions. If you want to ask how to do something,
or to understand why something isn't working the way you expect it to,
use Community Forums or Premium Support -
PlatformIO IDE.
All issues related to PlatformIO IDE should be reported to the
PlatformIO IDE for VSCode repository -
Development Platform or Board.
All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms
should be reported to appropriate repository related to your hardware
https://github.com/topics/platformio-platform -
Feature Request.
Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small. -
PlatformIO Core.
If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Docker python:alpine
PlatformIO Version (platformio --version): PlatformIO Core, version 6.1.16
Description of problem
xtensa build chain is not found on Alpine docker containers.
Suspect the wrong tool binaries or tools not working with musl are being downloaded when running on Alpine.
Steps to Reproduce
- Create docker container using
python:alpine(Python 3.13, Alpine 3.20) pip install platformiopio project init --board esp8285pio run
Actual Results
a2c1ffeabb89:/config/pio-esp8266# pio run
Processing esp8285 (platform: espressif8266; board: esp8285; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp8285.html
PLATFORM: Espressif 8266 (4.2.1) > Generic ESP8285 Module
HARDWARE: ESP8266 80MHz, 80KB RAM, 1MB Flash
PACKAGES:
- framework-arduinoespressif8266 @ 3.30102.0 (3.1.2)
- tool-esptool @ 1.413.0 (4.13)
- tool-esptoolpy @ 1.30000.201119 (3.0.0)
- toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/esp8285/src/main.cpp.o
sh: xtensa-lx106-elf-g++: not found
Generating LD script .pio/build/esp8285/ld/local.eagle.app.v6.common.ld
*** [.pio/build/esp8285/src/main.cpp.o] Error 127
sh: xtensa-lx106-elf-gcc: not found
*** [.pio/build/esp8285/ld/local.eagle.app.v6.common.ld] Error 127
Expected Results
Compile works.
If problems with PlatformIO Build System:
The content of platformio.ini:
Insert here...Source file to reproduce issue:
Insert here...Additional info
Dockerfile example:
# docker buildx create --name "test" --use
# docker buildx build --load --platform linux/amd64 --tag test:latest .
# docker run -it --rm --name Test test:latest /bin/bash
FROM python:alpine AS final
RUN \
apk update && apk upgrade \
&& apk add --no-cache \
bash \
build-base \
git \
python3-dev
RUN git config --system --add safe.directory '*'
RUN pip install platformio
VOLUME /config
WORKDIR /config
RUN <<EOF
mkdir /config/pio-esp8266
cd /config/pio-esp8266
pio project init --board esp8285
EOF
COPY <<EOF /config/pio-esp8266/src/main.cpp
#include "Arduino.h"
#ifndef LED_BUILTIN
#define LED_BUILTIN 13
#endif
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
EOF
RUN <<EOF
mkdir /config/pio-esp32
cd /config/pio-esp32
pio project init --board esp32-s3-devkitc-1
EOF
COPY <<EOF /config/pio-esp32/src/main.cpp
#include "driver/gpio.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "esp_check.h"
static const char *tagName = "Test";
static const gpio_num_t oneWireGPIO = GPIO_NUM_15;
esp_err_t Config1WireIO()
{
ESP_LOGI(tagName, "Config1WireIO()");
gpio_config_t gpioConfig = {};
gpioConfig.intr_type = GPIO_INTR_DISABLE;
gpioConfig.mode = GPIO_MODE_INPUT_OUTPUT;
gpioConfig.pull_down_en = GPIO_PULLDOWN_DISABLE;
gpioConfig.pull_up_en = GPIO_PULLUP_ENABLE;
gpioConfig.pin_bit_mask = 1ULL << oneWireGPIO;
ESP_RETURN_ON_ERROR(gpio_config(&gpioConfig), tagName, "gpio_config()");
gpio_dump_io_configuration(stdout, gpioConfig.pin_bit_mask);
return ESP_OK;
}
esp_err_t SetIOState(gpio_num_t gpio_num, bool state)
{
ESP_LOGI(tagName, "SetIOState(%d, %d)", gpio_num, state);
ESP_RETURN_ON_ERROR(gpio_set_level(gpio_num, state == true ? 1 : 0), tagName, "gpio_set_level()");
return ESP_OK;
}
extern "C" void app_main()
{
static const TickType_t xDelay = 1000 / portTICK_PERIOD_MS;
ESP_LOGI(tagName, "app_main()");
if (Config1WireIO() != ESP_OK)
{
return;
}
bool state = true;
while (1)
{
SetIOState(oneWireGPIO, state);
vTaskDelay(xDelay);
state = !state;
}
}
EOF
# Compiling .pio/build/esp8285/src/main.cpp.o
# sh: xtensa-lx106-elf-g++: not found
# Generating LD script .pio/build/esp8285/ld/local.eagle.app.v6.common.ld
# *** [.pio/build/esp8285/src/main.cpp.o] Error 127
# sh: xtensa-lx106-elf-gcc: not found
# *** [.pio/build/esp8285/ld/local.eagle.app.v6.common.ld] Error 127
RUN <<EOF
cd /config/pio-esp8266
pio run || true
EOF
# Compiling .pio/build/esp32-s3-devkitc-1/src/main.cpp.o
# sh: xtensa-esp32s3-elf-g++: not found
# Compiling .pio/build/esp32-s3-devkitc-1/FrameworkArduino/Esp.cpp.o
# *** [.pio/build/esp32-s3-devkitc-1/src/main.cpp.o] Error 127
# sh: xtensa-esp32s3-elf-g++: not found
# *** [.pio/build/esp32-s3-devkitc-1/FrameworkArduino/Esp.cpp.o] Error 127
RUN <<EOF
cd /config/pio-esp32
pio run || true
EOF