mirage / mirage-www

Website infrastructure and content for mirage.io
https://mirage.io
ISC License
171 stars 106 forks source link

Cannot build on CentOS 6.5 #230

Closed piffio closed 10 years ago

piffio commented 10 years ago

I'm trying to get into MirageOS by following the instructions / tutorial on http://openmirage.org

I was trying to build the mirage-www package on a CentOS 6.5 VM, and this is the error I get into:

[vagrant@centos65 src]$ mirage config --unix
Mirage      Using scanned config file: config.ml
Mirage      Processing: /home/vagrant/src/mirage-www/src/config.ml
Mirage      => rm -rf /home/vagrant/src/mirage-www/src/_build/config.*
Mirage      => cd /home/vagrant/src/mirage-www/src && ocamlbuild -use-ocamlfind -tags annot,bin_annot -pkg mirage config.cmxs
Mirage       ocamlfind ocamldep -package mirage -modules config.ml > config.ml.depends
Mirage       ocamlfind ocamlc -c -annot -bin-annot -package mirage -o config.cmo config.ml
Mirage       + ocamlfind ocamlc -c -annot -bin-annot -package mirage -o config.cmo config.ml
Mirage       File "config.ml", line 57, characters 2-16:
Mirage       Error: Unbound value conduit_direct
Mirage       Command exited with code 2.
[ERROR]      The command "cd /home/vagrant/src/mirage-www/src && ocamlbuild -use-ocamlfind -tags annot,bin_annot -pkg mirage config.cmxs" exited with code 10.

Attached some additional information about the enviromnent:

Ocaml version:

[vagrant@centos65 src]$ ocaml -version
The OCaml toplevel, version 4.01.0

Opam packages installed:

[vagrant@centos65 src]$ opam list
Installed packages for system:
base-bigarray             base  Bigarray library distributed with the OCaml compiler
base-bytes              legacy  Bytes compatibility library distributed with ocamlfind
base-no-ppx               base  A pseudo-library to indicate lack of extension points support
base-threads              base  Threads library distributed with the OCaml compiler
base-unix                 base  Unix library distributed with the OCaml compiler
base64                   1.0.0  Base64 encoding and decoding library
camlp4                  4.01.0  Camlp4 is a system for writing extensible parsers for programming languages
cmdliner                 0.9.5  Declarative definition of command line interfaces for OCaml
cohttp                  0.10.1  HTTP library for Lwt, Async and Mirage
cstruct                  1.4.0  access C structures via a camlp4 extension
dns                     0.10.0  DNS client and server implementation
fieldslib            109.20.03  Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values
io-page                  1.1.1  Allocate memory pages suitable for aligned I/O
ipaddr                   2.5.0  IP (and MAC) address representation library
lwt                      2.4.6  A cooperative threads library for OCaml
mirage                   1.2.0  The Mirage library operating system
mirage-block-unix        1.2.1  Mirage disk block driver for Unix
mirage-clock-unix        1.0.0  A Mirage-compatible Clock library for Unix
mirage-console-unix      1.0.0  A Mirage-compatible Console library for Unix
mirage-http              1.1.0  Mirage HTTP client and server driver for Unix
mirage-net-unix          1.1.1  Ethernet network driver for Mirage, using tuntap
mirage-types             1.2.0  Module type definitions for Mirage-compatible applications
mirage-unix              1.1.0  Mirage OS library for Unix compilation
ocamlfind                1.5.3  A library manager for OCaml
ocplib-endian              0.7  Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01.
optcomp                    1.6  Optional compilation with cpp-like directives
ounit                    2.0.0  Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks
re                       1.2.2  RE is a regular expression library for OCaml
sexplib              111.25.00  Library for serializing OCaml values to and from S-expressions
shared-memory-ring       1.1.0  Shared memory rings for RPC and bytestream communications.
ssl                      0.4.7  Bindings for OpenSSL
stringext                1.0.0  Extra string functions for OCaml
tcpip                    1.1.6  Userlevel TCP/IP stack
tuntap                   1.0.0  TUN/TAP bindings
type_conv            111.13.00  Library for building type-driven syntax extensions
uri                      1.7.2  RFC3986 URI/URL parsing library
vchan                    2.0.0  Xen Vchan implementation
xenstore                 1.2.5  Xenstore protocol clients and server

