настроить сборку ошибок GHC в Arch Linux - «ошибка добавления символов: неверное значение»

409
KarlC

Я собирал GHC, чтобы получить больше библиотек, чем при установке по умолчанию, которую дают репозитории Arch, но мне удалось сделать что-то с системой, что приводит к сбою первоначальной настройки на чистой копии источника:

:~/tmp$ tar -xvf ghc-7.10.2-src.tar.xz ... :~/tmp$ cd ghc-7.10.2 :~/tmp/ghc-7.10.2$ ./configure --prefix=`pwd`/inst checking for gfind... no checking for find... /usr/bin/find checking for sort... /usr/bin/sort checking for GHC Git commit id... given 0da488c4438d88c9252e0b860426b8e74b5fc9e8 checking for ghc... /usr/local/bin/ghc checking version of ghc... 7.10.2 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu Build platform inferred as: x86_64-unknown-linux Host platform inferred as: x86_64-unknown-linux Target platform inferred as: x86_64-unknown-linux GHC build : x86_64-unknown-linux GHC host : x86_64-unknown-linux GHC target : x86_64-unknown-linux configure: Building in-tree ghc-pwd /usr/bin/ld: utils/ghc-pwd/dist-boot/Main.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC utils/ghc-pwd/dist-boot/Main.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status configure: error: Building ghc-pwd failed 

Что я мог сделать с системой? Я могу только помнить, что делал sudo make install(до того, как решил, что я хочу установить пользовательский пользователь, как в командной строке выше), после того, как он был собран один раз, но ошибка - это ldошибка, а не ghcошибка ...

0

1 ответ на вопрос

0
KarlC

I was only looking in /usr/local/lib and /usr/local/bin for ghc stuff to purge, but it seems the make install actually installed things here:

/usr/local/haskell/ghc-7.10.2-x86_64 

After removing this directory and reinstalling the repo version of ghc, the configure error goes away. A useful command for me in finding this directory was:

sudo updatedb && (locate ghc | cut -f1-4 -d'/' | sort | uniq)