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

Compile problem with Eigen versions #51

Closed
mars0i opened this issue Jun 21, 2017 · 5 comments
Closed

Compile problem with Eigen versions #51

mars0i opened this issue Jun 21, 2017 · 5 comments
Labels

Comments

@mars0i
Copy link
Contributor

mars0i commented Jun 21, 2017

This might end up being a question about opam that I should ask about on discuss.ocaml.org or StackOverflow, but it could be that the difficulty I'm experiencing has to do with how the current versions of Owl and Eigen work together, so I thought I'd ask here first.

The latest version of Owl won't compile with the opam version of Eigen, producing this error:

# Error: Unbound value Eigen.Dense.S.gemm

I saw in the Eigen git history that dot was recently renamed to gemm, so I assumed that I just needed a more recent version of Eigen. I got Eigen from github and was able to compile and install it using 'opam pin add eigen <my source dir>. I don't quite understand all of the command variants in the Eigen source, but I think the appropriate version of gemm is in there (in eigen_dismat_s.ml?).

However, when try to pin my local owl git tree, I get the same error, ie.. that gemm is unbound (see below). I don't understand this.

On the other hand, if I then compile a file to a native executable (rather than running utop), Owl seems to be available. I have no problem compiling code that uses Owl.

Any thoughts about what might be going wrong?

Thanks-
Marshall

/docs/src/ml/owl(master)*$ opam pin add owl `pwd`
[NOTE] Package owl is already path-pinned to /Users/marshall/docs/src/ml/owl.
       This will erase any previous custom definition.
Proceed ? [Y/n] y

[owl] /Users/marshall/docs/src/ml/owl/ synchronized
[owl] Installing new package description from /Users/marshall/docs/src/ml/owl

owl needs to be installed.
The following actions will be performed:
  ∗  install owl 0.2.4*
Do you want to continue ? [Y/n] y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[owl.0.2.4] /Users/marshall/docs/src/ml/owl/ already up-to-date

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
[ERROR] The compilation of owl failed at "ocaml setup.ml -build".
Processing  1/1: [owl: ocaml]
#=== ERROR while installing owl.0.2.4 =========================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml setup.ml -build
# path         /Users/marshall/.opam/yo/build/owl.0.2.4
# compiler     4.04.1
# exit-code    1
# env-file     /Users/marshall/.opam/yo/build/owl.0.2.4/owl-64484-d2d111.env
# stdout-file  /Users/marshall/.opam/yo/build/owl.0.2.4/owl-64484-d2d111.out
# stderr-file  /Users/marshall/.opam/yo/build/owl.0.2.4/owl-64484-d2d111.err
### stdout ###
# [...]
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamldep -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -modules lib/owl_stats.ml > lib/owl_stats.ml.depends
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamldep -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -modules lib/owl_dense_common.ml > lib/owl_dense_common.ml.depends
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamldep -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -modules lib/owl_pretty.mli > lib/owl_pretty.mli.depends
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamlc -c -g -annot -bin-annot -ccopt -I/Users/marshall/.opam/4.04.1/lib/ctypes -ccopt -O3 -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -I lib -I lib/backend -I lib/ext -I lib/nlp -o lib/owl_pretty.cmi lib/owl_pretty.mli
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamldep -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -modules lib/owl_dense_ndarray_a.ml > lib/owl_dense_ndarray_a.ml.depends
# /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamlc -c -g -annot -bin-annot -ccopt -I/Users/marshall/.opam/4.04.1/lib/ctypes -ccopt -O3 -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -I lib -I lib/backend -I lib/ext -I lib/nlp -o lib/owl_dense_common.cmo lib/owl_dense_common.ml
# + /Users/marshall/.opam/4.04.1/bin/ocamlfind ocamlc -c -g -annot -bin-annot -ccopt -I/Users/marshall/.opam/4.04.1/lib/ctypes -ccopt -O3 -package str -package plplot -package gsl -package eigen -package dolog -package ctypes.stubs -package ctypes -I lib -I lib/backend -I lib/ext -I lib/nlp -o lib/owl_dense_common.cmo lib/owl_dense_common.ml
# File "lib/owl_dense_common.ml", line 202, characters 17-35:
# Error: Unbound value Eigen.Dense.S.gemm
# Command exited with code 2.
### stderr ###
# E: Failure("Command ''/Users/marshall/.opam/4.04.1/bin/ocamlbuild' lib/libowl_stubs.a lib/dllowl_stubs.so lib/owl.cma lib/owl.cmxa lib/owl.a lib/owl.cmxs lib/neural/owl_neural.cma lib/neural/owl_neural.cmxa lib/neural/owl_neural.a lib/neural/owl_neural.cmxs perftest/perf_common.cma perftest/perf_common.cmxa perftest/perf_common.a perftest/perf_common.cmxs perftest/perf_dense_real.native perftest/perf_sparse_real.native perftest/perf_sparse_complex.native perftest/perf_dense_ndarray.native perftest/perf_dense_matrix.native perftest/perf_sparse_ndarray.native perftest/perf_sparse_matrix.native perftest/perf_specific_fun.native examples/test_neural.native -use-ocamlfind -tag debug' terminated with error code 10")



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  🐫
The following actions failed
  ∗  install owl 0.2.4
No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of sync.
@ryanrhymes
Copy link
Member

ryanrhymes commented Jun 21, 2017

Hi Marshall,

I think this is because the Eigen lib installed on your computer is outdated. Have you tried to update your opam then upgrade the Eigen lib with the following command.

opam update
opam upgrade eigen

You can also install both Owl and Eigen from git repo directly. Because Owl is dependent on Eigen, so you need to build and install Eigen first.

git clone https://github.com/ryanrhymes/eigen.git
cd eigen
make cleanall
make oasis
make && make install

The make cleanall is just to remove previously installed Eigen version. After installing Eigen, you can then install Owl in a similar way.

git clone https://github.com/ryanrhymes/owl.git
cd owl
make cleanall
make oasis
make && make install

Of course, you can still install Eigen with opam but only build Owl from source, this should also work.

@mars0i
Copy link
Contributor Author

mars0i commented Jun 21, 2017

Thanks Liang. I realize now that this was a foolish mistake on my part. It didn't occur to me to run opam update, so I was only able to get Eigen 0.0.3 using opam upgrade. Sorry about that!

I'm happy to install Eigen directly with opam install. I want to be able to build Owl from a local clone so that I can to try to add the ability to change the perspective in a 3D plot. If that works, I'll submit a pull request and you can decide whether you want to include it.

@ryanrhymes
Copy link
Member

I'm happy to install Eigen directly with opam install. I want to be able to build Owl from a local clone so that I can to try to add the ability to change the perspective in a 3D plot. If that works, I'll submit a pull request and you can decide whether you want to include it.

That would be great! PR is always welcome! I think you can try to introduce some optional parameters for orientation to mesh and surf functions. 👍

@mars0i
Copy link
Contributor Author

mars0i commented Jun 21, 2017

git clone https://github.com/ryanrhymes/owl.git
cd owl
make cleanall
make && make install

It looks like make oasis is also needed after make cleanall, because that step removes setup.ml.

@ryanrhymes
Copy link
Member

It looks like make oasis is also needed after make cleanall, because that step removes setup.ml.

Yes you are right. Sorry I forgot to add that, I have fixed the previous comments.

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

No branches or pull requests

2 participants