首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dmake文件错误与数学::

Dmake文件错误与数学::
EN

Stack Overflow用户
提问于 2016-10-16 14:01:00
回答 1查看 119关注 0票数 0

当我尝试安装数学::特鲁兰登 (随机数生成器与伪随机)时,我听取了这个人的建议,我运行的是'dmake‘,他告诉我关于另一个问题的错误。

我的第一个问题是这里

以下是航站楼出了什么问题:

代码语言:javascript
复制
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>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-10-16 16:32:22

数学::特鲁伊-兰登被破坏了,不应该(确实不能)使用。

它是在1996年编写的,只在当时存在的某些UNIX系统(如SunOS 4)上正确工作。它无法在现代Linux系统上生成随机数据,也无法在Windows上编译。

如果您需要一个随机数生成器,而rand不会切断它,请查找另一个模块。例如,数学::随机::安全地窖::随机

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40071148

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档