Closed pan- closed 8 years ago
I totally agree. Tools dependency should be managed right way.
@pan- can you please elaborate? E.g. show cases where the compatibility is broken?
Also FYI, all the commands that mbed CLI invokes from the tools have been there for the past 3 years (perhaps except for mbed test
)
@screamerbg I ran into this issue when I try to reproduce this issue: https://github.com/ARMmbed/mbed-os/issues/132
If I don't downgrade mbed-cli (to the version specified by the user) and keep the latest version, it just doesn't compile. Simple as that.
I don't know how we can enforce reproducibility if it is just not possible to just go back in history and compile with the build tools. Its like being forced to downgrade make
or cmake
to build a program while you don't know what version you should use.
$ mbed
usage: mbed [-h] ...
Command-line code management tool for ARM mbed OS - http://www.mbed.com
version 0.7.13
$ mbed import https://github.com/ARMmbed/mbed-os/#c4986eed9f42cbb3352c793d7a16d512d978d102 mbed-os-faulty
[mbed] Importing program "mbed-os-faulty" from "https://github.com/ARMmbed/mbed-os/" at rev #c4986eed9f42cbb3352c793d7a16d512d978d102
[mbed] Adding library "core/mbedtls" from "https://developer.mbed.org/teams/sandbox/code/mbedtls/" at rev #bef26f687287
[mbed] Adding library "core/uvisor-mbed-lib" from "https://github.com/ARMmbed/uvisor-mbed-lib/" at rev #9b0756ac4889a26b999383ab82691d05d98f9496
[mbed] Adding library "frameworks/greentea-client" from "https://github.com/bridadan/greentea-client/" at rev #398d96e25630
[mbed] Adding library "frameworks/unity" from "https://github.com/ARMmbed/unity/" at rev #3b2fef7fcf60abcc
[mbed] Adding library "net/atmel-rf-driver" from "https://github.com/ARMmbed/atmel-rf-driver-mirror/" at rev #473759f1a37c1863cb2adfcb2a87ac3f1da144ed
[mbed] Adding library "net/coap-service" from "https://github.com/ARMmbed/coap-service-mirror/" at rev #0c7805098970
[mbed] Adding library "net/mbed-client-c" from "https://github.com/ARMmbed/mbed-client-c-mirror/" at rev #e0b67894c573eab871f156dd275705fcce81bb69
[mbed] Adding library "net/mbed-client-classic" from "https://github.com/ARMmbed/mbed-client-classic/" at rev #3406e3b31c05ac9e566d69c63ba7343cf6235eed
[mbed] Adding library "net/mbed-client-mbedtls" from "https://github.com/ARMmbed/mbed-client-mbedtls-mirror/" at rev #1d7d223267f98c578fed190093a46c51284641ff
[mbed] Adding library "net/mbed-client-randlib" from "https://github.com/ARMmbed/mbed-client-randlib-mirror/" at rev #237b3fa0255f
[mbed] Adding library "net/mbed-client" from "https://github.com/ARMmbed/mbed-client-mirror/" at rev #6bfb6655b47f0ede4cc278c6c5f933ecefaf136d
[mbed] Adding library "net/mbed-mesh-api" from "https://github.com/ARMmbed/mbed-mesh-api-mirror/" at rev #7312d7621c5c6b89f7c0476a2b103a9f1ea71c3c
[mbed] Adding library "net/mbed-trace" from "https://github.com/ARMmbed/mbed-trace-mirror/" at rev #f9a11fcaa2b5
[mbed] Adding library "net/nanostack-hal-mbed-cmsis-rtos" from "https://github.com/ARMmbed/nanostack-hal-mbed-cmsis-rtos/" at rev #1d27e2613bf7a454f553e2363c115a1635fa9002
[mbed] Adding library "net/nanostack-libservice" from "https://github.com/ARMmbed/nanostack-libservice-mirror/" at rev #5490767fc3f8b9f204be20f88456f63a84810d06
[mbed] Adding library "net/sal-stack-nanostack-eventloop" from "https://github.com/ARMmbed/sal-stack-nanostack-eventloop-mirror/" at rev #dcbeaf4babf7d74d252e905fd15d1d63bbaaf9c2
[mbed] Adding library "net/sal-stack-nanostack-private" from "https://github.com/ARMmbed/sal-stack-nanostack-private-mirror/" at rev #c83ddc4f776847d62ae3aa53d591157adc910b59
mbed compile -t GCC_ARM -m K64F -c
Building project mbed-os-faulty (K64F, GCC_ARM)
Compile: HAL_CM4.S
Compile: rtos_idle.c
Compile: SVC_Table.S
Compile: HAL_CM.c
Compile: Semaphore.cpp
Compile: Mutex.cpp
Compile: RtosTimer.cpp
Compile: RTX_Conf_CM.c
Compile: rt_Event.c
Compile: rt_MemBox.c
Compile: rt_Memory.c
Compile: rt_Robin.c
Compile: rt_Mailbox.c
Compile: rt_List.c
[...]
Compile: socket_api.c
Link: mbed-os-faulty
./.build/K64F/GCC_ARM/hal/common/retarget.o: In function `__wrap_main':
/tmp/mbed-os-faulty/./hal/common/retarget.cpp:443: undefined reference to `main'
collect2: error: ld returned 1 exit status
[ERROR] ./.build/K64F/GCC_ARM/hal/common/retarget.o: In function `__wrap_main':
/tmp/mbed-os-faulty/./hal/common/retarget.cpp:443: undefined reference to `main'
Compiles fine except for the linking step, which is caused by not having main.cpp/main()
How is the link between mbed CLI and mbed OS tools broken?
@screamerbg It also work for me.
I'm not able to reproduce the issue anymore, maybe something was wrong in my config, I will try to understand what.
Thanks for your help.
The link between
mbed cli
andmbed tools
is very weak. Mbed cli doesn't check for the version of the tools it use and therefore backward compatibility is not handled at all.This hurt reproducibility a lot: because even if it is possible to checkout the complete source tree at a specific point in time, it doesn't mean that this revision will still build because mbed-cli will have evolved in a non compatible manner.