2016-02-11 2 views
0

Под OS X, OCaml работает отлично, но под Linux (Ubuntu 14.04 LTS), он возвращает следующую ошибку:Освобожденный модуль ядра

zsh-5.0% ocaml 
     OCaml version 4.02.1 

Findlib has been successfully loaded. Additional directives: 
    #require "package";;  to load a package 
    #list;;     to list the available packages 
    #camlp4o;;    to load camlp4 (standard syntax) 
    #camlp4r;;    to load camlp4 (revised syntax) 
    #predicates "p,q,...";; to set these predicates 
    Topfind.reset();;   to force that packages will be reloaded 
    #thread;;     to enable threads 

/home/cacilhas/.opam/4.02.1/lib/ocaml/dynlink.cma: loaded 
/home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4: added to search path 
/home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4/camlp4o.cma: loaded 
Cannot find file /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4/camlp4o.cma. 
/home/cacilhas/.opam/4.02.1/lib/ocaml/threads: added to search path 
/home/cacilhas/.opam/4.02.1/lib/ocaml/unix.cma: loaded 
/home/cacilhas/.opam/4.02.1/lib/ocaml/threads/threads.cma: loaded 
No such package: core.top 
No such package: core.syntax 
File ".ocamlinit", line 13, characters 5-13: 
Error: Unbound module Core 

Эти линии должны быть выделены:

No such package: core.top 
No such package: core.syntax 

Любой идеи?


В соответствии с требованиями Какаду, вот мой .ocamlinit:

zsh-5.0% cat .ocamlinit 
(* Added by OPAM. *) 
let() = 
    try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") 
    with Not_found ->() 
;; 

#use "topfind";; 
#camlp4o;; 
#thread;; 
#require "core.top";; 
#require "core.syntax";; 

open Core.Std;; 

Выход query core является:

