You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] script xtensa-build-zephyr.py fails on Windows #6122
Script xtensa-build-zephyr.py fails its execution on Windows system.
It looks like west_root_dir variable value returned by west tool has postfix of "/r" (carriage return) character (where on linux os it is a "\n" (newline character).
To Reproduce
Execute command ./sof/scripts/xtensa-build-zephyr.py tgl
Reproduction Rate
100%
Expected behavior
Script ./scripts/xtensa-build-zephyr.py works on Windows OS without errors.
Impact
Annoyance - we still can build using west tool directly according to Build with Zephyr guide.
Environment
Branch name and commit hash:
SOF: main
Operating system:
Windows
Name of the platform(s) on which the bug is observed.
It looks like west_root_dir variable value returned by west tool has postfix of "/r" (carriage return) character (where on linux os it is a "\n" (newline character).
@aborisovich do we need an if (WIN32) here in the script do use \r?
Well... yes, but in bug resolution I just stripped down all trailing whitespaces.
Basically on linux OS west command west topdir returns eg.: /home/root/projects/sof_workspace/sof/n
And on Windows OS west topdir returns eg.: C:\workspace\sof_workspace\sof/r
(note trailing visible whitespaces added by me /n and /r).
So I just removed them all.
Activity
lgirdwood commentedon Aug 15, 2022
@aborisovich do we need an
if (WIN32)here in the script do use\r?aborisovich commentedon Aug 15, 2022
Well... yes, but in bug resolution I just stripped down all trailing whitespaces.
Basically on linux OS west command
west topdirreturns eg.:/home/root/projects/sof_workspace/sof/n
And on Windows OS west topdir returns eg.:
C:\workspace\sof_workspace\sof/r
(note trailing visible whitespaces added by me /n and /r).
So I just removed them all.