Build failure is occurring while compiling tests with toolchains GCC, ARM, IAR.
Errors can be seen below. Detailed build logs are also attached
arm_build_logs.txt
gcc_build_logs.txt
iar_build_logs.txt
Same error is also occuring while building mbed-os-example-wifi with IAR.
iar_mbed-os-example-wifi_build_logs.txt
GCC:
Build failures:
ARM:
Build failures:
"D:mbed5\TE_OM2-405m\testmbed-os\featuresnetsocket\SocketAddress.cpp",76 Error[Pe304]: no instance of overloaded function "std::unique_ptr<_Ty [], _Dx>::reset [with _Ty=char, _Dx=std::default_delete Failed to build library Ublox Odin W2 Arm Compiler 6.13 n/a mbed test -t GCC_ARM -m UBLOX_EVK_ODIN_W2 --compileIAR:
Building library mbed-build (UBLOX_EVK_ODIN_W2, IAR)
Scan: test
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
Compile [ 69.9%]: SocketAddress.cpp
[ERROR]
_ip_address.reset();
^
"D:mbed5\TE_OM2-405m\testmbed-os\featuresnetsocket\SocketAddress.cpp",47 Error[Pe304]: no instance of overloaded function "std::unique_ptr<_Ty [], _Dx>::reset [with _Ty=char, _Dx=std::default_delete _ip_address.reset();
^
Target(s) affected by this defect ?
Toolchain(s) (name and version) displaying this defect ?
GNU Arm Embedded version 9 (9-2019-q4-major)
IAR Embedded Workbench 8.32.1What version of Mbed-os are you using (tag or sha) ?
83926138aae9cd77e8c74ec8678b38417bebaa3dWhat version(s) of tools are you using. List all that apply (E.g. mbed-cli)
How is this defect reproduced ?
mbed test -t ARMC6 -m UBLOX_EVK_ODIN_W2 --compile
mbed test -t IAR -m UBLOX_EVK_ODIN_W2 --compile
cc @ARMmbed/mbed-os-ipcore
@michalpasztamobica You might know why is this failing?
I don't know at first glance, but I will check it.
This came with latest SocketAddress modification. I can provide fixes.
@qasim-ublox , I cannot test IAR at the moment, so could you try if https://github.com/kivaisan/mbed-os/commit/ea2fb0a251a597e120f1a2901b1239d8baa6d616 fixes the unique_ptr::reset issue with IAR?
I also made fixes for UT. @qasim-ublox could you please test PR #12731?
Thanks @qasim-ublox for reporting this regression on master. We had found the same issue in the recent nightly run today.
I manually added changes in my repo but still getting error. However, now the error is different.
UBLOX_EVK_ODIN_W2::GCC_ARM::MBED-OS-TESTS-NETWORK-MULTIHOMING
Building project multihoming (UBLOX_EVK_ODIN_W2, GCC_ARM)
Scan: GCC_ARM
Scan: multihoming
Compile [ 25.0%]: main.cpp
Compile [ 50.0%]: multihoming_asynchronous_dns.cpp
Compile [ 75.0%]: multihoming_synchronous_dns.cpp
Compile [100.0%]: multihoming_udpsocket_echotest.cpp
[Error] mbed_trace.h@136,66: 'TRACE_GROUP' was not declared in this scope
[Error] mbed_trace.h@136,66: 'TRACE_GROUP' was not declared in this scope
[Error] mbed_trace.h@136,66: 'TRACE_GROUP' was not declared in this scope
[Error] mbed_trace.h@129,66: 'TRACE_GROUP' was not declared in this scope
Compile [ 69.7%]: SocketAddress.cpp "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\arm\inc\cppmemory",1651 Error[Pe300]: a pointer to a bound function may only be used to call the function Here is my diff:
[ERROR]
pointer _Old = this->_Myptr;
^
"C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.2\arm\inc\cppmemory",1650 Error[Pe300]: a pointer to a bound function may only be used to call the function
detected during instantiation of "inline __interwork __softfp void std::unique_ptr<_Ty [], _Dx>::reset(nullptr_t) [with _Ty=char, _Dx=std::default_delete this->_Myptr = _Ptr;
^
detected during instantiation of "inline __interwork __softfp void std::unique_ptr<_Ty [], _Dx>::reset(nullptr_t) [with _Ty=char, _Dx=std::default_delete
diff.txt
Oh dear, it looks like there's another bug in that library function. It should read this->_Myptr() = _Ptr;
Try another form - change the line in SocketAddress to
_ip_address = nullptr;
I also pushed TRACE_GROUP fix into fix PR. @qasim-ublox could you try Kevin's suggestion? If it works, I can include it in the fix PR as well.
Both fixes are working .Logs are attached for reference.
iar_mbed-os-example-wifi_build_logs.txt
gcc_build_logs.txt
@qasim-ublox Thank you for testing. I also added IAR fix to the PR so if you could add your review into it.
@qasim-ublox thank you for the update.It appears however that there is still some missing information:
We cannot automatically identify a release based on the version of Mbed OS that you have provided.
Please provide either a single valid sha of the form #abcde12 or #3b8265d70af32261311a06e423ca33434d8d80de
or a single valid release tag of the form mbed-os-x.y.z .
E.g. 'mbed-os-99.99.99' signifies master branch and is not a unique single snapshot.
Please update the issue header with the missing information.
NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered.
@qasim-ublox thank you for the update.It appears however that there is still some missing information:
We cannot automatically identify a release based on the version of Mbed OS that you have provided.
Please provide either a single valid sha of the form #abcde12 or #3b8265d70af32261311a06e423ca33434d8d80de
or a single valid release tag of the form mbed-os-x.y.z .
E.g. 'mbed-os-99.99.99' signifies master branch and is not a unique single snapshot.
Please update the issue header with the missing information.
NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'.This indicates to us that at least all the fields have been considered.
@qasim-ublox I'd suggest we use and test 5.15 branch as there is where we'd like to keep support for the ODIN W2 platform.
Any PR/fixes for the ODIN should be raised against the 5.15 branch.
As we agreed, master (path to Mbed 6) won't have support for ODIN.
@aqib-ublox
Internal Jira reference: https://jira.arm.com/browse/MBOTRIAGE-2616
@MarceloSalazar , will mbed-os 6 support ODIN once released? Thank you.
will mbed-os 6 support ODIN
I'm afraid it won't, but we continue to work with @ARMmbed/team-ublox on the 5.15 branch
@kivaisan can you please confirm the fixes are in the 5.15 branch?
If not, please re-raise them against 5.15.
Note code freeze is tomorrow. Thanks!
@MarceloSalazar I think it was agreed not to fix those few small test case issues in 5.15 or at least nobody requested those. Quote from PR:
Note we should be applying these changes to the 5.15 branch too, as that's where we'll continue to support the Ublox ODIN platform.
Not necessarily:
- TEST_ASSERT_EQUAL actually does not check the correct thing, but is this so critical that should be fixed in 5.15. I leave it to maintainers to decide.
- TRACE_GROUP build issue occurs only when mbed trace is enabled. By default traces are not enabled for tests. So I don't see this that critical at all.
- unique_ptr::reset workaround is a regression from mbed-os 6 SocketAddress refactoring. Therefore does not apply to mbed-os 5.15.
@MarceloSalazar And I just checked that actually none of the issues exist in 5.15. First check is new in mbed-os 6. And 5.15 version of the test does not use mbed-trace.
@MarceloSalazar And I just checked that actually none of the issues exist in 5.15. First check is new in mbed-os 6. And 5.15 version of the test does not use mbed-trace.
@qasim-ublox it means this could be closed as "not supported" anymore (as on master, so nothing to fix).
Most helpful comment
This came with latest
SocketAddressmodification. I can provide fixes.@qasim-ublox , I cannot test IAR at the moment, so could you try if https://github.com/kivaisan/mbed-os/commit/ea2fb0a251a597e120f1a2901b1239d8baa6d616 fixes the
unique_ptr::resetissue with IAR?