Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12595 Discussions

Fix Newlib compile error on Windows Platform [Version > 18.1 Use WSL]

copy tool chain "H-x86_64-pc-linux-gnu" from linux platform 
and edit "" like this:
# if grep -q Microsoft /proc/version; then
    if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin" ]; then
        env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-mingw32/bin
        env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-mingw32/bin
# else
    if [ -d "${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin" ]; then
        env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-x86_64-pc-linux-gnu/bin
        env_var_prepend ${SOPC_KIT_NIOS2}/bin/gnu/H-i686-pc-linux-gnu/bin
# fi
comment if-else-if 
and doses not need edit any thing in "nios2-newlib-gen"
Be brief:
 there are two methods to solve these issues caused by wsl enviroment:
1. just use nios2eds with Qurtus 18.1 pro, which use cygwin shell enviroment, works perfect on windows platform.
2. copy tool chain "H-x86_64-pc-linux-gnu" form linux version's Quartus Pro to  directory "niso2eds/bin/gnu/", so in makefile, use tool chain "H-x86_64-mingw32" and when compile newlib, use "H-x86_64-pc-linux-gnu" by itself. 
 it is too complicated to use var WINDOWS_EXE,
If Qurtus really want try WSL or WSL2, WHY NOT JUST MINGRATE LINUX TOOL CHAIN AND ERVERY RELATED SCRIPT to WSL enviroment and DISCARD "H-x86_64-mingw32" TOOL CHAIN!!!!!!!!
JUST rollback to cygwin!
these issues had been existed for three years since quartus discarded cygwin and started to use WSL. CAN ANYBODY FIX IT ?
some other issues can be solved by add 
sed -i "s/^APP_LDFLAGS += -msys-lib=\$(call adjust-path-mixed\,\$(SYS_LIB)).*/APP_LDFLAGS += -msys-lib=\$(SYS_LIB)/g" Makefile
to your own auto-build script
0 Kudos
2 Replies

I couldn't agree more.

I have two PC LAPTOPS with

Quartus 20.1.1 

WINDOWS 10 20H2 19042.928

WSL 1 (as of todays date)

UBUNTU18.04 (as of todays date)

For some reason, the mysys-lib bug appears on ONE of the laptops. This is very frustrating. 

Tried re-installing WSL, Ubuntu and so on but no difference.


I don't really understand the fix above and i don't like having to edit makefile for every Eclipse project.

The install process for Eclipse with NIOS is already laughable. Why make the move to WSL if it is this complicated and not just stick with CygWin?

0 Kudos

Hi @tommmy,


Thank you for posting in Intel community forum, hope this message find you well and apologies for the delayed in response.
First of, noted with thanks on the feedback and sincere apologies for the inconvenient cause.
Allow me to take this back to the tool development team and get their inputs on this feedback and if further clarification are needed we will get in touch with you directly.
Some if this issues might have been schedule for fixes in the new version, please do stay tuned for the updated communication.
Hence, we would be transitioning this thread to community support, assuming there is no further action from our end, if that is no the case, please do reopen or open a new thread and we would be right with you.


Best Wishes

0 Kudos