[CONC-521] ucontext not detected on macOS with Apple Silicon Created: 2021-01-09 Updated: 2021-06-14 Resolved: 2021-01-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | 3.1.11 |
| Fix Version/s: | 3.2.0, 3.1.12 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Evan Miller | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
macOS 11.1 |
||
| Description |
|
The non-blocking functions on non-x86 architectures require ucontext. However, ucontext is not properly detected on Apple Silicon systems because _XOPEN_SOURCE must be set in order to expose makecontext to the compiler. The error log indicates: {{ Run Build Command(s):/Library/Developer/CommandLineTools/usr/bin/make cmTC_b1c76/fast && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTC_b1c76.dir/build.make CMakeFiles/cmTC_b1c76.dir/build The message states that the ucontext functions are deprecated. However, in my testing the functions do work on Apple Silicon systems, and they are the only way to enable MYSQL_OPT_NONBLOCK on those machines. I will open a pull request on GitHub with the changes that I suggest. |
| Comments |
| Comment by Evan Miller [ 2021-01-09 ] |
|
Pull request: https://github.com/mariadb-corporation/mariadb-connector-c/pull/152 |
| Comment by Georg Richter [ 2021-01-21 ] |
|
Fixed. Kudos to Even Miller for providing the fix |