aviralgarg05 commented on PR #18374:
URL: https://github.com/apache/nuttx/pull/18374#issuecomment-3957044729

   I reran this through the NuttX app build flow (instead of a standalone 
compiler invocation) using a repro app source in 
`apps/testing/cxx/cxxtest/cxxtest_main.cxx` with the same include pattern from 
#18232 and these config flags enabled:
   
   - `CONFIG_HAVE_CXX=y`
   - `CONFIG_HAVE_CXXINITIALIZE=y`
   - `CONFIG_LIBCXXTOOLCHAIN=y`
   - `CONFIG_LIBSUPCXX_TOOLCHAIN=y`
   - `CONFIG_LIBM_TOOLCHAIN=y`
   - `CONFIG_TESTING_CXXTEST=y`
   
   Build command used:
   
   ```bash
   make V=1 APPDIR=/Users/aviralgarg/Everything/apps 
TOPDIR=/Users/aviralgarg/Everything/nuttx \
     CXX=g++-15 CC=gcc-15 LD=gcc-15
   ```
   
   ### Before this patch
   
   The build fails with the same issue reported:
   
   ```text
   .../include/c++/15/math.h:38:12: error: 'abs' has not been declared in 'std'
   .../include/c++/15/math.h:39:12: error: 'acos' has not been declared in 'std'
   .../include/c++/15/math.h:40:12: error: 'asin' has not been declared in 'std'
   .../include/c++/15/math.h:41:12: error: 'atan' has not been declared in 'std'
   .../include/c++/15/math.h:42:12: error: 'atan2' has not been declared in 
'std'
   ...
   ```
   
   ### After this patch:
   
   Those `std::abs/std::acos/...` errors no longer occur in the app build log.
   
   On my macOS simulator-host setup, the compile then stops later on separate 
host header conflicts (`div_t`, `ldiv_t`, `putenv`, `dev_t`, `mode_t`) caused 
by mixed Darwin and NuttX libc type declarations in this specific local 
environment.
   
   So the remaining failure is a different host-side conflict.
   


-- 
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]

Reply via email to