Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake SINGLE_THREADED not WOLFSSL_SINGLE_THREADED #6606

Closed
wants to merge 1 commit into from

Conversation

gojimmypi
Copy link
Contributor

Description

As @douzzer pointed out: there's no WOLFSSL_SINGLE_THREADED.

This update changes the root level CMakeFiles.txt to instead check SINGLE_THREADED.

There are probably more places here and in other repos that may need PTHREAD attention.

See also #6536 and #6549.

This change has already been applied in #6600.

Fixes zd# n/s

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gojimmypi gojimmypi added the bug label Jul 12, 2023
@gojimmypi gojimmypi self-assigned this Jul 12, 2023
@@ -247,7 +247,7 @@ add_option("WOLFSSL_SINGLE_THREADED"
"no" "yes;no")

# TODO: Logic here isn't complete, yet (see AX_PTHREAD)
if(NOT WOLFSSL_SINGLE_THREADED)
if(NOT SINGLE_THREADED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the pre-processor this is the CMake argument. See add_option("WOLFSSL_SINGLE_THREADED" at 245. There is no issue here...
Screen Shot 2023-07-12 at 2 59 20 PM
Please close PR.

@gojimmypi gojimmypi mentioned this pull request Jul 12, 2023
4 tasks
@gojimmypi gojimmypi closed this Jul 12, 2023
@gojimmypi
Copy link
Contributor Author

@dgarske do you have a Windows box to test on? From the current master branch, I am still seeing this CMake error:

C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6180,9): warning C4013: 'pthread_mutex_lock' undefined; assuming extern returning int [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6180,9): error C2039: 'mutex': is not a member of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\wolfssl/test.h(533,16): message : see declaration of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6182,9): warning C4013: 'pthread_cond_signal' undefined; assuming extern returning int [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6182,9): error C2039: 'cond': is not a member of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\wolfssl/test.h(533,16): message : see declaration of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6183,9): warning C4013: 'pthread_mutex_unlock' undefined; assuming extern returning int [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6183,9): error C2039: 'mutex': is not a member of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\wolfssl/test.h(533,16): message : see declaration of 'tcp_ready' [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]
C:\workspace\wolfssl-gojimmypi-bandi13\tests\api.c(6328,29): warning C4242: 'function': conversion from 'SOCKET' to 'int', possible loss of data [C:\workspace\wolfssl-gojimmypi-bandi13\out\unit_test.vcxproj]

This Visual Studio hover text may provide more insight: (see test.h)

image

No such error occurs for Linux CMake.

I'm thinking perhaps there needs to be some conditional gating in / around the PTHREAD_CHECK_RET definition. Do you agree?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants