trns1997 commented on PR #11301:
URL: https://github.com/apache/nuttx/pull/11301#issuecomment-1840870649
> both macOS and Linux report __mbstate_t error:
>
> ```
> Error:
/Applications/Xcode_14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_mbstate_t.h:32:28:
error: typedef redefinition with different types ('__darwin_mbstate_t' (aka
'__mbstate_t') vs 'struct mbstate_s')
> typedef __darwin_mbstate_t mbstate_t;
> ```
>
> ```
> In file included from
/github/workspace/sources/nuttx/include/libcxx/__mbstate_t.h:43,
> from
/github/workspace/sources/nuttx/include/libcxx/__std_mbstate_t.h:14,
> from
/github/workspace/sources/nuttx/include/libcxx/iosfwd:106,
> from
/github/workspace/sources/nuttx/include/libcxx/__random/uniform_int_distribution.h:20,
> from
/github/workspace/sources/nuttx/include/libcxx/__algorithm/sample.h:18,
> from
/github/workspace/sources/nuttx/include/libcxx/__algorithm/ranges_sample.h:13,
> from
/github/workspace/sources/nuttx/include/libcxx/algorithm:1893,
> from libcxx/src/algorithm.cpp:9:
> Error: /usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h:6:21: error:
conflicting declaration 'typedef struct __mbstate_t mbstate_t'
> 6 | typedef __mbstate_t mbstate_t;
> | ^~~~~~~~~
> ```
>
> We should avoid [_]mbstate_t.h from host get included.
hey @xiaoxiang781216 ok so we have 2 problems.
First problem is the following:
```
Error:
/github/workspace/sources/nuttx/include/libcxx/__iterator/segmented_iterator.h:72:46:
error: template argument '(sizeof (_Tp) * 0)' involves template parameter(s)
```
This i figured out why. Basically i pulled the docker image and found the
the gcc version 11 and for newer llvm versions require gcc version >= 12. I
updated the gcc version in my local container to test and it resolved this
specific issue.
The second problem that you mention i am not sure how to solve it yet :') .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]