Skip to content

Compile error with 55.03.34 in combination with custom_sdkconfig #335

@qniens

Description

@qniens

PROBLEM DESCRIPTION

Project will not compile with version 55.03.34 in combination with custom_sdkconfig in platformio.ini
It doesn't matter which settings are set. When in Hybrid mode it will give the following linking error.
Deleting the .platformio folder and reinstalling all tools doesn't make a difference.

Linking .pio\build\test\firmware.elf
C:/Users/quint/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/test/lib66f/Network/NetworkClient.cpp.o:(.literal._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED5Ev[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED5Ev]+0x0): undefined reference to `__atomic_fetch_add_4'
C:/Users/quint/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/test/lib66f/Network/NetworkClient.cpp.o: in function `__gnu_cxx::__exchange_and_add(int volatile*, int)':
C:/Users/quint/.platformio/packages/toolchain-xtensa-esp-elf/xtensa-esp-elf/include/c++/14.2.0/ext/atomicity.h:66:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED5Ev]+0xe): undefined reference to `__atomic_fetch_add_4'
C:/Users/quint/.platformio/packages/toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:/Users/quint/.platformio/packages/toolchain-xtensa-esp-elf/xtensa-esp-elf/include/c++/14.2.0/ext/atomicity.h:66:(.text._ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev[_ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED5Ev]+0x26): undefined reference to `__atomic_fetch_add_4'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\test\firmware.elf] Error 1

TO REPRODUCE

[main.cpp]

#include <Arduino.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>

AsyncWebServer asyncServer(8080);

void setup() {
}

void loop() {
}

[platformio.ini]

[env:test]
platform =  https://github.com/pioarduino/platform-espressif32/releases/download/55.03.34/platform-espressif32.zip
framework = arduino
board = esp32doit-devkit-v1
monitor_speed = 115200

lib_deps =
  ESP32Async/AsyncTCP
  ESP32Async/ESPAsyncWebServer

custom_component_remove =
    espressif/esp_hosted
    espressif/esp_wifi_remote
    espressif/esp-dsp
    espressif/esp32-camera
    espressif/libsodium
    espressif/esp-modbus
    espressif/qrcode
    espressif/esp_insights
    espressif/esp_diag_data_store
    espressif/esp_diagnostics
    espressif/esp_rainmaker
    espressif/rmaker_common

custom_sdkconfig  = 
    CONFIG_BT_ENABLED=n

EXPECTED BEHAVIOUR

That the project compiles without linking errors.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Please also see the discussion here:
ESP32Async/ESPAsyncWebServer#332 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixedworkaroundworkaround to solve issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions