Building on Windows with MinGW


Carles Cufi
 

Hi there,

I've followed the steps outlined here:

https://www.zephyrproject.org/doc/getting_started/installation_win.html

to compile Zephyr on Windows.

The first problem I encountered was that the regex library could not be found by MinGW's gcc, so I had to add the following to my .bash_profile:

export CPATH="C:/mingw/msys/1.0/include"
export LIBRARY_PATH="C:/mingw/msys/1.0/lib"

Not sure if this is due to the way one installs MinGW, but it was required for me.

The second problem I see is that no matter how I configure my build (both manually or adding my own Makefile.toolchain) the build always fails with an error similar to:

Error processing 'c:/cygwin64/home/cacu/src/nordic/git/cacu/zp/c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\soc\atom\Kconfig' #123.

Obviously my git repo lives in c:\cygwin64\home\cacu\src\nordic\git\cacu\zp.

After digging a bit, I found out that win_process_files in zconf.lex.c_shipped gets the following path when the error occurs:

c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\soc\atom\Kconfig

which obviously does not exist (I see no "Kconfig" file in x86\soc\atom). Since there is no wildcard, there is no chance that file is going to be found, and then win_process_files tries a second path by doing:

env = getenv(SRCTREE);
if (env) {
sprintf(fullname, "%s/%s", env, expanded);
}

But that doesn't work either, since it results in a path concatenation.

It is worth mentioning that the folders that *do* contain a Kconfig file, such as c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\core\Kconfig, seem to be processed fine.

Any idea on what could be causing this?

Thanks!

Carles


Cruz Alcaraz, Juan M <juan.m.cruz.alcaraz@...>
 

Carles,

Carles, thanks for digging into the issue. There is a JIRA report already reporting this behavior (ZEP-177).
Please follow the development of ZEP-177 to get a resolution to the issue.

-----Original Message-----
From: Cufi, Carles [mailto:Carles.Cufi(a)nordicsemi.no]
Sent: Monday, April 11, 2016 10:23 AM
To: devel(a)lists.zephyrproject.org
Subject: [devel] Building on Windows with MinGW

Hi there,

I've followed the steps outlined here:

https://www.zephyrproject.org/doc/getting_started/installation_win.html

to compile Zephyr on Windows.

The first problem I encountered was that the regex library could not be
found by MinGW's gcc, so I had to add the following to my .bash_profile:

export CPATH="C:/mingw/msys/1.0/include"
export LIBRARY_PATH="C:/mingw/msys/1.0/lib"

Not sure if this is due to the way one installs MinGW, but it was required for
me.

The second problem I see is that no matter how I configure my build (both
manually or adding my own Makefile.toolchain) the build always fails with an
error similar to:

Error processing
'c:/cygwin64/home/cacu/src/nordic/git/cacu/zp/c:\cygwin64\home\cacu\src
\nordic\git\cacu\zp\arch\x86\soc\atom\Kconfig' #123.

Obviously my git repo lives in
c:\cygwin64\home\cacu\src\nordic\git\cacu\zp.

After digging a bit, I found out that win_process_files in zconf.lex.c_shipped
gets the following path when the error occurs:

c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\soc\atom\Kconfig

which obviously does not exist (I see no "Kconfig" file in x86\soc\atom). Since
there is no wildcard, there is no chance that file is going to be found, and
then win_process_files tries a second path by doing:

env = getenv(SRCTREE);
if (env) {
sprintf(fullname, "%s/%s", env, expanded);
}

But that doesn't work either, since it results in a path concatenation.

It is worth mentioning that the folders that *do* contain a Kconfig file, such
as c:\cygwin64\home\cacu\src\nordic\git\cacu\zp\arch\x86\core\Kconfig,
seem to be processed fine.

Any idea on what could be causing this?

Thanks!

Carles


Carles Cufi
 

Hi Juan,

-----Original Message-----
From: Cruz Alcaraz, Juan M [mailto:juan.m.cruz.alcaraz(a)intel.com]
Sent: Monday, April 11, 2016 18:43
To: Cufi, Carles <Carles.Cufi(a)nordicsemi.no>;
devel(a)lists.zephyrproject.org
Subject: RE: Building on Windows with MinGW

Carles,

Carles, thanks for digging into the issue. There is a JIRA report
already reporting this behavior (ZEP-177).
Please follow the development of ZEP-177 to get a resolution to the
issue.
Thanks for the pointer.

I've added my observations to the Jira issue.

Carles