I tried to install the conduit package, but it fails rebuilding the mirage-console-unix.1.0.0 package due to what I believe is an incompatibility with mirage-types-2.0.0 that seems to be required by conduit.

More details here:

[vagrant@centos65 src]$ opam install conduit
The following actions will be performed:
 - install base64.1.0.0 [required by conduit]
 - install xenstore.1.2.5 [required by conduit]
 - upgrade mirage-types.1.2.0 to 2.0.0 [required by conduit]
 - install dns.0.10.0 [required by conduit]
 - recompile mirage.1.2.0 [use mirage-types]
 - recompile mirage-block-unix.1.2.1 [use mirage-types]
 - recompile mirage-clock-unix.1.0.0 [use mirage-types]
 - recompile mirage-net-unix.1.1.1 [use mirage-types]
 - install vchan.2.0.0 [required by conduit]
 - recompile mirage-unix.1.1.0 [use mirage-types]
 - recompile mirage-console-unix.1.0.0 [use mirage-types]
 - recompile tcpip.1.1.6 [use mirage-types]
 - install conduit.0.6.0
 - recompile mirage-http.1.1.0 [use mirage-types]
5 to install | 8 to reinstall | 1 to upgrade | 0 to downgrade | 0 to remove

....

===== ERROR while recompiling mirage-console-unix.1.0.0 =====
# opam-version 1.1.1
# os           linux
# command      make unix-install
# path         /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/build/mirage-console-unix.1.0.0
# compiler     system (4.01.0)
# exit-code    2
# env-file     /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/build/mirage-console-unix.1.0.0/mirage-console-unix-19919-f589c9.env
# stdout-file  /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/build/mirage-console-unix.1.0.0/mirage-console-unix-19919-f589c9.out
# stderr-file  /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/build/mirage-console-unix.1.0.0/mirage-console-unix-19919-f589c9.err
### stdout ###
# ...[truncated]
# ocamlfind ocamlc -c -package mirage-unix -package mirage-types -I unix -o unix/console.cmo unix/console.ml
# + ocamlfind ocamlc -c -package mirage-unix -package mirage-types -I unix -o unix/console.cmo unix/console.ml
# File "unix/console.ml", line 1:
# Error: The implementation unix/console.ml
#        does not match the interface unix/console.cmi:
#        The field `close' is required but not provided
#        The field `writev' is required but not provided
#        The field `read' is required but not provided
#        The field `buffer' is required but not provided
# Command exited with code 2.
### stderr ###
# ocamlfind: [WARNING] No such directory: /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/lib/mirage-console-unix
# ocamlfind: _build/unix/mirage-console.cmxs: No such file or directory
# make: *** [unix-install] Error 2

Let me know if you need more details

djs55 commented 10 years ago

Hi, Thanks for the report!

The console interfaces pulled in by [mirage/mirage-dev] got a bit out of sync. I think this has been fixed by

When I did a clean install and rebuild of mirage-www, I hit one more issue:

As a temporary workaround, try tweaking the config.ml as follows:

$ git diff
diff --git a/src/config.ml b/src/config.ml
index 3c93765..da80e98 100644
--- a/src/config.ml
+++ b/src/config.ml
@@ -61,7 +61,7 @@ let http_srv =
   http_server mode server

 let main =
-  let libraries = [ "cow.syntax"; "cowabloga" ] in
+  let libraries = [ "mirage-unix"; "cow.syntax"; "cowabloga" ] in
   let packages = [ "cow";"cowabloga" ] in
   foreign ~libraries ~packages "Dispatch.Main"
     (console @-> kv_ro @-> kv_ro @-> http @-> job)

HTH

djs55 commented 10 years ago

Oh I should also say: be careful doing an 'opam update' 'opam upgrade': normally this would work but there is a bug in the mirage-console remove step. Sometimes it leaves a package behind. If this happens you should be able to manually run

ocamlfind remove mirage-console

to get rid of the leftovers.

piffio commented 10 years ago

Thanks for your comments.

Looking at your but report I see that you are running mirage-console-unix.2.0.0. I do I manage to install this version? Should I do it through opam or through a completely different mechanism?

Sorry if the question might sound silly, buy I'm just getting started with both oCaml and Mirage

piffio commented 10 years ago

Ignore my last comment.

After an opam update && opam upgrade I ended up with mirage-console-unix.2.0.0 being succesfully installed, and now mirage-www is building succesfully.

Still, I had to manyally remove a mirage-console dir as you mentioned in your previous comment.

Thanks!

piffio commented 10 years ago

Well, Now I have a different kind of problem.

After succesfully running mirage configure and make depend, I got the following error:

[vagrant@centos65 src]$  make
ocamlbuild -classic-display -use-ocamlfind -pkgs lwt.syntax,conduit.mirage,cow.syntax,cowabloga,cstruct,io-page,io-page.unix,lwt,mirage-console-unix,mirage-fs-unix,mirage-http,mirage-types,mirage-types.lwt,mirage-unix,tcpip.stack-socket -tags "syntax(camlp4o),annot,bin_annot,strict_sequence,principal" -cflag -g -lflags -g,-linkpkg main.native
ocamlfind ocamldep -package tcpip.stack-socket -package mirage-unix -package mirage-types.lwt -package mirage-types -package mirage-http -package mirage-fs-unix -package mirage-console-unix -package lwt -package io-page.unix -package io-page -package cstruct -package cowabloga -package cow.syntax -package conduit.mirage -package lwt.syntax -syntax camlp4o -modules main.ml > main.ml.depends
+ ocamlfind ocamldep -package tcpip.stack-socket -package mirage-unix -package mirage-types.lwt -package mirage-types -package mirage-http -package mirage-fs-unix -package mirage-console-unix -package lwt -package io-page.unix -package io-page -package cstruct -package cowabloga -package cow.syntax -package conduit.mirage -package lwt.syntax -syntax camlp4o -modules main.ml > main.ml.depends
ocamlfind: Package `tcpip.stack-socket' not found
Command exited with code 2.
make: *** [main.native] Error 10

Current output of opam list:

[vagrant@centos65 src]$ opam list
Installed packages for 4.02.1:
base-bigarray             base  Bigarray library distributed with the OCaml compiler
base-bytes                base  Bytes library distributed with the OCaml compiler
base-threads              base  Threads library distributed with the OCaml compiler
base-unix                 base  Unix library distributed with the OCaml compiler
base64                   1.0.0  Base64 encoding and decoding library
camlp4                  4.02.1  Camlp4 is a system for writing extensible parsers for programming languages
cmdliner                 0.9.5  Declarative definition of command line interfaces for OCaml
cohttp                  0.12.0  HTTP library for Lwt, Async and Mirage
conduit                  0.6.0  Network connection library for TCP and SSL
conduit-mirage           2.0.0  Virtual package for the Mirage Conduit transports
cow                      1.0.0  XML, JSON, HTML, CSS, and Markdown syntax and libraries
cowabloga                0.0.8  Simple static blogging support.
crunch                   1.3.0  Convert a filesystem into a static OCaml module
cstruct                  1.4.0  access C structures via a camlp4 extension
dns                     0.10.0  DNS client and server implementation
dyntype                  0.9.0  syntax extension which makes OCaml types and values easier to manipulate programmatically
ezjsonm                  0.2.0  An easy interface on top of the Jsonm library
fieldslib            109.20.03  Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields
io-page                  1.1.1  Allocate memory pages suitable for aligned I/O
ipaddr                   2.5.0  IP (and MAC) address representation library
jsonm                    0.9.1  Non-blocking streaming JSON codec for OCaml
lwt                      2.4.5  A cooperative threads library for OCaml
mirage-clock-unix        1.0.0  A Mirage-compatible Clock library for Unix
mirage-console-unix      2.0.0  A Mirage-compatible Console library for Unix
mirage-fs-unix           1.1.2  Mirage filesystem passthrough driver for Unix
mirage-http              2.0.0  Mirage HTTP client and server driver for Unix
mirage-net-unix          1.1.1  Ethernet network driver for Mirage, using tuntap
mirage-types             2.0.0  Module type definitions for Mirage-compatible applications
mirage-unix              1.1.0  Mirage OS library for Unix compilation
ocamlfind                1.5.3  A library manager for OCaml
ocplib-endian              0.7  Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01.
omd                      0.9.7  A Markdown frontend in pure OCaml.
optcomp                    1.6  Optional compilation with cpp-like directives
ounit                    2.0.0  Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks
ppx_tools               0.99.1  Tools for authors of ppx rewriters and other syntactic tools
re                       1.2.2  RE is a regular expression library for OCaml
sexplib              112.01.00  Library for serializing OCaml values to and from S-expressions
shared-memory-ring       1.1.0  Shared memory rings for RPC and bytestream communications.
ssl                      0.4.7  Bindings for OpenSSL
stringext                1.0.0  Extra string functions for OCaml
tcpip                    2.0.0  Userlevel TCP/IP stack
tuntap                   1.0.0  TUN/TAP bindings
type_conv            112.01.00  Library for building type-driven syntax extensions
ulex                       1.1  lexer generator for Unicode and OCaml
uri                      1.7.2  RFC3986 URI/URL parsing library
uutf                     0.9.3  Non-blocking streaming Unicode codec for OCaml
vchan                    2.0.0  Xen Vchan implementation
xenstore                 1.2.5  Xenstore protocol clients and server
xmlm                     1.2.0  Streaming XML codec for OCaml
avsm commented 10 years ago

There's some fallout from recent changes on the development branch. Just to confirm, whats the output of running "opam remote"? I'm testing some fixes to the packaging that should restore the dev branch to a working state shortly.

-a

On 16 Oct 2014, at 16:48, Sergio Visinoni notifications@github.com wrote:

Well, Now I have a different kind of problem.

After succesfully running mirage configure and make depend, I got the following error:

[vagrant@centos65 src]$ make ocamlbuild -classic-display -use-ocamlfind -pkgs lwt.syntax,conduit.mirage,cow.syntax,cowabloga,cstruct,io-page,io-page.unix,lwt,mirage-console-unix,mirage-fs-unix,mirage-http,mirage-types,mirage-types.lwt,mirage-unix,tcpip.stack-socket -tags "syntax(camlp4o),annot,bin_annot,strict_sequence,principal" -cflag -g -lflags -g,-linkpkg main.native ocamlfind ocamldep -package tcpip.stack-socket -package mirage-unix -package mirage-types.lwt -package mirage-types -package mirage-http -package mirage-fs-unix -package mirage-console-unix -package lwt -package io-page.unix -package io-page -package cstruct -package cowabloga -package cow.syntax -package conduit.mirage -package lwt.syntax -syntax camlp4o -modules main.ml > main.ml.depends

  • ocamlfind ocamldep -package tcpip.stack-socket -package mirage-unix -package mirage-types.lwt -package mirage-types -package mirage-http -package mirage-fs-unix -package mirage-console-unix -package lwt -package io-page.unix -package io-page -package cstruct -package cowabloga -package cow.syntax -package conduit.mirage -package lwt.syntax -syntax camlp4o -modules main.ml > main.ml.depends ocamlfind: Package `tcpip.stack-socket' not found Command exited with code 2. make: *\ [main.native] Error 10 Current output of opam list:

[vagrant@centos65 src]$ opam list Installed packages for 4.02.1: base-bigarray base Bigarray library distributed with the OCaml compiler base-bytes base Bytes library distributed with the OCaml compiler base-threads base Threads library distributed with the OCaml compiler base-unix base Unix library distributed with the OCaml compiler base64 1.0.0 Base64 encoding and decoding library camlp4 4.02.1 Camlp4 is a system for writing extensible parsers for programming languages cmdliner 0.9.5 Declarative definition of command line interfaces for OCaml cohttp 0.12.0 HTTP library for Lwt, Async and Mirage conduit 0.6.0 Network connection library for TCP and SSL conduit-mirage 2.0.0 Virtual package for the Mirage Conduit transports cow 1.0.0 XML, JSON, HTML, CSS, and Markdown syntax and libraries cowabloga 0.0.8 Simple static blogging support. crunch 1.3.0 Convert a filesystem into a static OCaml module cstruct 1.4.0 access C structures via a camlp4 extension dns 0.10.0 DNS client and server implementation dyntype 0.9.0 syntax extension which makes OCaml types and values easier to manipulate programmatically ezjsonm 0.2.0 An easy interface on top of the Jsonm library fieldslib 109.20.03 Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields io-page 1.1.1 Allocate memory pages suitable for aligned I/O ipaddr 2.5.0 IP (and MAC) address representation library jsonm 0.9.1 Non-blocking streaming JSON codec for OCaml lwt 2.4.5 A cooperative threads library for OCaml mirage-clock-unix 1.0.0 A Mirage-compatible Clock library for Unix mirage-console-unix 2.0.0 A Mirage-compatible Console library for Unix mirage-fs-unix 1.1.2 Mirage filesystem passthrough driver for Unix mirage-http 2.0.0 Mirage HTTP client and server driver for Unix mirage-net-unix 1.1.1 Ethernet network driver for Mirage, using tuntap mirage-types 2.0.0 Module type definitions for Mirage-compatible applications mirage-unix 1.1.0 Mirage OS library for Unix compilation ocamlfind 1.5.3 A library manager for OCaml ocplib-endian 0.7 Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01. omd 0.9.7 A Markdown frontend in pure OCaml. optcomp 1.6 Optional compilation with cpp-like directives ounit 2.0.0 Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks ppx_tools 0.99.1 Tools for authors of ppx rewriters and other syntactic tools re 1.2.2 RE is a regular expression library for OCaml sexplib 112.01.00 Library for serializing OCaml values to and from S-expressions shared-memory-ring 1.1.0 Shared memory rings for RPC and bytestream communications. ssl 0.4.7 Bindings for OpenSSL stringext 1.0.0 Extra string functions for OCaml tcpip 2.0.0 Userlevel TCP/IP stack tuntap 1.0.0 TUN/TAP bindings type_conv 112.01.00 Library for building type-driven syntax extensions ulex 1.1 lexer generator for Unicode and OCaml uri 1.7.2 RFC3986 URI/URL parsing library uutf 0.9.3 Non-blocking streaming Unicode codec for OCaml vchan 2.0.0 Xen Vchan implementation xenstore 1.2.5 Xenstore protocol clients and server xmlm 1.2.0 Streaming XML codec for OCaml — Reply to this email directly or view it on GitHub.

piffio commented 10 years ago

There you go:

[vagrant@centos65 src]$ opam remote
  10 [git]   mirage-dev     git://github.com/mirage/mirage-dev
   0 [http]     default     https://opam.ocaml.org/1.1
avsm commented 10 years ago

Thanks; should have a fix shortly.

On 16 Oct 2014, at 16:51, Sergio Visinoni notifications@github.com wrote:

There you go:

[vagrant@centos65 src]$ opam remote 10 [git] mirage-dev git://github.com/mirage/mirage-dev 0 [http] default https://opam.ocaml.org/1.1 — Reply to this email directly or view it on GitHub.

avsm commented 10 years ago

in the meanwhile, you can satisfy the dependencies manually by "opam install tcpip"

On 16 Oct 2014, at 16:51, Sergio Visinoni notifications@github.com wrote:

There you go:

[vagrant@centos65 src]$ opam remote 10 [git] mirage-dev git://github.com/mirage/mirage-dev 0 [http] default https://opam.ocaml.org/1.1 — Reply to this email directly or view it on GitHub.

piffio commented 10 years ago

Unfortunately after multiple retries, I'm still unable to build the mirage-www module. Manually installing tcpip didn't help either, since it was in fact already installed (check the output of opam list in the previous post).

Now for some reason when I try to do opam update && opam upgrade it tries to install mirage.1.3.0, and then the compilation fails on some other components, as you can see below:

