Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while parsing configuration file: Eliom: XXX.cma: (Failure "SSL is required\n") #130

Open
sagotch opened this issue Jul 24, 2017 · 3 comments

Comments

@sagotch
Copy link
Contributor

sagotch commented Jul 24, 2017

Trying to use sociaml-oauth-client lib (which uses cohttp), I can not run my server. It fails at startup.

eliomc -rectypes -ppx -infer -package lwt -package lwt.ppx -package ssl -package lwt_ssl -package conduit -package js_of_ocaml.deriving.ppx -package ocsature.server -package markiz -package cohttp -package cohttp.lwt -package sociaml_oauth_client.v1_0a -package sociaml_oauth_client.posix twittex.eliom
js_of_eliom -rectypes -ppx -c -package lwt.ppx -package js_of_ocaml.ppx -package js_of_ocaml.deriving.ppx -package ocsature.client -package markiz  twittex.eliom
eliomc -rectypes -ppx -c -package lwt -package lwt.ppx -package ssl -package lwt_ssl -package conduit -package js_of_ocaml.deriving.ppx -package ocsature.server -package markiz -package cohttp -package cohttp.lwt -package sociaml_oauth_client.v1_0a -package sociaml_oauth_client.posix  twittex.eliom
eliomc -rectypes -ppx -a -o local/lib/twittex/twittex.cma  \
          _server/twitter.cmo _server/twittex.cmo
js_of_eliom -rectypes -ppx -o local/var/www/twittex/eliom/twittex.js  -package lwt.ppx -package js_of_ocaml.ppx -package js_of_ocaml.deriving.ppx -package ocsature.client -package markiz  \
          _client/twitter.cmo _client/twittex.cmo
There are some missing primitives
Dummy implementations (raising 'Failure' exception) will be used if they are not available at runtime.
You can prevent the generation of dummy implementations with the commandline option '--disable genprim'
Missing primitives:
  caml_channel_descriptor
  re_search_forward
  unix_close
  unix_connect
  unix_geteuid
  unix_gethostbyname
  unix_gethostname
  unix_getpid
  unix_getppid
  unix_getpwuid
  unix_lockf
  unix_set_close_on_exec
  unix_socket
  unix_string_of_inet_addr
  unix_times
ocsigenserver  -c local/etc/twittex/twittex-test.conf
ocsigenserver: ocsigen:main: Fatal - Error in configuration file: Error while parsing configuration file: Eliom: while loading local/lib/twittex/twittex.cma: (Failure "SSL is required\n")
open Sociaml_oauth_client_v1_0a
open Sociaml_oauth_client_posix
module Client = Client.Make(Clock)(Cohttp_lwt_unix.Client)(MAC_SHA1)(Random)

let _ =
  Lwt_main.run @@
  match%lwt
    Client.fetch_request_token
    [...]

I tried to pin the cohttp branch, but it won't install:

