소스에서 haskell ghc를 컴파일하려고합니다./usr /이 아닌 다른 폴더에서 cabal 구성을 구성하려고합니다. 처음부터 모든 패키지를 성공적으로 빌드 할 수 있습니다.ghc-pkg의 라이브러리 디렉토리를 변경하는 방법
어떤 시점에서 (cabal-install 패키지를 설치 한 후), cabal이 다른 "library-dirs"를 포함하도록 구성을 변경합니다. 그러면 뭔가 잘못된 것이 발생합니다 (아마도 cabal 구성의 "library-dirs"필드에 잘못된 문자열이 삽입되기 때문일 수 있습니다). 그래서, 나는 다시 설정 파일을 다시 구성하려고합니다 (심지어 구성 파일을 삭제하고 ghc 패키지 캐시를 정리하려고 시도합니다). 그리고 "library-dirs"필드에 주석을 달았지만 여전히 실패합니다. 또한 cabal 패키지 디렉토리 (cabal이 패키지에 대한 캐시를 저장하는 디렉토리)를 제거하려고 이미 시도했습니다. "GHC-PKG 검사"를 사용하는 경우
이 출력입니다 :
sudo -E cabal --config-file=/opt/haskell/config/config install hashable -O2 --global --flags="-fllvm" --prefix=/opt/haskell 2>error --upgrade-dependencies --reinstall
Resolving dependencies...
Configuring hashable-1.2.1.0...
Building hashable-1.2.1.0...
Failed to install hashable-1.2.1.0
Last 10 lines of the build log (/{stripped}/hashable-1.2.1.0.log):
Data/Hashable/Class.hs:100:15: Warning:
Literal 15868100553162883236 is out of the Int range -9223372036854775808..9223372036854775807
[2 of 3] Compiling Data.Hashable.Generic (Data/Hashable/Generic.hs, dist/build/Data/Hashable/Generic.o)
Data/Hashable/Generic.hs:20:1: Warning:
The import of ‛Bits’ from module ‛Data.Bits’ is redundant
[3 of 3] Compiling Data.Hashable (Data/Hashable.hs, dist/build/Data/Hashable.o)
/usr/bin/ld: cannot find {stripped}: No such file or directory
collect2: error: ld returned 1 exit status
: 나는 Setup.hs에서 수동 음모 또는를 사용하여 패키지를 만들 때
Warning: library-dirs: {stripped} doesn't exist or isn't a directory
이 지금의 출력입니다 이것은 cabal 구성 파일입니다 (기본값은 제거됩니다) (기본값은 제거됩니다)
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
remote-repo-cache: /opt/haskell/cabal
world-file: /opt/haskell/cabal/world
extra-prog-path: /opt/haskell/cabal/bin
build-summary: /opt/haskell/cabal/logs/build.log
remote-build-reporting: anonymous
jobs: $ncpus
install-dirs global
prefix: /opt/haskell/
누구든지 나를 도울 수 있습니다. r 가이드? 또는 적어도 ghc가 실제로 제거 된 패키지의 "library-dirs"구성 정보를 저장하는 위치를 알려주십시오.
cabal -V
cabal-install version 1.18.0.2
using version 1.18.1.3 of the Cabal library
ghc -v
The Glorious Glasgow Haskell Compilation System, version 7.9.20140206
감사합니다.