The following actions will be performed:
 - downgrade stringext.1.0.0 to 0.0.1
 - downgrade optcomp.1.6 to 1.4 [required by cowabloga, mirage-fs-unix, mirage-http]
 - downgrade uutf.0.9.3 to 0.9.1 [required by cowabloga]
 - downgrade omd.0.9.7 to 0.8.2 [required by cowabloga]
 - downgrade type_conv.112.01.00 to 109.60.00 [required by conduit, cowabloga, mirage-fs-unix, mirage-http]
 - downgrade xmlm.1.2.0 to 1.1.1 [required by cowabloga]
 - downgrade ssl.0.4.7 to 0.4.6 [required by conduit, cowabloga, mirage-fs-unix, mirage-http]
 - downgrade re.1.2.2 to 1.2.1 [required by cowabloga, mirage-http]
 - downgrade ppx_tools.0.99.1 to 0.1 [required by conduit, cowabloga, mirage-fs-unix, mirage-http]
 - downgrade ocplib-endian.0.7 to 0.6 [required by cowabloga, mirage-fs-unix, mirage-http]
 - recompile jsonm.0.9.1 [use uutf]
 - recompile dyntype.0.9.0 [use type_conv]
 - recompile fieldslib.109.20.03 [use type_conv]
 - downgrade sexplib.112.01.00 to 109.58.00 [required by conduit, cowabloga, mirage-fs-unix, mirage-http]
 - downgrade uri.1.7.2 to 1.3.9 [required by cowabloga, mirage-http]
 - upgrade lwt.2.4.5 to 2.4.6 [required by conduit, cowabloga, mirage-fs-unix, mirage-http]
 - downgrade ezjsonm.0.2.0 to 0.1.0 [required by cowabloga]
 - recompile ipaddr.2.5.0 [use type_conv]
 - downgrade conduit.0.6.0 to 0.5.0
 - downgrade cstruct.1.4.0 to 1.3.1 [required by cowabloga, mirage-fs-unix, mirage-http]
 - install xenctrl.0.9.26
 - recompile cow.1.0.0 [use omd, re, type_conv, uutf, xmlm]
 - downgrade tuntap.1.0.0 to 0.7.0 [required by mirage-http]
 - downgrade cohttp.0.12.0 to 0.9.16 [required by cowabloga, mirage-http]
 - downgrade dns.0.10.0 to 0.8.0
 - recompile io-page.1.1.1 [use optcomp, ppx_tools, ssl, type_conv]
 - downgrade shared-memory-ring.1.1.0 to 1.0.0 [required by mirage-http]
 - downgrade xenstore.1.2.5 to 1.2.3
 - downgrade cowabloga.0.0.8 to 0.0.3
 - downgrade mirage-types.2.0.0 to 1.2.0 [required by mirage-fs-unix, mirage-http]
 - install xenstore_transport.0.9.0
 - install mirage.1.1.3
 - recompile mirage-clock-unix.1.0.0 [use optcomp, ppx_tools, ssl, type_conv]
 - downgrade mirage-fs-unix.1.1.2 to 1.0.0
 - recompile mirage-net-unix.1.1.1 [use optcomp, ppx_tools, ssl, type_conv]
 - recompile mirage-unix.1.1.0 [use optcomp, ppx_tools, ssl, type_conv]
 - downgrade mirage-console-unix.2.0.0 to 1.0.0 [required by mirage-http]
 - downgrade vchan.2.0.0 to 0.9.2
 - downgrade tcpip.2.0.0 to 1.1.6 [required by mirage-http]
 - recompile conduit-mirage.2.0.0 [use optcomp, ppx_tools, re, ssl, type_conv]
 - downgrade mirage-http.2.0.0 to 1.1.0

