Установите happstack-server 6.5.3 на osx - отсутствует libcryptopp - PullRequest
5 голосов
/ 26 января 2012

Я пытаюсь установить последний сервер happstack на osx. Они просто добавили зависимость от libcryptopp, и я не могу заставить ее работать.

~$ cabal install happstack-server
Resolving dependencies...
Configuring happstack-server-6.5.3...
cabal: Missing dependency on a foreign library:
* Missing C library: cryptopp
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
happstack-server-6.5.3 failed during the configure step. The exception was:
ExitFailure 1

Итак, я устанавливаю libcryptopp с macports, который помещает libcryptopp.a в / opt / local / lib

sudo port install libcryptopp

Затем я снова устанавливаю happstack-server с помощью --extra-lib-dirs

cabal install happstack-server --extra-lib-dirs=/opt/local/lib

Устанавливается нормально, кажется, все работает, пока я на самом деле не запустил сервер happstack.

~$ runhaskell Hello.hs
Hello.hs: <command line>: can't load .so/.DLL for: libcryptopp.dylib (dlopen(libcryptopp.dylib, 9): image not found)

Что я делаю не так? Или это ошибка с happstack? У меня даже нет .dylib после установки библиотеки через macports, только .a. ghc --make Hello.hs еще безумнее

Ответы [ 2 ]

7 голосов
/ 03 февраля 2012

Как насчет:

g++ -fpic -nostartfiles -nostdlib -shared /usr/local/Cellar/cryptopp/5.6.1/lib/libcryptopp.a -o libcryptopp.dylib

2 голосов
/ 28 января 2012

в качестве метода перебора. Вы можете отключить флаг https в файле .cabal happstack-server:

file: happstack-server.cabal :

Flag https
    Default: False

настроить / собрать / установить happstack-server вручную, их cabal install happstack.


(я использую Archlinux, --extra-lib-dirs даже не работает!)

...