Skip to content

Fix unittest build with MinGW #10937

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

Closed
wants to merge 1 commit into from

Conversation

ba-evva
Copy link

@ba-evva ba-evva commented Jul 1, 2019

Unit test build crashes if MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF is defined. Add #include <stdarg.h> to fix this issue.

Description

Building unit tests on Windows 7 with MinGW/MSYS fails at 9% completion because 'va_list' is not declared. Inserting the mentioned #include (like that in the following #if section a few lines later) will fix the issue.

Details

Command issued:

mbed test --unittest --generator "MinGW Makefiles" --make-program mingw32-make

Unfixed build fails with:

In file included from P:\mbed-os\features\lorawan\lorastack\mac\LoRaMacCrypto.cpp:31:0:

p:\mbed-os\features\mbedtls\inc\mbedtls\platform.h:260:75: error: 'va_list' has not been declared
int mbedtls_platform_win32_vsnprintf( char *s, size_t n, const char *fmt, va_list arg );

Compiler version: g++ (MinGW.org GCC-6.3.0-1) 6.3.0

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

Unit test build crashes if MBEDTLS_PLATFORM_HAS_NON_CONFORMING_VSNPRINTF is defined. Add #include <stdarg.h> to fix this issue.
@ciarmcom ciarmcom requested review from a team July 1, 2019 17:00
@ciarmcom
Copy link
Member

ciarmcom commented Jul 1, 2019

@ba-evva, thank you for your changes.
@ARMmbed/mbed-os-tls @ARMmbed/mbed-os-crypto @ARMmbed/mbed-os-maintainers please review.

@Patater
Copy link
Contributor

Patater commented Jul 1, 2019

This fix has already landed in Mbed TLS upstream and will not be blown away next time we update Mbed TLS. However, for those users to depend on https://github.com/ARMmbed/mbed-os/blob/master/features/mbedtls/VERSION.txt to accurately reflect what version of Mbed TLS is being used, I would recommend we instead update to a version of Mbed TLS that includes this fix.

@ba-evva
Copy link
Author

ba-evva commented Jul 2, 2019

recommend we instead update to a version of Mbed TLS that includes this fix.

This would be OK for me.

@ba-evva ba-evva closed this Jul 2, 2019
@ba-evva
Copy link
Author

ba-evva commented Jul 2, 2019

Sorry, clicked the wrong button. Reviewers, please close after final decision.

@ba-evva ba-evva reopened this Jul 2, 2019
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 2, 2019

@Patater Shall we close this one and wait for the update?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 4, 2019

@Patater Shall we close this one and wait for the update?

👀

@Patater
Copy link
Contributor

Patater commented Jul 4, 2019

@Patater Shall we close this one and wait for the update?

eyes

Yes, please.

@0xc0170 0xc0170 closed this Jul 5, 2019
@Patater
Copy link
Contributor

Patater commented Jul 18, 2019

Fixed via PR #11035

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.

4 participants