2011-11-28 12 views
7

मैं haskell readline library wrapper को c readline library पर संदर्भित कर रहा हूं।मैक ओएसएक्स पर हैकसेल रीडलाइन लाइब्रेरी कैसे स्थापित करें?

cabal install readline नीचे उत्पादन:

$ cabal install readline 
Resolving dependencies... 
Configuring readline-1.0.1.0... 
checking for gcc... gcc 
checking for C compiler default output file name... a.out 
checking whether the C compiler works... yes 
checking whether we are cross compiling... no 
checking for suffix of executables... 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether gcc accepts -g... yes 
checking for gcc option to accept ISO C89... none needed 
checking for GNUreadline.framework... checking for readline... no 
checking for tputs in -lncurses... yes 
checking for readline in -lreadline... yes 
checking for rl_readline_version... yes 
checking for rl_begin_undo_group... no 
configure: error: readline not found, so this package cannot be built 
See `config.log' for more details. 
cabal: Error: some packages failed to install: 
readline-1.0.1.0 failed during the configure step. The exception was: 
ExitFailure 1 

मैं macports (sudo port install readline का प्रयोग करके) के माध्यम से स्थापित ग ReadLine पुस्तकालय है, लेकिन मैं अब भी वही त्रुटि Haskell ReadLine पुस्तकालय इंस्टॉल करते समय मिलता है।

+0

http://www.haskell.org/cabal/FAQ.html – tekknolagi

+0

आप 'port' साथ' readline' स्थापित किया है तो क्यों आप कोशिश करते हैं और 'cabal' साथ इसे स्थापित करने की जरूरत है? – tekknolagi

+1

'readline' c लाइब्रेरी पोर्ट के साथ स्थापित है, लेकिन मैं' readline' हैकेल लाइब्रेरी इंस्टॉल नहीं कर सकता। मैंने स्पष्ट करने के लिए सवाल स्पष्ट कर दिया है। –

उत्तर

20

अपने MacPorts स्थापना भी इंस्टॉल किया फ़ाइलों के लिए डिफ़ॉल्ट पथ का उपयोग करता है, यह निर्दिष्ट जहां सी हेडर और पुस्तकालयों के लिए देखने के लिए प्रयास करें:

cabal install readline --extra-include-dirs=/opt/local/include \ 
--extra-lib-dirs=/opt/local/lib 

अद्यतन 2x: जीएनयू ReadLine के साथ अपने मशीन Homebrew बल्कि के माध्यम से स्थापित पर मैकपॉर्ट्स की तुलना में, यह configure स्क्रिप्ट जैसा हैस्कल readline लाइब्रेरी के लिए कुछ गैर-मानक झंडे की आवश्यकता होती है ताकि यह ठीक से बीयरिंग ढूंढ सके। ऊपर काम नहीं करता है, इस प्रयास करें:

cabal install readline --extra-include-dirs=/opt/local/include \ 
--extra-lib-dirs=/opt/local/lib \ 
--configure-option=--with-readline-includes=/opt/local/include \ 
--configure-option=--with-readline-libraries=/opt/local/lib 
+3

धन्यवाद, मुझे यह काम मिल गया। मैंने कमांड का उपयोग किया: 'सुडो पोर्ट रीडलाइन स्थापित करने के लिए रीडलाइन + सार्वभौमिक' स्थापित करें, और कमांड 'कैबल इंस्टॉल रीडलाइन --extra-include-dirs =/opt/local/include --extra-lib-dirs =/opt/local/lib --configure-option = - with-readline-include =/opt/local/include --configure-option = - with-readline-libraries =/opt/local/lib' हैकेल रीडलाइन लाइब्रेरी को स्थापित करने के लिए। –

+0

बेशक; एक बार 'कॉन्फ़िगरेशन' चलाने के बाद इसे वास्तव में लिंक करने की आवश्यकता होती है। – acfoltzer

+9

कमांड के अंतिम मुंह को प्रतिबिंबित करने के लिए अपडेट किया गया है, रीडलाइन फॉर्मूला केवल keg है, इसलिए मुझे keg के लिए पूरा पथ जोड़ना था: 'कैबल इंस्टॉल रीडलाइन --extra-include-dirs =/usr/local/cellar/readline /6.2.4/include/ --extra-lib-dirs =/usr/local/cellar/readline/6.2.4/lib/--configure-option = - with-readline-include =/usr/local/cellar /readline/6.2.4/include/ --configure विकल्प = -/ReadLine/6.2.4/lib/' – liborw

1

मैं यहाँ http://fp.okeefecreations.com/2010/08/installing-haskell-bindings-to-readline.html क्रम में निर्देशों का पालन यह ReadLine के अपने homebrew स्थापना पर काम कर पाने के लिए समाप्त हो गया। मुझे केवल एक ही संशोधन करना था जो पथ में सूचीबद्ध रीडलाइन के संस्करण को समायोजित करना था।

मैं जानता हूँ कि इस के acfoltzer लिए एक समान समाधान है, लेकिन मैं वहाँ एक टिप्पणी जोड़ने के लिए या तो मैं बस को समझ नहीं सकता कैसे टिप्पणी करने के लिए प्रतिनिधि नहीं है। :)

+1

$ कैबल इंस्टॉल रीडलाइन - कॉन्फ़िगरेशन-विकल्प = - साथ-रीडलाइन-लाइब्रेरीज़ = "/ usr/local/cellar/readline/6.2.4/lib" --configure-option = - with-readline-include = " /usr/local/Cellar/readline/6.2.4/include "नवीनतम –

+0

आपके उत्तर में लिंक टूटा हुआ है। –

संबंधित मुद्दे