2016-10-16 16 views
0

Math::TrulyRandom(乱数ジェネレータと疑似乱数)をインストールしようとしたときにこの1人のアドバイスを聞いて、「dmake」を実行していました。別の質問。DmakeファイルでMath :: TrulyRandomモジュールのエラーが発生しました

私の最初の質問はhereです。ここで

は、端末に間違っていたものです:

C:\Users\Jlinne\Documents>     cpanm --prompt Math::TrulyRandom 
--> Working on Math::TrulyRandom 
Fetching http://www.cpan.org/authors/id/G/GA/GARY/Math-TrulyRandom-1.0.tar.gz ... OK 
Configuring Math-TrulyRandom-1.0 ... OK 
Building and testing Math-TrulyRandom-1.0 ... Building Math-TrulyRandom-1.0 failed. 
You can s)kip, r)etry, e)xamine build log, or l)ook ? [s] l 
Entering C:/Users/Jlinne/.cpanm/work/1476593741.7660/Math-TrulyRandom-1.0 with C:\WINDOWS\system32\cmd.exe 
Microsoft Windows [Version 10.0.14393] 
(c) 2016 Microsoft Corporation. All rights reserved. 

C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0>perl Makefile.PL 
Generating a dmake-style Makefile 
Writing Makefile for Math::TrulyRandom 
Writing MYMETA.yml and MYMETA.json 

C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0>dmake 
Skip blib\lib\Math\TrulyRandom.pm (unchanged) 
Skip blib\lib\Math\TrulyRandom.pod (unchanged) 
Running Mkbootstrap for Math::TrulyRandom() 
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "TrulyRandom.bs" 
gcc -c   -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" "-IC:\STRAWB~1\perl\lib\CORE" TrulyRandom.c 
gcc -c   -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2  -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" "-IC:\STRAWB~1\perl\lib\CORE" truerand.c 
truerand.c: In function 'tick': 
truerand.c:57:19: error: storage size of 'it' isn't known 
    struct itimerval it, oit; 
       ^
truerand.c:57:23: error: storage size of 'oit' isn't known 
    struct itimerval it, oit; 
        ^
truerand.c:62:16: error: 'ITIMER_REAL' undeclared (first use in this function) 
    if (setitimer(ITIMER_REAL, &it, &oit) < 0) 
       ^
truerand.c:62:16: note: each undeclared identifier is reported only once for each function it appears in 
truerand.c: In function 'interrupt': 
truerand.c:71:16: error: 'SIGALRM' undeclared (first use in this function) 
    (void) signal(SIGALRM, interrupt); 
       ^
truerand.c: In function 'roulette': 
truerand.c:86:16: error: 'SIGALRM' undeclared (first use in this function) 
    (void) signal(SIGALRM, interrupt); 
       ^
dmake: Error code 129, while making 'truerand.o' 

C:\Users\Jlinne\.cpanm\work\1476593741.7660\Math-TrulyRandom-1.0> 
+0

*「技術者がお手伝いできますか?」* ...真剣に! –

+1

@SinanÜnür:私は異論を理解しています。もちろん、ここのヘルパーは熱心に指示を待つ技術サポート部門ではありません。しかし、OPは、第1言語としての英語を持っていない可能性があり、誤った単語を選択した可能性があります。私はそのフレーズを編集しました。 – halfer

答えて

2

数学:: TrulyRandomは破壊され、(実際に、はないできる)を使用すべきではありません。

これは1996年に書かれたもので、その時点で存在していた特定のUNIXシステム(SunOS 4など)では正しく動作します。最近のLinuxシステムではランダムなデータを生成することができず、Windows上ではまったくコンパイルできません。

乱数ジェネレータが必要で、randがそれをカットしない場合は、別のモジュールを探します。例えば、Math::Random::SecureまたはCrypt::Randomである。

関連する問題