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

Build failed with shared mbed-os using Windows junction #319

Open
ccli8 opened this issue Oct 26, 2021 · 2 comments
Open

Build failed with shared mbed-os using Windows junction #319

ccli8 opened this issue Oct 26, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@ccli8
Copy link

ccli8 commented Oct 26, 2021

Describe the bug
On Windows, when mbed-os is shared using WIndows junction, build failed with:

Configuring project and generating build system...
Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python38\Scripts\mbed-tools.exe\__main__.py", line 7, in <module>
  File "c:\python38\lib\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "c:\python38\lib\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "c:\python38\lib\site-packages\mbed_tools\cli\main.py", line 38, in invoke
    super().invoke(context)
  File "c:\python38\lib\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\python38\lib\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\python38\lib\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "c:\python38\lib\site-packages\mbed_tools\cli\build.py", line 105, in build
    config, _ = generate_config(mbed_target.upper(), toolchain, program)
  File "c:\python38\lib\site-packages\mbed_tools\build\config.py", line 36, in generate_config
    config = assemble_config(
  File "c:\python38\lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 42, in assemble_config
    return _assemble_config_from_sources(target_attributes, mbed_lib_files, mbed_app_file)
  File "c:\python38\lib\site-packages\mbed_tools\build\_internal\config\assemble_build_config.py", line 64, in _assemble_config_from_sources
    config.update(source.from_file(config_file, target_filters=current_filter_data.labels))
  File "c:\python38\lib\_collections_abc.py", line 832, in update
    self[key] = other[key]
  File "c:\python38\lib\site-packages\mbed_tools\build\_internal\config\config.py", line 27, in __setitem__
    self._update_config_section(item)
  File "c:\python38\lib\site-packages\mbed_tools\build\_internal\config\config.py", line 66, in _update_config_section
    raise ValueError(
ValueError: Setting fat_chan.ffs_dbg already defined. You cannot duplicate config settings!

To Reproduce

  1. On Windows, clone mbed-os-example-blinky and mbed-os to different directories:
    $ git clone https://github.com/ARMmbed/mbed-os-example-blinky -b mbed-os-6.15.0
    $ git clone https://github.com/ARMmbed/mbed-os -b mbed-os-6.15.0
    
  2. Under mbed-os-example-blinky, run mklink /J to link mbed-os to just downloaded path
  3. Under mbed-os-example-blinky, build with:
    mbed-tools -vvv compile -m <TARGET> -t <TOOLCHAIN>
    

Expected behavior
Build OK

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10

Mbed (please complete the following information):

  • Device: All
  • Mbed OS Version: 6.15.0
  • Mbed CLI 2 Version: 7.44.0

If Mbed CLI 2 changes back to 7.16.0, build OK.

Additional context
N/A

@ccli8 ccli8 added the bug Something isn't working label Oct 26, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2021

Isn't this valid error in the config : Setting fat_chan.ffs_dbg already defined. You cannot duplicate config settings! ? Are there two duplicated settings in Mbed OS ? I haven't seen this error in CI, it could be we have older cli 2 there?

@ccli8
Copy link
Author

ccli8 commented Oct 26, 2021

Some points to re-produce the error:

  1. mbed-os needs to be shared with Windows junction mklink /J
  2. mbed cli2 needs to be newer version: 7.16.0 OK and 7.44.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants