You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there are two sigwait system calls on Solaris/Illumos systems. One is the Solaris 2.5 version and the other a POSIX 1.c compatible version. The first one has just one argument and is incompatible to the second. However, in the current state the first gets imported by Nim and causes compilation errors.
Example
Trying to compile nimble or testament on OpenIndiana fails.
Current Output
Compilation aborts with
/export/home/user/.cache/nim/nimble_r/stdlib_net.nim.c:1813:39: error: too many arguments to function 'sigwait'
1813 | errX60gensym116X60gensym119_ = sigwait((&watchSetX60gensym116_), (&signalX60gensym116X60gensym119_));
Expected Output
Compilation succeeds.
Possible Solution
adding the following to the nimble.nim.cfg and testament.nim.cfg files solved the problem for these two programs:
This is however no general solution. One would have to enable the _POSIX_PTHREAD_SEMANTIC compile time option in lib/posix/posix.nim for Illumos/Solaris. However I don't know how to do that
Additional Information
The above has been tested on a recent OpenIndiana machine. If you can provide a possible fix, I can test and report back.
$ nim -v
Nim Compiler Version 1.6.0 [Solaris: amd64]
Compiled at 2021-10-22
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 727c6378d2464090564dbcd9bc8b9ac648467e38
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
Hello,
there are two sigwait system calls on Solaris/Illumos systems. One is the Solaris 2.5 version and the other a POSIX 1.c compatible version. The first one has just one argument and is incompatible to the second. However, in the current state the first gets imported by Nim and causes compilation errors.
Example
Trying to compile nimble or testament on OpenIndiana fails.
Current Output
Compilation aborts with
Expected Output
Compilation succeeds.
Possible Solution
adding the following to the nimble.nim.cfg and testament.nim.cfg files solved the problem for these two programs:
This is however no general solution. One would have to enable the
_POSIX_PTHREAD_SEMANTIC
compile time option in lib/posix/posix.nim for Illumos/Solaris. However I don't know how to do thatAdditional Information
The above has been tested on a recent OpenIndiana machine. If you can provide a possible fix, I can test and report back.
The text was updated successfully, but these errors were encountered: