1
私はMinGW-w64を使用してXZ Utilsをコンパイルしようとしていましたが、make
を./configure
ingの後に実行しようとすると、sigset_t
は不明です。MinGW/MSYS2でXZ Utilsをコンパイルするときに不明なタイプ
XZ Utilsのバージョンは5.2.3、MinGW-w64はx86_64-7.2.0-posix-seh-rt_v5-rv1
です。
In file included from common/common.h:17:0,
from common/common.c:13:
../../src/common/mythread.h:138:33: error: unknown type name 'sigset_t'
mythread_sigmask(int how, const sigset_t *restrict set,
^~~~~~~~
../../src/common/mythread.h:139:3: error: unknown type name 'sigset_t'; did you mean '_sigset_t'?
sigset_t *restrict oset)
^~~~~~~~
_sigset_t
../../src/common/mythread.h: In function 'mythread_create':
../../src/common/mythread.h:158:2: error: unknown type name 'sigset_t'; did you mean '_sigset_t'?
sigset_t old;
^~~~~~~~
_sigset_t
../../src/common/mythread.h:159:2: error: unknown type name 'sigset_t'; did you mean '_sigset_t'?
sigset_t all;
^~~~~~~~
_sigset_t
../../src/common/mythread.h:160:2: warning: implicit declaration of function 'sigfillset' [-Wimplicit-function-declaration]
sigfillset(&all);
^~~~~~~~~~
../../src/common/mythread.h:162:2: warning: implicit declaration of function 'mythread_sigmask'; did you mean 'pthread_sigmask'? [-Wimplicit-function-declaration]
mythread_sigmask(SIG_SETMASK, &all, &old);
^~~~~~~~~~~~~~~~
pthread_sigmask
私はgcc -E - <<< "#include <signal.h>" | grep sigset_t
を使用してsigset_t
ためsignal.h
をチェックし、何も見つかりませんでした。今私はこれがMinGWの制限であるかどうか疑問に思っていました。
まだ、MinGWでこれを構築する方法はありますか? '-D_POSIX'を追加するだけで明らかにリンカエラーが発生するためです。私はMinGWへの参照を 'configure.ac'で見てきましたので、最低でも – FallenWarrior
というところがあります。インストールに関連する問題が見つかりました。どうやら、XZ UtilsはMinGWのインストール時に 'pthreads 'を持っていると仮定すると、POSIXの#defineが存在するかどうかをチェックせずに' sigset_t'を持つことを意味します。 – FallenWarrior
FIX: 'MYTHREAD_POSIX'と' HAVE_CLOCK_GETTIME'と 'HAVE_DECL_CLOCK_MONOTIC'の定義を解除しなければなりませんでした。 – FallenWarrior