zsh-5.0% ocamlfind query core 
ocamlfind: Package `core' not found 

Update:

Попытка установить core (OCaml 4.02.1):

zsh-5.0% opam install core   
The following actions will be performed: 
    ∗ install ounit    2.0.0   [required by pa_ounit] 
    ∗ install type_conv   112.01.02  [required by comparelib, bin_prot, pa_structural_sexp] 
    ∗ install pipebang   110.01.00  [required by core] 
    ∗ install herelib   112.35.00  [required by core] 
    ∗ install variantslib  109.15.03  [required by core] 
    ∗ install sexplib   112.35.00  [required by core] 
    ∗ install pa_ounit   112.35.00  [required by core] 
    ∗ install fieldslib   109.20.03  [required by core] 
    ∗ install enumerate   111.08.00  [required by core] 
    ∗ install comparelib   109.60.00  [required by core] 
    ∗ install bin_prot   112.35.00  [required by core] 
    ∗ install pa_structural_sexp 112.35.00  [required by core] 
    ∗ install pa_bench   112.06.00  [required by core] 
    ∗ install custom_printf  112.24.00  [required by core] 
    ∗ install pa_test   112.24.00  [required by core] 
    ∗ install typerep   112.35.00  [required by core_kernel] 
    ∗ install core_kernel  112.35.00  [required by core] 
    ∗ install core    112.35.01 
===== ∗ 18 ===== 
Do you want to continue ? [Y/n] y 

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
[bin_prot] Archive in cache 
[comparelib] Archive in cache 
[core] Archive in cache 
[core_kernel] Archive in cache 
[custom_printf] Archive in cache 
[enumerate] Archive in cache 
[fieldslib] Archive in cache 
[herelib] Archive in cache 
[ounit] Archive in cache 
[pa_bench] Archive in cache 
[pa_ounit] Archive in cache 
[pa_structural_sexp] Archive in cache 
[pa_test] Archive in cache 
[pipebang] Archive in cache 
[sexplib] Archive in cache 
[type_conv] Archive in cache 
[typerep] Archive in cache 
[variantslib] Archive in cache 

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
[ERROR] The compilation of herelib failed at "make". 
[ERROR] The compilation of pipebang failed at "make". 
[ERROR] The compilation of type_conv failed at "make". 
[ERROR] The compilation of ounit failed at "make build". 
Processing 13/18: [ounit: ocamlfind remove] 
#=== ERROR while installing herelib.112.35.00 =================================# 
# opam-version 1.2.2 
# os   linux 
# command  make 
# path   /home/cacilhas/.opam/4.02.1/build/herelib.112.35.00 
# compiler  4.02.1 
# exit-code 2 
# env-file  /home/cacilhas/.opam/4.02.1/build/herelib.112.35.00/herelib-29247-e4db2f.env 
# stdout-file /home/cacilhas/.opam/4.02.1/build/herelib.112.35.00/herelib-29247-e4db2f.out 
# stderr-file /home/cacilhas/.opam/4.02.1/build/herelib.112.35.00/herelib-29247-e4db2f.err 
### stdout ### 
# [...] 
# Compiler support generation of .cmxs.: ............... true 
# OCamlbuild additional flags: ......................... 
# Create documentations: ............................... true 
# Compile tests executable and library and run them: ... false 
# camlp4o: ............................................. /home/cacilhas/.opam/4.02.1/bin/camlp4o 
# pkg_camlp4_lib: ...................................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# pkg_camlp4_quotations: ............................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# pkg_camlp4_extend: ................................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# 
# ./setup.exe -build 
### stderr ### 
# E: Invalid_argument("bool_of_string") 
# make: ** [build] Erro 1 


#=== ERROR while installing ounit.2.0.0 =======================================# 
# opam-version 1.2.2 
# os   linux 
# command  make build 
# path   /home/cacilhas/.opam/4.02.1/build/ounit.2.0.0 
# compiler  4.02.1 
# exit-code 2 
# env-file  /home/cacilhas/.opam/4.02.1/build/ounit.2.0.0/ounit-29247-2dea01.env 
# stdout-file /home/cacilhas/.opam/4.02.1/build/ounit.2.0.0/ounit-29247-2dea01.out 
# stderr-file /home/cacilhas/.opam/4.02.1/build/ounit.2.0.0/ounit-29247-2dea01.err 
### stdout ### 
# [...] 
# Turn ocaml profile flag on: .......................... /home/cacilhas/bin/profile 
# Compiler support generation of .cmxs.: ............... true 
# OCamlbuild additional flags: ......................... 
# Create documentations: ............................... true 
# Compile tests executable and library and run them: ... false 
# pkg_unix: ............................................ /home/cacilhas/.opam/4.02.1/lib/ocaml 
# pkg_threads: ......................................... /home/cacilhas/.opam/4.02.1/lib/ocaml 
# ocamldoc: ............................................ /home/cacilhas/.opam/4.02.1/bin/ocamldoc 
# 
# ocaml setup.ml -build 
### stderr ### 
# [...] 
# Warning 3: deprecated: Lazy.lazy_from_fun 
# Use Lazy.from_fun instead. 
# File "/home/gildor/programmation/oasis/src/oasis/OASISString.ml", line 118, characters 8-26: 
# Warning 3: deprecated: String.set 
# Use Bytes.set instead. 
# File "/home/gildor/programmation/oasis/src/oasis/OASISFindlib.ml", line 256, characters 6-24: 
# Warning 3: deprecated: Lazy.lazy_from_fun 
# Use Lazy.from_fun instead. 
# E: Invalid_argument("bool_of_string") 
# make: ** [build] Erro 1 


#=== ERROR while installing pipebang.110.01.00 ================================# 
# opam-version 1.2.2 
# os   linux 
# command  make 
# path   /home/cacilhas/.opam/4.02.1/build/pipebang.110.01.00 
# compiler  4.02.1 
# exit-code 2 
# env-file  /home/cacilhas/.opam/4.02.1/build/pipebang.110.01.00/pipebang-29247-ad6566.env 
# stdout-file /home/cacilhas/.opam/4.02.1/build/pipebang.110.01.00/pipebang-29247-ad6566.out 
# stderr-file /home/cacilhas/.opam/4.02.1/build/pipebang.110.01.00/pipebang-29247-ad6566.err 
### stdout ### 
# [...] 
# Compiler support generation of .cmxs.: ............... true 
# OCamlbuild additional flags: ......................... 
# Create documentations: ............................... true 
# Compile tests executable and library and run them: ... false 
# camlp4o: ............................................. /home/cacilhas/.opam/4.02.1/bin/camlp4o 
# pkg_camlp4_extend: ................................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# pkg_camlp4_lib: ...................................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# pkg_camlp4_quotations: ............................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# 
# ./setup.exe -build 
### stderr ### 
# File "setup.ml", line 232, characters 8-26: 
# Warning 3: deprecated: String.set 
# Use Bytes.set instead. 
# File "setup.ml", line 2391, characters 6-24: 
# Warning 3: deprecated: Lazy.lazy_from_fun 
# Use Lazy.from_fun instead. 
# E: Invalid_argument("bool_of_string") 
# make: ** [build] Erro 1 


#=== ERROR while installing type_conv.112.01.02 ===============================# 
# opam-version 1.2.2 
# os   linux 
# command  make 
# path   /home/cacilhas/.opam/4.02.1/build/type_conv.112.01.02 
# compiler  4.02.1 
# exit-code 2 
# env-file  /home/cacilhas/.opam/4.02.1/build/type_conv.112.01.02/type_conv-29247-dc6e87.env 
# stdout-file /home/cacilhas/.opam/4.02.1/build/type_conv.112.01.02/type_conv-29247-dc6e87.out 
# stderr-file /home/cacilhas/.opam/4.02.1/build/type_conv.112.01.02/type_conv-29247-dc6e87.err 
### stdout ### 
# [...] 
# Turn ocaml profile flag on: .......................... /home/cacilhas/bin/profile 
# Compiler support generation of .cmxs.: ............... true 
# OCamlbuild additional flags: ......................... 
# Create documentations: ............................... true 
# Compile tests executable and library and run them: ... false 
# camlp4o: ............................................. /home/cacilhas/.opam/4.02.1/bin/camlp4o 
# pkg_camlp4_quotations: ............................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# pkg_camlp4_extend: ................................... /home/cacilhas/.opam/4.02.1/lib/ocaml/camlp4 
# 
# ./setup.exe -build 
### stderr ### 
# E: Invalid_argument("bool_of_string") 
# make: ** [build] Erro 1 



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 
The following actions were aborted 
    ∗ install bin_prot   112.35.00 
    ∗ install comparelib   109.60.00 
    ∗ install core    112.35.01 
    ∗ install core_kernel  112.35.00 
    ∗ install custom_printf  112.24.00 
    ∗ install enumerate   111.08.00 
    ∗ install fieldslib   109.20.03 
    ∗ install pa_bench   112.06.00 
    ∗ install pa_ounit   112.35.00 
    ∗ install pa_structural_sexp 112.35.00 
    ∗ install pa_test   112.24.00 
    ∗ install sexplib   112.35.00 
    ∗ install typerep   112.35.00 
    ∗ install variantslib  109.15.03 
The following actions failed 
    ∗ install herelib 112.35.00 
    ∗ install ounit  2.0.0  
    ∗ install pipebang 110.01.00 
    ∗ install type_conv 112.01.02 
No changes have been performed 

По просьбе @Stas, мой env выход:

XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 
XDG_CONFIG_DIRS=/etc/xdg/xdg-i3:/etc/xdg 
LANG=pt_BR.UTF-8 
DISPLAY=:0 
SHLVL=1 
LOGNAME=cacilhas 
LANGUAGE=pt_BR:pt:en 
MANDATORY_PATH=/usr/share/gconf/i3.mandatory.path 
GNOME_KEYRING_PID=1708 
XDG_VTNR=7 
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/cacilhas 
XAUTHORITY=/home/cacilhas/.Xauthority 
QT_QPA_PLATFORMTHEME=appmenu-qt5 
GTK_IM_MODULE=ibus 
COLORTERM=gnome-terminal 
XDG_SESSION_ID=c2 
PWD=/home/cacilhas 
DESKTOP_SESSION=i3 
DEFAULTS_PATH=/usr/share/gconf/i3.default.path 
TEXTDOMAIN=im-config 
GNOME_KEYRING_CONTROL=/run/user/1001/keyring-oJXb7Q 
TEXTDOMAINDIR=/usr/share/locale/ 
GDMSESSION=i3 
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-xXu7Nzcp17,guid=bce1c10abb5c9942bf5579d456bc7f20 
VTE_VERSION=3409 
CLUTTER_IM_MODULE=xim 
XDG_DATA_DIRS=/usr/share/i3:/usr/local/share/:/usr/share/ 
QT4_IM_MODULE=xim 
GDM_LANG=pt_BR 
SHELL=/usr/bin/zsh 
QT_IM_MODULE=ibus 
WINDOWID=48234506 
SSH_AGENT_PID=1784 
GTK_MODULES=overlay-scrollbar 
SSH_AUTH_SOCK=/tmp/ssh-7R2eNIzpUVN2/agent.1712 
TERM=xterm 
PATH=/home/cacilhas/.opam/4.02.1/bin:/home/cacilhas/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/cacilhas/bin:/opt/fstar/bin:/home/cacilhas/.cabal/bin:/home/cacilhas/bin/ioke-0.4/bin:/opt/nodejs/bin:/home/cacilhas/bin/idea-IC/bin:/opt/mongodb/bin:/opt/pypy3/bin:/opt/local/qt/5.5/gcc_64/bin:/opt/local/qt/Tools/QtCreator/bin:/opt/sage/bin 
HOME=/home/cacilhas 
XDG_SEAT=seat0 
[email protected]=ibus 
XDG_RUNTIME_DIR=/run/user/1001 
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 
USER=cacilhas 
OLDPWD=/home/cacilhas 
script=/home/cacilhas/bin/profile/xdg.zsh 
AUTOENV_AUTH_FILE=/home/cacilhas/.autoenv_authorized 
__array_offset=0 
EDITOR=/usr/bin/gvim 
FSTAR_HOME=/opt/fstar 
GITSH=/home/cacilhas/bin/profile/git.sh 
GIT_EDITOR=gvim -f 
COMP_WORDBREAKS=: 
__git_merge_strategies= 
__git_all_commands= 
__git_porcelain_commands= 
__git_whitespacelist=nowarn warn error error-all fix 
__git_diff_common_options=--stat --numstat --shortstat --summary 
      --patch-with-stat --name-only --name-status --color 
      --no-color --color-words --no-renames --check 
      --full-index --binary --abbrev --diff-filter= 
      --find-copies-harder 
      --text --ignore-space-at-eol --ignore-space-change 
      --ignore-all-space --exit-code --quiet --ext-diff 
      --no-ext-diff 
      --no-prefix --src-prefix= --dst-prefix= 
      --inter-hunk-context= 
      --patience 
      --raw 
      --dirstat --dirstat= --dirstat-by-file 
      --dirstat-by-file= --cumulative 

__git_mergetools_common=diffuse ecmerge emerge kdiff3 meld opendiff 
      tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 

__git_fetch_options= 
    --quiet --verbose --append --upload-pack --force --keep --depth= 
    --tags --no-tags --all --prune --dry-run 

__git_log_common_options= 
    --not --all 
    --branches --tags --remotes 
    --first-parent --merges --no-merges 
    --max-count= 
    --max-age= --since= --after= 
    --min-age= --until= --before= 
    --min-parents= --max-parents= 
    --no-min-parents --no-max-parents 

__git_log_gitk_options= 
    --dense --sparse --full-history 
    --simplify-merges --simplify-by-decoration 
    --left-right --notes --no-notes 

__git_log_shortlog_options= 
    --author= --committer= --grep= 
    --all-match 

__git_log_pretty_formats=oneline short medium full fuller email raw format: 
__git_log_date_formats=relative iso8601 rfc2822 short local default raw 
__git_merge_options= 
    --no-commit --no-stat --log --no-log --squash --strategy 
    --commit --stat --no-squash --ff --no-ff --ff-only --edit --no-edit 

__git_send_email_confirm_options=always never auto cc compose 
__git_send_email_suppresscc_options=author self cc bodycc sob cccmd body all 
IOKE_HOME=/home/cacilhas/bin/ioke-0.4 
NODE_HOME=/opt/nodejs 
_JAVA_OPTIONS=-Dawt.useSystemAAFontSettings=gasp -Dswing.aatext=true -Dsun.java2d.xrander=true 
JAVA_FONTS=/usr/share/fonts/truetype 
JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre 
LUA_PATH=/usr/share/lua/jit/?.lua;/usr/share/lua/jit/?.lc;/usr/share/lua/jit/?/init.lua;/usr/share/lua/jit/?/init.lc;/usr/share/luajit-2.0.2/?.lua 
LUA_CPATH=/usr/lib/lua/jit/l?.so;/usr/lib/lua/jit/?.so;/usr/lib/lua/jit/?/l?.so 
MANPATH=:/home/cacilhas/.opam/4.02.1/man:/usr/share/man:/usr/local/man:/usr/local/share/man 
NVM_DIR=/home/cacilhas/.nvm 
NVM_CD_FLAGS=-q 
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist 
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist 
NVM_IOJS_ORG_VERSION_LISTING=https://iojs.org/dist/index.tab 
VERSION= 
NVM_RC_VERSION= 
OCAML_TOPLEVEL_PATH=/home/cacilhas/.opam/4.02.1/lib/toplevel 
PERL5LIB=/home/cacilhas/.opam/4.02.1/lib/perl5: 
CAML_LD_LIBRARY_PATH=/home/cacilhas/.opam/4.02.1/lib/stublibs 
PHANTOMJS=/usr/bin/phantomjs 
pgconnect=psql -h dumbo.oraculo.sieve.com.br -U matching -d matching -W 
profile=/home/cacilhas/bin/profile 
LOCALSZ=524288 
TRAILSZ=131072 
GLOBALSZ=1048576 
ZVERSION=5.0 
PROMPT= 
%E%{[01;34m%}────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────%{[00m%} 
%{[33m%}[%w, 20%D %T] %{[00m%} 
%E%{%(0?.[32m⚕.[31m☣)%} %{[00m%}%{[01;32m%}%[email protected]%m%{[01;33m%}%{[01;36m%}%~%{[00m%} 
%E%{[33m%}zsh-5.0%{[01;33m%}%# %{[00m%} 
PIP_DOWNLOAD_CACHE=/home/cacilhas/.pip/download-cache 
QT_HOME=/opt/local/qt 
RLWRAP_HOME=/home/cacilhas/.local/share/rlwrap 
ZSH_HIGHLIGHT_VERSION=0.4.1-dev 
ZSH_HIGHLIGHT_REVISION=HEAD 
GREP_OPTIONS=--colour=auto 
GREP_COLOR=1;32 
HISTSIZE=1000 
SAVEHIST=1000 
HISTFILE=/home/cacilhas/.history 
BROWSER=opera 
_=/usr/bin/env 
+0

Покажите нам свой '~/.ocamlinit' и вывод' ocamlfind query core' – Kakadu

+0

@Kakadu, я отредактировал тело, добавив ваш запрос. –

+1

Кажется, что у вас проблемы с 'ounit', а не с' core'. Можете ли вы попробовать 'opam update'? (возможно, вы пытаетесь установить старую версию ounit). Также вы можете попробовать переключиться на более новый компилятор: 'opam switch 4.02.3' – Kakadu

ответ

2

Это, очевидно, некоторые проблемы окружающей среды. Я установил OPAM на новый новый Ubuntu 14.04, и все в порядке.

См

asciicast

+0

Думаю, что да. Но я очистил всю установку и переустановил ее после вашего видео, получив те же ошибки, что и раньше. :-( –

+0

Я почти сдаюсь и считаю, что OCaml + Ubuntu слишком прослушивается и несовместимо, чтобы его воспринимали всерьез. –

+0

Вы установили 'aspcud',' OPAM 1.2.2' из двоичного дистрибутива, и он не работает? звучит очень странно. Покажите свои 'ocaml -version' и' opam -version'. Не забывайте eval 'opam config env'? Покажите свои' env' и 'alias'. – Stas

0

Прежде всего, если вы действительно не нужна библиотека Core, то вы можете просто удалить эти строки из вашего .ocamlinit файла:

#camlp4o;; 
#thread;; 
#require "core.top";; 
#require "core.syntax";; 

open Core.Std;; 

Тогда все будет работа хорошо.

Следующая проблема с установкой. Это выглядит как серьезная проблема с пакетом oasis, который является одним из самых популярных инструментов, используемых многими пакетами. Таким образом, проблема может повториться, и лучше ее исцелить. Я предлагаю вам попробовать следующие методы:

  1. Убедитесь, что ваша рабочая зона opam правильно активирована. Гс сценарий вашей оболочки, как правило, делают это, но это не трудно ввести,

    eval `opam config env` 
    opam install core 
    
  2. всучивали oasis до последней версии (может быть, по какой-то причине вы получили очень старый oasis, что не работает (это все еще проблема в пакете oasis, о котором следует сообщать и фиксировать).После того, как он приколол вам нужно попытаться установить ядро ​​еще один раз:

    opam pin add oasis 0.4.5 
    opam install core 
    
  3. Если вы не удалось на предыдущей точке, то попробуйте установить последнюю версию (до февраля 2016 года) версии OCAML компилятора

    opam init --comp 4.02.3 
    eval `opam config env` 
    opam install core 
    
+0

Единственное, что я не пробовал, было «opan pin add oasis 0.4.5'. Попытка, результатом было 2 неудачных пакета: 'ocamlmod' и' type_conv'. –

+0

ОК, это имеет смысл, вы должны попытаться удалить эти пакеты или просто начать с чистого состояния и перенести «оазис» первым. Постскриптум все это очень странно, и если у вас есть какая-то виртуальная машина, которую вы можете поделиться с нами, чтобы мы могли воспроизвести ее на наших машинах, тогда было бы здорово :) P.P.S Я тоже использую 14.04, и это никогда не случается со мной. – ivg

+0

Снова я очистил '~/.opam', воссоздал его (' opam --init 4.02.1'), а затем приколол 'oasis' (' opam pin add oasis 0.4.5'). Результат: 'ocamlmod' и' type_conv' не установлены, 'osasis' и' ocaml-data-notation' были прерваны. –