problem about rtems source builder on windows

Chris Johns chrisj at rtems.org
Wed Feb 14 22:12:06 UTC 2018


Hi Tom,

On 14/02/2018 22:58, Tom wrote:
> hi Chris,
> 
> I am using source builder to build a toolchain for arm on windows 7.

Great to hear about. I am currently only building on Windows 10 so a Windows 7
build report would be most welcome.

Which version?

> 
> python 2.7.13 from https://www.python.org/downloads/ is installed.
> 

There is an issue using python.org built Python on Windows. Please take a look
at the following link for the reason it cannot be used:

https://docs.rtems.org/branches/master/user/hosts/windows.html#python

and the specifics about the version matrix is here:

https://git.rtems.org/rtems-source-builder/tree/source-builder/sb/windows.py#n136

The windows.py module in the RSB attempts to check for valid versions and raises
an error if it sees a version of python that it cannot use.

> But when I'm checking the environment using  `source-builder/sb-check`, 
> 
> error message " error: failed to load Windows host support " shows up.
> 

This looks like a bug in the handling of the load. I suspect the windows.py's
load() call is detecting your python will not work and its attempting to report
the error however it is not being cleanly handled.

> So source-builder/sb/options.py line 600 went wrong.
>     overrides = None
>     if os.name == 'nt':
>         try:
>             import windows
>             overrides = windows.load()
>             host_windows = True
>             host_posix = False
>         except:
>             *raise error.general('failed to load Windows host support')*
>     elif os.name == 'posix':

That code looks wrong and needs to be cleaned up to:

     overrides = None
     if os.name == 'nt':
         try:
             import windows
             overrides = windows.load()
             host_windows = True
             host_posix = False
         except error.general as ge:
             raise error.general('failed to load Windows host support: %s' % (ge))
         except:
             *raise error.general('failed to load Windows host support')*
     elif os.name == 'posix':

Can you please try this?

Chris



More information about the users mailing list