=-=- Synchronising pinned packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ocsigenserver] [email protected]:ocsigen/ocsigenserver.git#cohttp already up-to-date
The following actions will be performed:
  ∗  install ocsigenserver dev*

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ocsigenserver] [email protected]:ocsigen/ocsigenserver.git#cohttp already up-to-date

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of ocsigenserver failed at "make install".
Processing  1/1: [ocsigenserver: rm]
#=== ERROR while installing ocsigenserver.dev =================================#
# opam-version 1.2.2
# os           linux
# command      make install
# path         /home/ju/.opam/4.04.1/build/ocsigenserver.dev
# compiler     4.04.1
# exit-code    2
# env-file     /home/ju/.opam/4.04.1/build/ocsigenserver.dev/ocsigenserver-23093-ad8886.env
# stdout-file  /home/ju/.opam/4.04.1/build/ocsigenserver.dev/ocsigenserver-23093-ad8886.out
# stderr-file  /home/ju/.opam/4.04.1/build/ocsigenserver.dev/ocsigenserver-23093-ad8886.err
### stdout ###
# ocamlfind install ocsigenserver \
# [...]
#    baselib/ocsigen_cache.cmi baselib/ocsigen_lib_base.cmi baselib/ocsigen_lib.cmi baselib/ocsigen_stream.cmi baselib/ocsigen_loader.cmi baselib/polytables.cmi http/ocsigen_charset_mime.cmi http/ocsigen_cookies.cmi http/ocsigen_header.cmi server/ocsigen_config.cmi server/ocsigen_request.cmi server/ocsigen_response.cmi server/ocsigen_messages.cmi server/ocsigen_multipart.cmi server/ocsigen_extensions.cmi server/ocsigen_parseconfig.cmi server/ocsigen_local_files.cmi server/ocsigen_server.cmi baselib/ocsigen_cache.cmx baselib/ocsigen_lib_base.cmx baselib/ocsigen_lib.cmx baselib/ocsigen_stream.cmx baselib/ocsigen_loader.cmx baselib/polytables.cmx http/ocsigen_charset_mime.cmx http/ocsigen_cookies.cmx http/ocsigen_header.cmx server/ocsigen_config.cmx server/ocsigen_request.cmx server/ocsigen_response.cmx server/ocsigen_messages.cmx server/ocsigen_multipart.cmx server/ocsigen_extensions.cmx server/ocsigen_parseconfig.cmx server/ocsigen_local_files.cmx server/ocsigen_server.cmx baselib/ocsigen_lib_base.cmo baselib/ocsigen_config_static.cmo baselib/baselib.cma baselib/polytables.cmo http/ocsigen_cookies.cmo http/http.cma server/ocsigenserver.cma server/server_main.cmo baselib/ocsigen_lib_base.cmx baselib/ocsigen_config_static.cmx baselib/polytables.cmx http/ocsigen_cookies.cmx server/server_main.cmx baselib/ocsigen_lib_base.o   baselib/ocsigen_config_static.o   baselib/polytables.o   http/ocsigen_cookies.o   server/server_main.o   baselib/baselib.cmxa http/http.cmxa server/ocsigenserver.cmxa baselib/baselib.a http/http.a server/ocsigenserver.a  baselib/polytables.cmxs baselib/ocsigen_cache.mli baselib/ocsigen_lib_base.mli baselib/ocsigen_lib.mli baselib/ocsigen_stream.mli baselib/ocsigen_loader.mli baselib/polytables.mli http/ocsigen_charset_mime.mli http/ocsigen_cookies.mli http/ocsigen_header.mli server/ocsigen_config.mli server/ocsigen_request.mli server/ocsigen_response.mli server/ocsigen_messages.mli server/ocsigen_multipart.mli server/ocsigen_extensions.mli server/ocsigen_parseconfig.mli server/ocsigen_local_files.mli server/ocsigen_server.mli files/META
# # Extensions
# install -m 755 -d /home/ju/.opam/4.04.1/lib/ocsigenserver/extensions/
# install -m 644 \
#   extensions/accesscontrol.cmi extensions/authbasic.cmi extensions/cors.cmi extensions/deflatemod.cmi extensions/ocsipersist.cmi extensions/outputfilter.cmi extensions/redirectmod.cmi extensions/staticmod.cmi extensions/accesscontrol.cmo extensions/authbasic.cmo extensions/cors.cmo extensions/extendconfiguration.cmo extensions/outputfilter.cmo extensions/redirectmod.cmo extensions/revproxy.cmo extensions/rewritemod.cmo extensions/staticmod.cmo extensions/ocsipersist-pgsql.cma extensions/ocsipersist-dbm.cma extensions/accesscontrol.cmx extensions/authbasic.cmx extensions/cors.cmx extensions/extendconfiguration.cmx extensions/outputfilter.cmx extensions/redirectmod.cmx extensions/revproxy.cmx extensions/rewritemod.cmx extensions/staticmod.cmx extensions/accesscontrol.o   extensions/authbasic.o   extensions/cors.o   extensions/extendconfiguration.o   extensions/outputfilter.o   extensions/redirectmod.o   extensions/revproxy.o   extensions/rewritemod.o   extensions/staticmod.o   extensions/ocsipersist-pgsql.cmxa extensions/ocsipersist-dbm.cmxa extensions/ocsipersist-pgsql.a extensions/ocsipersist-dbm.a  extensions/accesscontrol.cmxs extensions/authbasic.cmxs extensions/cors.cmxs extensions/extendconfiguration.cmxs extensions/outputfilter.cmxs extensions/redirectmod.cmxs extensions/revproxy.cmxs extensions/rewritemod.cmxs extensions/staticmod.cmxs extensions/ocsipersist-pgsql.cmxs extensions/ocsipersist-dbm.cmxs extensions/accesscontrol.mli extensions/authbasic.mli extensions/cors.mli extensions/deflatemod.mli extensions/ocsipersist.mli extensions/outputfilter.mli extensions/redirectmod.mli extensions/staticmod.mli \
#   /home/ju/.opam/4.04.1/lib/ocsigenserver/extensions/
# Makefile:115: recipe for target 'raw_install' failed
# make[1]: Leaving directory '/home/ju/.opam/4.04.1/build/ocsigenserver.dev/src'
# Makefile:51: recipe for target 'install.META' failed
### stderr ###
# [...]
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/polytables.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/ocsigen_loader.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/ocsigen_stream.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/ocsigen_lib.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/ocsigen_lib_base.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/ocsigen_cache.cmi
# Installed /home/ju/.opam/4.04.1/lib/ocsigenserver/META
# install: cannot stat 'extensions/deflatemod.cmi': No such file or directory
# make[1]: *** [raw_install] Error 1
# make: *** [install.META] Error 2

And now, I am lost.

@vasilisp
Copy link
Contributor

No idea where the SSL is required comes from. I can't find anything like that in our source code.

A priori, there is no conflict between using the "old" Ocsigenserver with libraries that use Cohttp as a client; we do the same in BeSport.

I am looking into the deflatemod build failure.

@vasilisp
Copy link
Contributor

The deflatemod installation issue should be fixed. Any help with testing the cohttp branch appreciated :). Not that you will also need the cohttp branches for Eliom et al.

@sagotch
Copy link
Contributor Author

sagotch commented Jul 25, 2017

The SSL message is a mystery for me as well. Couldn't find it in packages I directly use...

Installation issue is indeed fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants