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

build fails if build directory is a symlink (IDFGH-1340) #3626

Closed
maierkomor opened this issue Jun 13, 2019 · 1 comment
Closed

build fails if build directory is a symlink (IDFGH-1340) #3626

maierkomor opened this issue Jun 13, 2019 · 1 comment

Comments

@maierkomor
Copy link

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

Environment

  • Development Kit: not relevant
  • Kit version not relevant
  • Module or chip used: not relevant
  • IDF version v3.3-beta3-34-g8c57aa024
  • Build System: Make
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    crosstool-ng-1.22.0-80-g6c4433a
  • Operating System: Linux
  • Power Supply: not relevant

Problem Description

I have a build environment with a shared source directory for multiple targets. So I have been building into symlinked build directories successfully with IDV v3.2. I.e. I prepare a build environment like this:
mkdir build.target1
ln -s build.target1 build

Then I start the build process with make.
This results in the following error:
make: *** No rule to make target "build.target1/esp32/esp32.project.ld"

Then the build process stops before linking, due to the missing .ld file.

Can the build process regarding the generation of the .ld file made agnostic to the presence of symlinks in the build directory? This is a blocker for having builds for multiple tagets...

@github-actions github-actions bot changed the title build fails if build directory is a symlink build fails if build directory is a symlink (IDFGH-1340) Jun 13, 2019
@igrr
Copy link
Member

igrr commented Jun 13, 2019

As an alternative to using symlinks, you can set BUILD_DIR_BASE to point to the build directory (see https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html#optional-project-variables):

make SDKCONFIG_DEFAULTS=sdkconfig.target1 BUILD_DIR_BASE=build.target1

(or similar)

@igrr igrr closed this as completed in c50a675 Aug 30, 2019
igrr pushed a commit that referenced this issue Sep 5, 2019
Fixes an issue where build fails if the build directory is a symlink.
The issue is caused by the rule target and the final executable dependency
not matching.

Closes #3626
projectgus pushed a commit that referenced this issue Jul 22, 2020
Fixes an issue where build fails if the build directory is a symlink.
The issue is caused by the rule target and the final executable dependency
not matching.

Closes #3626
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants