这些是我得到的链接器错误:
happy-1.19.5: configure
cpphs-1.20.2: download
th-reify-many-0.1.6: download
time-qq-0.0.1.0: download
th-reify-many-0.1.6: configure
th-reify-many-0.1.6: build
time-qq-0.0.1.0: configure
time-qq-0.0.1.0: build
cpphs-1.20.2: configure
th-reify-many-0.1.6: copy/register
time-qq-0.0.1.0: copy/register
cpphs-1.20.2: build
cpphs-1.20.2: copy/register
Progress: 4/9
-- While building package happy-1.19.5 using:
/usr/local/bin/ghc --make -odir /tmp/stack1466/happy-1.19.5/.stack-work/dist/x86_64-freebsd/Cabal-1.22.4.0/setup -hidir /tmp/stack1466/happy-1.19.5/.stack-work/dist/x86_64-freebsd/Cabal-1.22.4.0/setup
-i -i. -package=Cabal-1.22.4.0 -clear-package-db -global-package-db -package-db=/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/pkgdb /tmp/stack1466/happy-1.19.5/Setup.lhs -o /tmp/stack1466/happy-1.1
9.5/.stack-work/dist/x86_64-freebsd/Cabal-1.22.4.0/setup/setup
Process exited with code: ExitFailure 1
Logs have been written to: /root/project-name/.stack-work/logs/happy-1.19.5.log
[1 of 1] Compiling Main ( /tmp/stack1466/happy-1.19.5/Setup.lhs, /tmp/stack1466/happy-1.19.5/.stack-work/dist/x86_64-freebsd/Cabal-1.22.4.0/setup/Main.o )
/tmp/stack1466/happy-1.19.5/Setup.lhs:20:1: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:21:1: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:22:1: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:68:1: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:74:1: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:81:19: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:82:23: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:83:26: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:84:26: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:85:30: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:86:33: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:87:32: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:88:36: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:89:39: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:94:14: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:99:13: Warning: Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:100:17: Warning:
Tab character
/tmp/stack1466/happy-1.19.5/Setup.lhs:101:23: Warning:
Tab character
Linking /tmp/stack1466/happy-1.19.5/.stack-work/dist/x86_64-freebsd/Cabal-1.22.4.0/setup/setup ...
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_rtldNext':
HsUnix.c:(.text+0x80): multiple definition of `__hsunix_rtldNext'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x0): first defined here
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_rtldDefault':
HsUnix.c:(.text+0x90): multiple definition of `__hsunix_rtldDefault'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x10): first defined here
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_ptsname':
HsUnix.c:(.text+0x130): multiple definition of `__hsunix_ptsname'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x20): first defined here
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_grantpt':
HsUnix.c:(.text+0x140): multiple definition of `__hsunix_grantpt'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x30): first defined here
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_unlockpt':
HsUnix.c:(.text+0x150): multiple definition of `__hsunix_unlockpt'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x40): first defined here
/usr/local/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/libHSunix-2.7.1.0-A3WgcI5QiHK4PDo4jSYdwQ.a(HsUnix.o): In function `__hsunix_push_module':
HsUnix.c:(.text+0x160): multiple definition of `__hsunix_push_module'
/root/.stack/snapshots/x86_64-freebsd/lts-7.14/7.10.2/lib/x86_64-freebsd-ghc-7.10.2/unix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS/libHSunix-2.7.2.0-3psvMyG1UoBJLXj9bF7fFS.a(HsUnix.o):(.text+0x50): first defined here
collect2: error: ld returned 1 exit status
找出链接器错误的内容。也许它很容易修复。也许在StackOverflow上询问它。 ;)任何想法是什么?
尝试找出我的项目使用Happy的哪个依赖项,看看我能不能使用它。我试图通过stack list-dependencies --depth=100
和stack dot --external
but neither of those helped me unfortunately来解决这个问题
我怎么能找出哪些直接依赖依赖它(可能是间接的)?
尝试说服stack
使用我能够通过happy
获得的系统级可用pkg install hs-happy
二进制文件。我怎么能这样做?
从Linux交叉编译FreeBSD。我是否正确怀疑如果我有交叉编译器,这可能不是问题?无论哪种方式,设置linux-> FreeBSD交叉编译器都会很困难吗?我怎么能这样做呢?
尝试远离需要FreeBSD。不幸的是,我的托管服务提供商目前只支持FreeBSD,我非常喜欢它们的其他原因(价格和相关理念的价值)。也许,如果所有其他方法都失败了,你能告诉我你的Haskell项目最喜欢的Linux托管服务提供商吗?
我怀疑选项#1或#3可能是最无痛的 或者你们中间还有其他想法吗?
答案 0 :(得分:0)
感谢@ user2407038和@Sibi评论中的指针,我设法从1.0.1升级到堆栈1.4.0,并将stack setup
升级为隔离的GHC。
happy
像魅力一样安装,现在一切都很好。