AdaCore / bb-runtimes

Source repository for the GNAT Bare Metal BSPs
Other
65 stars 51 forks source link

Community 2020 : build_rts.py bug #26

Closed NicoPy closed 4 years ago

NicoPy commented 4 years ago

There is a bug in build_rts.py at line 273. This line content is os.path.relpath(dest, os.getcwd())). This code works only when the bb-runtimes sources are located on the same drive letter than the GNAT arm compiler. In my case, I work in the z drive while the compiler is installed in the c drive. I get the following error :

Traceback (most recent call last):
  File "build_rts.py", line 277, in <module>
    main()
  File "build_rts.py", line 273, in main
    os.path.relpath(dest, os.getcwd()))
  File "c:\python38\lib\ntpath.py", line 703, in relpath
    raise ValueError("path is on mount %r, start on mount %r" % (
ValueError: path is on mount 'c:', start on mount 'Z:'

Please note that this error happens at the very end of the script while printing a successful message. So this has no impact on the build process.

One simple solution is to replace

    print("runtimes successfully installed in %s" %
          os.path.relpath(dest, os.getcwd()))

with

    print("runtimes successfully installed in %s" % dest)
Fabien-Chouteau commented 4 years ago

Hi @NicoPy,

Thank you for the report, we will probably use your solution.

Fabien-Chouteau commented 4 years ago

This is now fixed.

Thank you @NicoPy

NicoPy commented 4 years ago

Thanks @Fabien-Chouteau.