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

Fix mbed 2 builds #3864

Merged
merged 3 commits into from
Mar 10, 2017
Merged

Fix mbed 2 builds #3864

merged 3 commits into from
Mar 10, 2017

Conversation

geky
Copy link
Contributor

@geky geky commented Mar 1, 2017

Some file must have been indirectly including something that brought in size_t, since this type is notably missing from the mbed 2 builds. Fixed by including stddef.h which includes this definitions.

cc @bridadan

@geky geky requested a review from bridadan March 1, 2017 21:45
Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me! I'll start the mbed 2 bot since that's what was broken

@bridadan
Copy link
Contributor

bridadan commented Mar 1, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@geky
Copy link
Contributor Author

geky commented Mar 1, 2017

Oh! I forgot we even had that old thing.

@mbed-bot
Copy link

mbed-bot commented Mar 2, 2017

[Build 1277]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 2, 2017

Some file must have been indirectly including something that brought in size_t, since this type is notably missing from the mbed 2 builds. Fixed by including stddef.h which includes this definitions.

I don't see that type used anywhere in retarget header file? What was the warning/error?

@geky
Copy link
Contributor Author

geky commented Mar 2, 2017

The error was FileLike.h@48,48: [Pe020]: identifier "size_t" is undefined
http://10.118.12.43:8080/job/mbed-2-build-library/1245/testReport/build.ARCH_GPRS.IAR/MBED/mbed_SDK/

retarget.h is currently responsible for garunteeing that the normally non-portable sys types are defined (ssize_t, off_t...), so it seems reasonable to include stddef as well.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 8, 2017

@geky Can you please rebase ? Idid it locally, plus tested it. However I cant push to your fork

@adbridge
Copy link
Contributor

adbridge commented Mar 8, 2017

NOTE: The description of this PR gives no indication that this bug broke mbed 2 for the 5.4 rc1 build. There was also no issue raised against mbed-os for which this is the fix (until I raised one today having started to prepare mbed 2 v138 for release). Thus the significance of this PR was assumed to be much lower than it actual is!! This fix SHOULD have gone into RC2 but was not prioritised due to the lack of information. This may block the mbed 2 v138 release.

@geky
Copy link
Contributor Author

geky commented Mar 8, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@geky
Copy link
Contributor Author

geky commented Mar 8, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 8, 2017

[Build ${MBED_BUILD_ID}]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

bridadan commented Mar 8, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Mar 8, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1658

All builds and test passed!

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

[Build 1286]
FAILURE: Something went wrong when building and testing.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

Tests results look good (IAR does build now !), retriggered the CI job.

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

[Build 1288]
FAILURE: Something went wrong when building and testing.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

@geky @bridadan Please look at the mbed 2 failure

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 9, 2017

lpc1768 - Error: L6218E: Undefined symbol $Super$$main (referred from mbed_retarget.o)., 1288 build failure above.

@geky
Copy link
Contributor Author

geky commented Mar 9, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@geky
Copy link
Contributor Author

geky commented Mar 9, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1666

All builds and test passed!

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

[Build 1289]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

bridadan commented Mar 9, 2017

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

mbed-bot commented Mar 9, 2017

[Build 1290]
FAILURE: Something went wrong when building and testing.

@geky
Copy link
Contributor Author

geky commented Mar 10, 2017

So we tracked down the issue... it is no longer a problem in retarget, but rather a breakage that got in through mbed 2 testing while this issue was there.

Tracked down to 51aa333, @theotherjimmy is looking into the fix which we can just append to this pr.

@geky geky changed the title Fix size_t issue for mbed 2 builds Fix mbed 2 builds Mar 10, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Mar 10, 2017

Tracked down to 51aa333, @theotherjimmy is looking into the fix which we can just append to this pr.

Thanks keep us updated.

I accidentally broke only uARM mbed 2 builds. Here is the story: When
scanning for resources, toolchains look for any `TOOLCHAIN_<classname>`
folders to include. These `<classname>`s mostly match the name passed in
on the command line with one exception: `uARM` on the command line maps
to `ARM_MICRO` the class. This would not be a problem except for the bug
that I introduced in a prior commit. The bug is that the mbed2 library
builds will use the name passed in on the command line to construct
`TOOLCHAIN_<cli-name>`. This will not match when scanning.

I fixed it by translating the `<cli-name>` into the `<classname>`.
@theotherjimmy
Copy link
Contributor

Fixed.

@theotherjimmy
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@geky
Copy link
Contributor Author

geky commented Mar 10, 2017

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1673

All builds and test passed!

@mbed-bot
Copy link

[Build 1292]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

[Build 1293]
FAILURE: Something went wrong when building and testing.

@bridadan
Copy link
Contributor

@mbed-bot: TEST

HOST_OSES=ALL
BUILD_TOOLCHAINS=ALL
TARGETS=ALL

@mbed-bot
Copy link

[Build 1294]
SUCCESS: Building succeeded and tests were run! Be sure to check the test results

@geky
Copy link
Contributor Author

geky commented Mar 10, 2017

LGTM!

@sg- sg- merged commit 684fcc1 into ARMmbed:master Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants