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

Reproducible builds outputting differing .elf and .bin files (IDFGH-12690) #13680

Open
3 tasks done
mianowill opened this issue Apr 23, 2024 · 1 comment
Open
3 tasks done
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF

Comments

@mianowill
Copy link

mianowill commented Apr 23, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.2.1

Operating System used.

macOS

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

Building with CONFIG_APP_REPRODUCIBLE_BUILD should build the same binary regardless of the machine it's built on, provided the same IDF version is used.

What is the actual behavior?

Full paths are removed from the .bin file, but the .elf file contains the full toolchain path—something like /Users/mia/.espressif/tools/xtensa-esp-elf rather than /ESPRESSIF_TOOLS_DIR/xtensa-esp-elf. Paths for the project file and IDF components are correctly replaced; it's just the xtensa-esp-elf files in the tools dir that keep the full path. This means that the elf files will differ when built on different machines, and so the app.bin file will have a different elf SHA.

Steps to reproduce.

  • idf.py build
  • sha256sum build/app.bin build/app.elf

Example sdkconfig: sdkconfig.txt. Built with a clean IDF 5.2.1 on MacOS.

Build or installation Logs.

No response

More Information.

No response

@mianowill mianowill added the Type: Bug bugs in IDF label Apr 23, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 23, 2024
@github-actions github-actions bot changed the title Reproducible builds outputting differing .elf and .bin files Reproducible builds outputting differing .elf and .bin files (IDFGH-12690) Apr 23, 2024
@dobairoland
Copy link
Collaborator

The beginning of https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/reproducible-builds.html states conditions under which the binaries remain the same. Your highlighted case is not amongst them. So I mark this a feature request.

There might be a workaround for you (I haven't tried it): to install the tools under the same directory in each machine, e.g. a global /opt/espressif/ directory.

@espressif-bot espressif-bot added Type: Feature Request Feature request for IDF and removed Type: Bug bugs in IDF labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

3 participants