-
Notifications
You must be signed in to change notification settings - Fork 176
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
parallel compilation (-jN) seems to produce broken code randomly #323
Comments
Looking at the toolchain implementation here (https://github.com/ARMmbed/mbed-os/blob/master/tools/toolchains/__init__.py) It seems that the only thing that might change between runs is the order of the object files returned from |
|
There is differences in other components also
Small changes, I do not know if that is significant but seems quite suspicious. Also as a possible other issue, the error sys_mbox_post error can be found from two identical functions in two different places in mbed-os.
|
these issues might be related to this one: |
I heard that only way to avoid this issue is to define |
I don't think I've ever had a problem using |
When in doubt, we can always sort the linker's object/library list alphabetically. Quite random, but also consistent. |
I actually suggested sorting the objects a month ago. You always want the libraries after the object files though. |
@bridadan I don't have issues with this, and I have all of the cores to play with. |
I think we can finally close this. |
I have noticed that randomly our test application breaks in CI testing and have been investigating the reason for it. I noticed that the binary size of the final binary varies between builds and some builds work fine, others fail on error below:
We then through that this might be related to the -j flag. Compiling code with -j1 produces reliably nearly similar binary sizes, but using anything else makes it quite random.
For ex. building with -j32
with -j12
while with -j0
There is a few hundred byte difference in the produced binary size with completely identical builds otherwise (expect maybe time-stamp).
Could there by some issue that the build order of the files result in broken linking with bad luck?
The text was updated successfully, but these errors were encountered: