Closed motgon01 closed 7 years ago
@mottigondabi So to be clear, this is what your project looks like from a shared parent directory:
/mbed-os # cloned from https://github.com/ARMmbed/mbed-os
/mbed-client # cloned from https://github.com/ARMmbed/mbed-client
/foo # your own project
Then you do the following steps:
cd mbed-os
mbed compile --library --build .libmbed-os ...
cd ../mbed-client
mbed compile --library --build .libmbed-client ...
cd ../foo
mbed compile --source ../mbed-os/.libmbed-os --source ../mbed-client/.libmbed-client --source .
And this gives you the following Exception:
ConfigException: Library name 'mbed-os' is not unique (defined in '.build-libmbed-os/mbed_lib.json' and '.build-libmbed-client/mbed_lib.json')
Is this correct?
I take issue with the expected behavior: you are including the mbed and its compiled form twice (as liblmbed-os and as part of limbed-client), so you should get an error like Library name 'mbed-os' is not unique
@mottigondabi Is this still an issue?
@mottigondabi bump #2, any update?
No. Issue is closed.
This is usually due to another folder copied inside mbed os which contains a library with the same name as in mbed os due to which there is a conflict. Delete the already created library and it would build again. Its better to build it outside mbed os to avoid such issues using --build =
Description
mbed CLI tool copies *.json*, .a** files and potentially some other stuff that is given in
--source <path>
Bug
Target K64F
Toolchain: GCC_ARM|ARM
Toolchain version: 4.9.3
mbed-cli version: 0.9.5
meed-os sha: 56f60a0
Steps to reproduce
foo
application that has a single main.cpp (prints hello world or something) and uses--source libmbed-os
and--source libmbed-client
when compiling, e.g.:mbed compile -j1 --build .build-foo -t GCC_ARM -m K64F --artifact-name foo -v --source .build-libmbed-os --source .build-libmbed-client -v
Expected behavior
foo
application should cleanly compileActual behavior
ConfigException: Library name 'mbed-os' is not unique (defined in '.build-libmbed-os/mbed_lib.json' and '.build-libmbed-client/mbed_lib.json')
@jenia81 @screamerbg @bridadan