[...]

=-=-= Installing ocplib-endian.0.6 =-=-=
Building ocplib-endian.0.6:
  ocaml setup.ml -configure --disable-debug --prefix /home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/4.02.1
  ocaml setup.ml -build
  ocaml setup.ml -install
[ERROR] The compilation of ocplib-endian.0.6 failed.
Removing ocplib-endian.0.6.
  ocamlfind remove ocplib-endian

I'll try cleaning up the whole environment and rebuilding, but I believe that there is still something wrong in the mirage-dev repo. Let me know if you can manage to fix it

piffio commented 10 years ago

OK, ignore everything. I've removed the whole ocamlbrew directory from my home page, starded over with a fresh install of all the packages and now I can suffesfully build the mirage-www module, and move forward!

Thanks for being so reactive!

avsm commented 10 years ago

Excellent! I've just fixed up some minor build issues and confirmed that mirage-www builds for me locally in both Unix and Xen mode.

piffio commented 10 years ago

I just realized I can't build the --xen target, but only the Unix process version. CentOS 6.5 comes with gcc 4.4.7. When I try to run mirage configure --xen I get an error while compiling mirage-xen-minios.0.4, with the following message:

### stderr ###
# ...[truncated]
# ++ LIBM=openlibm-0.4
# ++ LIBM_ARCHIVE=v0.4.tar.gz
# ++ LIBM_URL=https://github.com/JuliaLang/openlibm/archive/v0.4.tar.gz
# + rm -rf xen-minios-v0.4
# + tar -zxf minios-v0.4.tar.gz
# + cd xen-minios-v0.4/extras/mini-os
# + make debug=n
# cc1: error: unrecognized command line option "-fno-tree-loop-distribute-patterns"
# make[1]: *** [/home/vagrant/ocamlbrew/ocaml-4.01.0/.opam/system/build/mirage-xen-minios.0.4/xen-minios-v0.4/extras/mini-os/blkfront.o] Error 1
# make: *** [build] Error 2

It looks like the no-tree-loop-distribute-patterns flag is not supported in my gcc version.

What is the recommended/supported gcc version? Should I just use a different VM, like an ubuntu 14.04 / 14.10?

piffio commented 10 years ago

Just tried building in CentOS 7. The fun thing here is that I can succesfully build the --xen target, due to CentOS shipping gcc 4.8.2, but building the --unix flavor fails with the following error:

File "main.ml", line 56, characters 32-39:
Error: Unbound module OS
Command exited with code 2.
make: *** [main.native] Error 10

At the moment is not very urgent on my side, since I can use a combination of CentOS 6.5 and 7 to build both flavors, but I'm reporting this anyway, in case it is something that needs to be fixed in mirage's code

djs55 commented 10 years ago

The "Unbound module OS" failure looks like: [mirage/mirage#303]. I think the fix for this has been merged a few hours ago -- worth trying a quick 'opam update' 'opam upgrade' and retry?

On Sat, Oct 18, 2014 at 4:16 AM, Sergio Visinoni notifications@github.com wrote:

Just tried building in CentOS 7. The fun thing here is that I can succesfully build the --xen target, due to CentOS shipping gcc 4.8.2, but building the --unix flavor fails with the following error:

File "main.ml", line 56, characters 32-39: Error: Unbound module OS Command exited with code 2. make: *\ [main.native] Error 10

At the moment is not very urgent on my side, since I can use a combination of CentOS 6.5 and 7 to build both flavors, but I'm reporting this anyway, in case it is something that needs to be fixed in mirage's code

— Reply to this email directly or view it on GitHub https://github.com/mirage/mirage-www/issues/230#issuecomment-59597271.

Dave Scott

piffio commented 10 years ago

Now both target are succesfully built on CentOS 7. Thank you!