You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "jasonbu (via GitHub)" <gi...@apache.org> on 2024/10/21 18:19:35 UTC

[PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS [nuttx]

jasonbu opened a new pull request, #14440:
URL: https://github.com/apache/nuttx/pull/14440

                            ^
   
   *Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   fix macos compile hostfs.c compile issue.
   /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/_string.h:131:62: error: expected function body after function declarator
     131 | char    *stpncpy(char *__dst, const char *__src, size_t __n) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
         |                                     
   
   ## Impact
   
   
   ## Testing
   CI-test
   
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS [nuttx]

Posted by "jasonbu (via GitHub)" <gi...@apache.org>.
jasonbu commented on code in PR #14440:
URL: https://github.com/apache/nuttx/pull/14440#discussion_r1809915076


##########
arch/sim/src/sim/CMakeLists.txt:
##########
@@ -288,4 +288,11 @@ endforeach()
 set(HOSTSRCS ${WINHOSTSRCS})
 
 target_sources(nuttx PRIVATE ${HOSTSRCS})
+
+get_target_property(HOST_COMPILE_OPTIONS nuttx COMPILE_OPTIONS)
+foreach(remove_item IN LISTS SIM_NO_HOST_OPTIONS)
+  list(REMOVE_ITEM HOST_COMPILE_OPTIONS ${remove_item})
+endforeach()
+set_target_properties(nuttx PROPERTIES COMPILE_OPTIONS
+                                       "${HOST_COMPILE_OPTIONS}")

Review Comment:
   nuttx_remove_compile_options not able to solve my problem, can you provide some sample how to make it work?



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS. remove the bzero implement, use macro to memset. [nuttx]

Posted by "jasonbu (via GitHub)" <gi...@apache.org>.
jasonbu commented on PR #14440:
URL: https://github.com/apache/nuttx/pull/14440#issuecomment-2435182998

   > @xiaoxiang781216 @xuxin930 @jasonbu this pr broke build msvc
   > 
   > https://github.com/simbit18/nuttx_test_pr/actions/runs/11498059450/job/32003163671#step:8:1780 sched.vcxproj -> D:\a\nuttx_test_pr\nuttx_test_pr\sources\nuttx\vs2022\sched\Debug\sched.lib Generating nuttx_all.lib Microsoft (R) Library Manager Version 14.41.34123.0 Copyright (C) Microsoft Corporation. All rights reserved.
   > 
   > Building Custom Rule D:/a/nuttx_test_pr/nuttx_test_pr/sources/nuttx/CMakeLists.txt Building Custom Rule D:/a/nuttx_test_pr/nuttx_test_pr/sources/nuttx/CMakeLists.txt HOST_COMPILE_OPTIONS-NOTFOUND /HOST_COMPILE_OPTIONS-NOTFOUND(1,1): error C1083: Cannot open source file: 'HOST_COMPILE_OPTIONS-NOTFOUND': No such file or directory [D:\a\nuttx_test_pr\nuttx_test_pr\sources\nuttx\vs2022\nuttx.vcxproj] (compiling source file '/HOST_COMPILE_OPTIONS-NOTFOUND')
   
   @simbit18  I did not try the win host and re-produce the problem, please help me verify if it will work, I will do verify later.
   please review #14499.
   the problem should be COMPILE_OPTIONS is not set yet in nuttx cmake target at this time.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS. remove the bzero implement, use macro to memset. [nuttx]

Posted by "simbit18 (via GitHub)" <gi...@apache.org>.
simbit18 commented on PR #14440:
URL: https://github.com/apache/nuttx/pull/14440#issuecomment-2434966706

   @xiaoxiang781216 @xuxin930  @jasonbu this pr broke build msvc
   
   sched.vcxproj -> D:\a\nuttx_test_pr\nuttx_test_pr\sources\nuttx\vs2022\sched\Debug\sched.lib
     Generating nuttx_all.lib
     Microsoft (R) Library Manager Version 14.41.34123.0
     Copyright (C) Microsoft Corporation.  All rights reserved.
     
     Building Custom Rule D:/a/nuttx_test_pr/nuttx_test_pr/sources/nuttx/CMakeLists.txt
     Building Custom Rule D:/a/nuttx_test_pr/nuttx_test_pr/sources/nuttx/CMakeLists.txt
     HOST_COMPILE_OPTIONS-NOTFOUND
   /HOST_COMPILE_OPTIONS-NOTFOUND(1,1): error C1083: Cannot open source file: 'HOST_COMPILE_OPTIONS-NOTFOUND': No such file or directory [D:\a\nuttx_test_pr\nuttx_test_pr\sources\nuttx\vs2022\nuttx.vcxproj]
     (compiling source file '/HOST_COMPILE_OPTIONS-NOTFOUND')


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS [nuttx]

Posted by "nuttxpr (via GitHub)" <gi...@apache.org>.
nuttxpr commented on PR #14440:
URL: https://github.com/apache/nuttx/pull/14440#issuecomment-2427428527

   [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues)
   
   
   
   ## NuttX PR Requirements Review
   
   This PR appears to **partially meet** the NuttX requirements. Here's a breakdown:
   
   **Strengths:**
   
   * **Summary:** Clearly states the "why" (fix compile issue) and "what" (addressing `stpncpy` error and removing `bzero` causing deadloop).  However, it could benefit from a more detailed explanation of  _how_ the `bzero` issue was addressed. 
   * **Impact:**  Highlights the positive impact on macOS CMake builds. 
   * **Testing:** Provides specific testing environments (CI, macOS, sim:nsh) and build commands for reproducibility. The inclusion of testing logs is commendable.
   
   **Areas for Improvement:**
   
   * **Summary:**
       * Expand on the `bzero` fix. Was it simply removed, or replaced with a different function? 
       * Include relevant NuttX Issue numbers if applicable.
   * **Impact:** 
       * While it mentions fixing a build problem, specify if this is a **new feature**, **existing feature change**, or a **bug fix**.
       * The other impact fields (hardware, documentation, security, compatibility) are left blank. Even if the answer is "NO", it's good practice to explicitly state it for clarity.
   * **Testing:**
       * **Before Change Logs:** Currently missing.  Include logs demonstrating the original compile error and the `bzero` deadloop to highlight the problem being solved. 
   
   **Recommendation:**
   
   Before merging, consider addressing the "Areas for Improvement" to enhance clarity and completeness.  This will make it easier for reviewers to understand the PR's full scope and impact. 
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS [nuttx]

Posted by "xuxin930 (via GitHub)" <gi...@apache.org>.
xuxin930 commented on code in PR #14440:
URL: https://github.com/apache/nuttx/pull/14440#discussion_r1809822502


##########
arch/sim/src/sim/CMakeLists.txt:
##########
@@ -288,4 +288,11 @@ endforeach()
 set(HOSTSRCS ${WINHOSTSRCS})
 
 target_sources(nuttx PRIVATE ${HOSTSRCS})
+
+get_target_property(HOST_COMPILE_OPTIONS nuttx COMPILE_OPTIONS)
+foreach(remove_item IN LISTS SIM_NO_HOST_OPTIONS)
+  list(REMOVE_ITEM HOST_COMPILE_OPTIONS ${remove_item})
+endforeach()
+set_target_properties(nuttx PROPERTIES COMPILE_OPTIONS
+                                       "${HOST_COMPILE_OPTIONS}")

Review Comment:
   ```suggestion
   nuttx_remove_compile_options(${SIM_NO_HOST_OPTIONS})
   ```



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] arch/sim/cmake: remove the host specific -U when HOSTSRCS. remove the bzero implement, use macro to memset. [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #14440:
URL: https://github.com/apache/nuttx/pull/14440


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org