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

Unable to build mynewt 1.13.0 on Windows #3360

Closed
harteware07 opened this issue Jan 7, 2025 · 9 comments
Closed

Unable to build mynewt 1.13.0 on Windows #3360

harteware07 opened this issue Jan 7, 2025 · 9 comments

Comments

@harteware07
Copy link

harteware07 commented Jan 7, 2025

I recently upgraded the Version of mynewt to 1.13 and now I am unable to build anymore. Here is the console output of my build log:

Building target targets/myproject
Executing @apache-mynewt-core/boot/startup/scripts/generate_linker_script.sh

mkdir: cannot create directory ‘/link’: Permission denied
mkdir: cannot create directory ‘/link’: Permission denied
touch: cannot touch '/link/include/link_tables.ld.h': No such file or directory
touch: cannot touch '/link/include/target_config.ld.h': No such file or directory
touch: cannot touch '/link/include/memory_regions.ld.h': No such file or directory
touch: cannot touch '/link/include/bsp_config.ld.h': No such file or directory
touch: cannot touch '/link/include/mcu_config.ld.h': No such file or directory
touch: cannot touch '/link/include/user_sections.ld.h': No such file or directory
scripts/generate_linker_script.sh: line 32: /link/mynewt.ld: No such file or directory
Error: command [C:\WINDOWS\system32\bash.exe scripts/generate_linker_script.sh] exited with nonzero status 1

It seems that the variable ${MYNEWT_BUILD_GENERATED_DIR} and _PROJECT_ROOT do not exist for the generate_linker_script.sh script.

When I set the variable MYNEWT_BUILD_GENERATED_DIR in the script myself the script exits with following error:

>> newt.exe build myproject
Building target targets/myproject
Executing @apache-mynewt-core/boot/startup/scripts/generate_linker_script.sh
C:/Users/xxx/bin/targets/myproject/generated
scripts/generate_linker_script.sh: line 33: -xc: command not found
Error: command [C:\WINDOWS\system32\bash.exe scripts/generate_linker_script.sh] exited with nonzero status 127

I'm really thankful for any tips or hints on how to solve this problem.
Thanks a lot!

@sjanc
Copy link
Contributor

sjanc commented Jan 7, 2025

Hi,

could you paste output of 'newt version' and 'newt info' ?

@harteware07
Copy link
Author

harteware07 commented Jan 8, 2025 via email

@kasjer
Copy link
Contributor

kasjer commented Jan 8, 2025

It looks like you are working on Windows but bash.exe is taking you to WSL.
To work try running from mingw bash, Git for Windows bash should also work.

It is possible to run on WSL but then project should be inside WSL file system and then standard Linux version of commands would work for build. In this case it is still possible to have JLink installed on Windows that will be execute form Linux.

See here for installing/using mingw64 bash.

@harteware07
Copy link
Author

harteware07 commented Jan 15, 2025 via email

@kasjer
Copy link
Contributor

kasjer commented Jan 15, 2025

I'm not sure which command tried to create/access lv_conf.h file.

Could you please make newt build with following options:

newt build -j 1 -p <your_target>

Run this after you have build that fails. It should do build without parallel execution and show executed commands so culprit can be found.

@kasjer
Copy link
Contributor

kasjer commented Jan 15, 2025

I also see that your build tries to access lv_conf.h from strange location. I would expect lv_conf.h to be in
repos/apache-mynewt-core/hw/drivers/display/lvgl/default/lv_conf.h.

How did you specify location of this file?

@harteware07
Copy link
Author

harteware07 commented Jan 20, 2025 via email

@kasjer
Copy link
Contributor

kasjer commented Jan 20, 2025

Ok then, you may still want to run non-parallel build to see which command wants to access file from wrong location.

@sjanc
Copy link
Contributor

sjanc commented Jan 28, 2025

please reopen if this is stil an issue

@sjanc sjanc closed this as completed Jan 28, 2025
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

3 participants