PlatformIO Community

Cannot build on gitlab ci - toolchain-xtensa32 couldn't find crt1-sim.o and _vectors.o


I’m trying to mak auto check and build with gitlab ci and i’m facing an issue with


`/root/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory`
`/root/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory`

My .gitlab-ci.yml look like this:

image: ubuntu:latest
      - deploy_pages
      - test_firmware
      - build_firmware
    - apt-get update && apt-get install -y python3 python3-venv curl git gcc g++
    - curl -fsSL -o
    - python3
    - /root/.platformio/penv/bin/platformio upgrade
    - /root/.platformio/penv/bin/platformio update
  stage: deploy_pages
    - master_esp32
    - apt-get update && apt-get install -y doxygen
    - doxygen Doxyfile
      - public
  interruptible: true

  stage: test_firmware
  extends: .before_script_template
    - /root/.platformio/penv/bin/platformio check -e esp32dev --skip-packages
  interruptible: true

  stage: build_firmware
    - master_esp32
  extends: .before_script_template
    - /root/.platformio/penv/bin/platformio run -e esp32dev
  interruptible: true

This can help me?

ps: block code with 4 spaces indentation and don’t allow copy/paste is very boring…

Do you have an ESP-IDF project? Yet the compiler version is 5.2.0? Sounds like ld.exe: cannot find crt1-sim.o: No such file or directory (IDFGH-2073) · Issue #4247 · espressif/esp-idf · GitHub

Does it work locally (checking and building)? What packages are displayed at the start of compilation?

Hello thx for super speed answer.

Everything works on local with pio core / pio home on vscode windows 10.

project is built, upload and work on device.

The project is on arduino-esp32 framework.

What is the full compilation log where it fails?

Especially regarding the packages. Example:

 - framework-arduinoespressif32 3.10005.210308 (1.0.5)
 - tool-esptoolpy 1.30000.201119 (3.0.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft

With what packages does it work on your local machine?

Also I’ve read here multiple times that PIO should not be used as root, but I’m not sure if that’s the cause of the problem here.

but in docker container the default user is root…

This is the full trace from gitlab ci is to much verbose…can’t post it here there is a limitation.

maybe you can access to it zNg4%2B7yVdkrVOowQy97oxy01qWc1SbXSgzgH5EZBd1uX1RTuKkDLd2BzAEvq NmKKk73vHTFUUeA2T%2BjRkPidMPHEsgtaotrNljTz1RjlTKlqHqHOILHs%2FqNV CgfxsC5k9EROXtHTWCWMc0koaBV5tK4ksR%2BVjpV6E8TpuAV70GEiNp7CjlFF u7if8yMQ0URNoe9lfoCcpdqzx2Eft5dl1p%2BWo%2FxHcpCrqYXaiAGfsXx0wxA8 wFd8KriXxFYaIxxizAEMnaBFnUSzZCabcSqjUytRpw%3D%3D&Expires=1618240301

Hi there this topic answer to my issue:

the problem was in the platformio.ini

remove lines:

platform_packages = 
   platformio/framework-arduinoespressif32 @