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

Fonts are missing #77

Closed
yurug opened this issue Aug 15, 2018 · 15 comments
Closed

Fonts are missing #77

yurug opened this issue Aug 15, 2018 · 15 comments

Comments

@yurug
Copy link
Collaborator

yurug commented Aug 15, 2018

After a fresh installation of learn-ocaml, I get that:

screen

@AltGr
Copy link
Collaborator

AltGr commented Aug 15, 2018

The missing fonts make sense (our favorite font has a complex license that doesn't make it clear we can redistribute it with the source, check in the static/fonts/ subdirectory to manually include it) ; but the CSS is normally configured with sane fallbacks. This is mentionned in the License and Copyright section of the README.

The replace is not a function error seems more worrying to me, do you know where it comes from?

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

Hmm, no. This is the first time I meet this one.

My version of js_of_ocaml is 3.2.1.

@AltGr
Copy link
Collaborator

AltGr commented Aug 16, 2018

Might be related indeed, I have only tested with jsoo 3.1.0 (which is the one indicated in the opam file).
Was the basic functionality working?

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

The web user interface is out of order. However, I can interact with the server using learn-ocaml-client.

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

Isn't it strange that opam installed 3.2.1 instead of 3.1.0 given that I followed the installation procedure to install learn-ocaml's opam dependencies?

@picdc
Copy link
Collaborator

picdc commented Aug 16, 2018

Did you update you opam environment recently? It might be related to js_of_ocaml "sub" packages (js_of_ocaml-lwt for example) not in the sync, i.e. with a different version than js_of_ocaml. I had the same issue once, after an opam update.

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

Thanks @OCamlPro-Couderc, that might be the case indeed!

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

There is something weird in my opam installation. Look:

ann➜teaching/learn-ocaml/learn-ocaml(docs-classroom)» opam install js_of_ocaml.3.1.0         [9:43:23]
[NOTE] Package js_of_ocaml is already installed (current version is 3.1.0).
yann➜teaching/learn-ocaml/learn-ocaml(docs-classroom)» js_of_ocaml --version                  [9:43:27]
3.2.1
yann➜teaching/learn-ocaml/learn-ocaml(docs-classroom)» which js_of_ocaml                      [9:43:33]
/home/yann/git/teaching/learn-ocaml/learn-ocaml/_opam/bin/js_of_ocaml
yann➜teaching/learn-ocaml/learn-ocaml(docs-classroom)» _opam/bin/js_of_ocaml --version        [9:43:43]
3.2.1
yann➜teaching/learn-ocaml/learn-ocaml(docs-classroom)» echo $PATH                             [9:44:03]
/home/yann/git/teaching/learn-ocaml/learn-ocaml/_opam/bin:/home/yann/usr/bin:/home/yann/.opam/4.05.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

@AltGr
Copy link
Collaborator

AltGr commented Aug 16, 2018

Pff, that's really on the js_of_ocaml package maintainers...
I had a PR for this but only fixed part of the missing constraints.
@yurug, can you check opam list js_of_ocaml\* ?

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

Things are getting stranger:

» opam list js_of_ocaml\*                                       
# Packages matching: (installed | available) & name-match(js_of_ocaml*)
# Name                        # Installed # Synopsis
js_of_ocaml                   3.1.0       Compiler from OCaml bytecode to Javascript
js_of_ocaml-camlp4            3.1.0       Compiler from OCaml bytecode to Javascript
js_of_ocaml-compiler          3.2.1       Compiler from OCaml bytecode to Javascript
js_of_ocaml-lwt               3.1.0       Compiler from OCaml bytecode to Javascript
js_of_ocaml-ocamlbuild        --          Compiler from OCaml bytecode to Javascript
js_of_ocaml-ppx               3.2.0       Compiler from OCaml bytecode to Javascript
js_of_ocaml-ppx_deriving_json --          Compiler from OCaml bytecode to Javascript
js_of_ocaml-toplevel          3.2.0       Compiler from OCaml bytecode to Javascript
js_of_ocaml-tyxml             3.2.0       Compiler from OCaml bytecode to Javascript

@yurug
Copy link
Collaborator Author

yurug commented Aug 16, 2018

opam install js_of_ocaml-compiler.3.1.0

fixed the problem.

We probably should fill an issue on the js_of_ocaml-compiler side and declare this specific version of the compiler package in our opam file.

@AltGr
Copy link
Collaborator

AltGr commented Aug 16, 2018

So this explains that: it's indeed the broken dependency constraints in opam-repository that led you to have inconsistent versions of the various jsoo packages, leading to a broken install.

opam install js_of_ocaml-compiler.3.1.0 js_of_ocaml-ocamlbuild.3.1.0 js_of_ocaml-ppx.3.1.0 js_of_ocaml-toplevel.3.1.0 js_of_ocaml-tyxml.3.1.0 should fix it manually

@hhugo
Copy link

hhugo commented Sep 1, 2018

It seems to me that the issue is not with inter-dependencies but with js_of_ocaml-compiler.3.2.1 itself.
@AltGr, why do you think different versions matter here?

@AltGr
Copy link
Collaborator

AltGr commented Sep 7, 2018

Err, I don't know actually, maybe I jumped to conclusions. Just tried upgrading all to their latest versions, and the problems seem to be gone, though.

@josprachi
Copy link

ocamlbuild

-use-ocamlfind
-plugin-tag "package(js_of_ocaml.ocamlbuild)"
-no-links
main.d.js

  • ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package js_of_ocaml.ocamlbuild myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
    ocamlfind: Package `js_of_ocaml.ocamlbuild' not found
    Command exited with code 2.
    Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
    Makefile:3: recipe for target 'all' failed
    make: *** [all] Error 10

I am getting this error when i try to run make command

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

5 participants