2015-01-21 4 views
5
$ ocaml -version 
The OCaml toplevel, version 4.02.1 
$ opam --version 
1.2.0 
$ opam init 
$ opam install core 

#=== ERROR while installing camlp4.4.02.1+system ==============================# 
# opam-version 1.2.0 
# os   linux 
# command  sh ./check-camlp4.sh 
# path   /home/john/.opam/system/build/camlp4.4.02.1+system 
# compiler  system (4.02.1) 
# exit-code 1 
# env-file  /home/john/.opam/system/build/camlp4.4.02.1+system/camlp4-32324-f0f09f.env 
# stdout-file /home/john/.opam/system/build/camlp4.4.02.1+system/camlp4-32324-f0f09f.out 
# stderr-file /home/john/.opam/system/build/camlp4.4.02.1+system/camlp4-32324-f0f09f.err 
### stdout ### 
# ...[truncated] 
# 4.02 by switching to a local installation via `opam switch 4.02.1`. 
# 
# Here are some installation instructions for camlp4 if you obtained OCaml 
# via the OPAM binary packages: 
# 
# http://software.opensuse.org/download.html?project=home%3Aocaml&package=ocaml 
# 
# * Debian/Ubuntu: sudo apt-get install camlp4-extra 
# * RHEL/CentOS/Fedora: sudo yum install ocaml-camlp4 
# 
### stderr ### 
# ./check-camlp4.sh: line 3: camlp4orf: command not foun 

मैंने हाँopam init के दौरान स्वत: पूर्ण स्क्रिप्ट प्रश्नों के उत्तर दिए। इसके अलावा, त्रुटि का छोटा हिस्सा निम्न का सुझाव देता है:मैं ओकैम कोर लाइब्रेरी (आर्क) लिनक्स x86_64 पर कैसे स्थापित करूं?

कृपया camlp4 का एक सिस्टम-व्यापी संस्करण स्थापित करें। यह आवश्यक है क्योंकि आप ओकैम 4.02.1 का उपयोग कर रहे हैं और सिस्टम कंपाइलर स्विच ( स्क्रैच से संकलित करने के बजाय अपनी पूर्ववर्ती स्थापना का उपयोग करता है)।

आप एक सिस्टम-वाइड camlp4 स्थापित नहीं कर सकता है, तो आप अभी भी OCaml 4.02 एक स्थानीय स्थापना में स्विच करके opam switch 4.02.1

# pacman -S camlp4 
$ opam install camlp4 
$ opam info camlp4 
      package: camlp4 
      version: 4.02.1+system 
     repository: default 
      homepage: https://github.com/ocaml/camlp4 
      license: LGPLv2 
    installed-version: 4.02.1+system [system] 

एक बार फिर ...

$ opam install core 

#=== ERROR while installing herelib.109.35.02 =================================# 
# opam-version 1.2.0 
# os   linux 
# command  make 
# path   /home/john/.opam/system/build/herelib.109.35.02 
# compiler  system (4.02.1) 
# exit-code 2 
# env-file  /home/john/.opam/system/build/herelib.109.35.02/herelib-31366-c61e7b.env 
# stdout-file /home/john/.opam/system/build/herelib.109.35.02/herelib-31366-c61e7b.out 
# stderr-file /home/john/.opam/system/build/herelib.109.35.02/herelib-31366-c61e7b.err 
### stdout ### 
# ...[truncated] 
# ocamlfind ocamlopt -shared -linkall lib/herelib.cmxa -o lib/herelib.cmxs 
# ocamlfind ocamldep -syntax camlp4o -package camlp4.extend -package camlp4.quotations -package camlp4.lib -modules lib/pa_here.mli > lib/pa_here.mli.depends 
# ocamlfind ocamlc -c -g -syntax camlp4o -package camlp4.extend -package camlp4.quotations -package camlp4.lib -I lib -o lib/pa_here.cmi lib/pa_here.mli 
# + ocamlfind ocamlc -c -g -syntax camlp4o -package camlp4.extend -package camlp4.quotations -package camlp4.lib -I lib -o lib/pa_here.cmi lib/pa_here.mli 
# File "lib/pa_here.mli", line 1: 
# Error: The files /usr/lib/ocaml/pervasives.cmi 
#  and /usr/lib/ocaml/camlp4/Camlp4.cmi make inconsistent assumptions 
#  over interface Pervasives 
# Command exited with code 2. 
# Makefile:21: recipe for target 'build' failed 
### stderr ### 
# File "setup.ml", line 232, characters 8-26: 
# Warning 3: deprecated: String.set 
# Use Bytes.set instead. 
# File "setup.ml", line 2385, characters 6-24: 
# Warning 3: deprecated: Lazy.lazy_from_fun 
# Use Lazy.from_fun instead. 
# E: Failure("Command ''/usr/bin/ocamlbuild' lib/herelib.cma lib/herelib.cmxa lib/herelib.a lib/herelib.cmxs lib/pa_herelib.cma lib/pa_herelib.cmxa lib/pa_here 
lib.a lib/pa_herelib.cmxs -use-ocamlfind -tag debug' terminated with error code 10") 
# make: *** [build] Error 1 
के माध्यम से उपयोग कर सकते हैं

क्या मुझे एक अलग कंपाइलर पर स्विच करने की आवश्यकता है?

$ opam switch 
system C system System compiler (4.02.1) 
--  -- 3.11.2 Official 3.11.2 release 
--  -- 3.12.1 Official 3.12.1 release 
--  -- 4.00.0 Official 4.00.0 release 
--  -- 4.00.1 Official 4.00.1 release 
--  -- 4.01.0 Official 4.01.0 release 
--  -- 4.02.0 Official 4.02.0 release 
--  -- 4.02.1 Official 4.02.1 release 

उत्तर

5

आपको सिस्टम कंपाइलर से ओपेम के लिए स्विच करना चाहिए। फिर कंपाइलर के स्रोतों को स्वचालित रूप से डाउनलोड और संकलित किया जाएगा साथ ही साथ सभी शर्त भी।

opam switch 4.02.1 

के बजाय 4.02.1 आप निश्चित रूप से किसी भी उपलब्ध संकलक का उपयोग कर सकते हैं: क्रम स्विच करने के लिए, निम्न आदेश का उपयोग।

वास्तविक त्रुटि यह है कि किसी कारण से (मुझे लगता है कि रोलिंग रिलीज मॉडल के कारण) आपके पास camlp4 और ओकैमल कंपाइलर के विभिन्न संस्करण हैं, ताकि वे एक दूसरे से बात नहीं कर सकें।

+0

मैंने देखा कि camlp4 पैकेज अनाथ है, जो दुर्भाग्यपूर्ण है क्योंकि यह आधिकारिक भंडार में है। – metabind

+0

camlp4 को बहिष्कृत किया जा रहा है क्योंकि इसे पीपीएक्स द्वारा प्रतिस्थापित किया जा रहा है। – nlucaroni

+0

इसे बहिष्कृत नहीं किया गया है, और इसे पीपीएक्स द्वारा प्रतिस्थापित नहीं किया गया है। पीपीएक्स और camlp4 में कुछ चौराहे हैं, लेकिन वे पूरी तरह से अलग उपकरण हैं। – ivg

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