作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 cabal 1.20 安装在 beaglebone black rev c(带有 debian wheezy arm)上。它在 cabal install cabal-install
后期失败了和:
[75 of 76] Compiling Distribution.Client.Sandbox ( Distribution/Client/Sandbox.hs, dist/build/cabal/cabal-tmp/Distribution/Client/Sandbox.o )
[76 of 76] Compiling Main ( Main.hs, dist/build/cabal/cabal-tmp/Main.o )
Linking dist/build/cabal/cabal ...
/usr/lib/ghc/libHSrts.a(OSThreads.o): In function `getNumberOfProcessors':
(.text+0x8): multiple definition of `getNumberOfProcessors'
dist/build/cabal/cabal-tmp/cbits/getnumcores.o:getnumcores.c:(.text+0x0): first defined here
collect2: ld returned 1 exit status
cabal: Error: some packages failed to install:
cabal-install-1.20.0.3 failed during the building phase. The exception was:
ExitFailure 1
getNumberOfProcesses
已经定义(这将解释碰撞):
root@doghouse:/# nm /usr/lib/ghc/libHSrts.a | grep -B 3 Processors
nm: Disassembler.o: no symbols
nm: FrontPanel.o: no symbols
nm: LdvProfile.o: no symbols
U getAllocations
U getFullProgArgv
U getGCStats
U getNumberOfProcessors
nm: OldARMAtomic.o: no symbols
nm: Papi.o: no symbols
nm: Profiling.o: no symbols
nm: RetainerProfile.o: no symbols
nm: RetainerSet.o: no symbols
nm: RtsDllMain.o: no symbols
nm: Trace.o: no symbols
nm: 0Hash.o: no symbols
nm: 0Unpack.o: no symbols
nm: Dist.o: no symbols
nm: Global.o: no symbols
nm: GranSim.o: no symbols
nm: HLComms.o: no symbols
nm: LLComms.o: no symbols
nm: Pack.o: no symbols
nm: ParInit.o: no symbols
nm: ParTicky.o: no symbols
nm: Parallel.o: no symbols
nm: ParallelDebug.o: no symbols
nm: RBH.o: no symbols
nm: Sanity.o: no symbols
nm: EventLog.o: no symbols
--
OSThreads.o:
00000000 T forkOS_createThread
00000008 T getNumberOfProcessors
最佳答案
我在运行 Raspbian 的 Raspberry Pi 上遇到了类似的问题。
为了解决这个问题,我修补了 cabal-install.cabal
添加 -DHAS_GET_NUMBER_OF_PROCESSORS
到 cc-options
如 mentioned here .
关于haskell - `getNumberOfProcessors` 与 cabal-install 停止联动的多重定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24847576/
我是一名优秀的程序员,十分优秀!