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

[I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

shikoumuzi opened a new issue, #12127:
URL: https://github.com/apache/nuttx/issues/12127

   when i use cmake -B build -DBOARD_CONFIG=sim:libcxxtest
   it can not compile
   ![image](https://github.com/apache/nuttx/assets/98224466/88565164-17aa-45ef-af28-9a1c96895559)
   but when i use make to build sim libcxxtest, it is running properly
   what can i do to solve this problem, thanks
   


-- 
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.apache.org

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


Re: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "xuxin930 (via GitHub)" <gi...@apache.org>.
xuxin930 commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2056865220

   
   > I haven't had a chance to look for the cause of this problem yet. I'm not sure if this problem only occurs for me on arch linux
   
   hi @raiden00pl 
   there are two errors:
   1. the toolchain file is not synchronized and is lagging behind. I will update it first.
   2. CMake `set_source_files_properties` does not perform append, but replaces. 😔
   
   regarding the second one, I have implemented `nuttx_set_source_files_properties` instead of `set_source_files_properties` and will submit a batch of bugfixes tomorrow.
   
   


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "xuxin930 (via GitHub)" <gi...@apache.org>.
xuxin930 commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051512036

   > I haven't had a chance to look for the cause of this problem yet. I'm not sure if this problem only occurs for me on arch linux
   
   Okay, let me check the toolchain file settings and compile otpions settings again.
   


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051263298

   @xuxin930 could you check why cmake is different from make?


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051474749

   @xuxin930 good find. 
   
   Another problem I have with this configuration (and with libcxx in general) is a lot of warnings during compilation.
   It looks like compiler flags from here doesn't work: https://github.com/apache/nuttx/blob/62a47994090860b8daea0ab61121bcbcd4448ff1/libs/libxx/libcxx.cmake#L99-L124 
   I haven't had a chance to look for the cause of this problem yet. I'm not sure if this problem only occurs for me on arch linux
   


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "xuxin930 (via GitHub)" <gi...@apache.org>.
xuxin930 commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051432820

   hi @raiden00pl @xiaoxiang781216 
   my guess is that the redefined symbols for sim in cmake do not have an `if block`.
   let me fix it
   
   https://github.com/apache/nuttx/blob/62a47994090860b8daea0ab61121bcbcd4448ff1/arch/sim/src/nuttx-names.in#L99-L112
   https://github.com/apache/nuttx/blob/62a47994090860b8daea0ab61121bcbcd4448ff1/cmake/nuttx_redefine_symbols.cmake#L78-L94


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2056935884

   @xuxin930 great ! thanks for solving the issues


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "shikoumuzi (via GitHub)" <gi...@apache.org>.
shikoumuzi commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051239325

   > you have to set CONFIG_TLS_NELEM > 0 . It's strange that this problem doesn't occur for make.
   
   thank you for your reply,That's a good way for me to solve the problem  
   
   I found that whatever macro definition "in thread.h" encapsulates a layer of "pthread_key_", "tss_key" and other TLS-related functions. It's strange why make can exclude these functions, but cmake can't


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "raiden00pl (via GitHub)" <gi...@apache.org>.
raiden00pl commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2049725709

   you have to set CONFIG_TLS_NELEM > 0 . It's strange that this problem doesn't occur for make.


-- 
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: [I] When i use cmake to build sim:libcxxtest, it display undefined reference to `NXpthread_setspecific' [nuttx]

Posted by "xuxin930 (via GitHub)" <gi...@apache.org>.
xuxin930 commented on issue #12127:
URL: https://github.com/apache/nuttx/issues/12127#issuecomment-2051272902

   > @xuxin930 could you check why cmake is different from make?
   
   sure, I'm working on it


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