-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix linking failure for space in path in PlatformIO builder scripts #6464
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
Conversation
P.S.: This is a hotfix intended to get it working / unblock people, a nicer fix would depend on platformio/platformio-core#4205. Please wait a bit so that maybe a cleaner fix can be found there before merging. |
As mentioned in the platformio/platformio-core#4205 (comment) '-Wl,-Map',
'-Wl,"${BUILD_DIR}/${PROGNAME}.map"' in the |
This would likely be a cleaner and better fix, I will try in a moment. |
Yes, this produces the correct flag
and the file is created at the proper place. Still a difference from the what the original script would do with |
Wow no, this actually does not work. On Linux where the path seperator is
there is that dead dreaded |
The code |
Strange, I was testing with the exact configuration where there were spaces in both project and env name :/
was created just fine in the wsl env |
And that was with PS my reference [env:esp32dev with spaces]
platform = https://github.com/Jason2866/platform-espressif32.git
board = esp32dev
framework = arduino |
Just made sure that I fetched all of the above and did a
🤷 |
I will do a build with this changes and update
So more people can test EDIT: repo is updated |
This is too magical. Now I changed the line back to what @mcspr suggeted, did a
Wow... I have really no idea now. Edit: Works on Windows too. But in any case, the current version of the PR with the two arguments combined also works equivalently.. 🤷 |
@maxgerhardt The fix works fine. 👍 Our |
@maxgerhardt can you please confirm that all is good? |
@maxgerhardt @me-no-dev I have included this PR (with S3) 5 days ago and we have no negative feedback from users when compiling Tasmota with this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and verified
Thanks guys :) Merged! |
esp-dl: master d949350 esp-dsp: master 07aa7b1 esp-rainmaker: master 5af4f64 esp-sr: master d05cf97 esp32-camera: master 86a4951 esp_littlefs: master 5f0d614
@me-no-dev Latest commit 31510f4 did revert this PR |
the lib-builder must have grabbed arduino before merge. will reapply |
Mhh, i have to look if this PR ever was in a build. |
yup that too |
in lib builder
in lib builder
By completing this PR sufficiently, you help us to improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Summary
This PR modifies the linker flag that produces the
.map
file for the project. For projects which contain spaces, this previously resulted in an error (#6463).Impact
Fixes compilation for projects that contain spaces in their path or enviornment name (in
platformio.ini
,[env:xxx]
). The.map
file will however now be the defaultfirmware.map
(or whateverPROGNAME
is set to if modified by custom scripts).The usage of
basename()
with environment subtition led to extremely weird bugs. This is fix here has been tested to work on both Windows on Linux. For the 'extreme case' of spaces in the project path and environment name, it correctly generates the flag on Windowsand on Linux
Which would previously error out.
Related links
See #6463.