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

Difficulty installing roboptim-core from homebrew #100

Closed
ahundt opened this issue Jul 17, 2015 · 7 comments
Closed

Difficulty installing roboptim-core from homebrew #100

ahundt opened this issue Jul 17, 2015 · 7 comments

Comments

@ahundt
Copy link

ahundt commented Jul 17, 2015

It tried installing roboptim-core from homebrew, but it failed. Here is the diagnostic info:

https://gist.github.com/466dcf1146052896ee28

which is from this command sequence you provided in the instructions:

# We make assumption that you have already installed Homebrew!
    # If this is not the case, please look at: http://brew.sh/

    # Add the repositories
    brew tap homebrew/python   # only for roboptim-core-python
    brew tap homebrew/science  # for IPOPT, CMinPack
    brew tap roboptim/roboptim

    # RobOptim Core
    brew install --HEAD roboptim/roboptim/roboptim-core

    # RobOptim Core Plugin CMinPack
    brew install --HEAD roboptim/roboptim/roboptim-core-plugin-cminpack

    # RobOptim Core Plugin IPOPT
    brew install --HEAD roboptim/roboptim/roboptim-core-plugin-ipopt

    # RobOptim Trajectory
    brew install --HEAD roboptim/roboptim/roboptim-trajectory

    # RobOptim Capsule
    brew install --HEAD roboptim/roboptim/roboptim-capsule

    # IMPORTANT: some of these repositories are not released.
    # In this case, you can install from Git using:
    # brew install --HEAD a_package
    #
    # Note that in this case, you have to install *all* packages
    # from source (even roboptim-core!).

I believe all the other ones failed too, but they probably require the core anyway.

@bchretien
Copy link
Member

Thanks for reporting this! The problem is here, there's actually an extra build-time dependency on texlive-core/ghostscript (or whatever their name is on homebrew) for generating the documentation. Thus, we have 2 options here:

  • Add LaTeX as a dependency in the homebrew formula, but I don't use a Mac (@thomas-moulard took care of this), so you would need provide a PR to homebrew-roboptim addressing this issue, and I would merge it.
  • Use another backend for LaTeX formulae with doxygen (apparently MathJax is supported).

The second option seems better, so I will give it a go and see how it goes.

@bchretien
Copy link
Member

If you want to use the release homebrew formulae (and they need a version bump), for now we will need to add the LaTeX-related dependencies, but this should no longer be the case for the next releases (cf. jrl-umi3218/jrl-cmakemodules#57). If you're using the master branch, the MathJax version should be available tomorrow (it's just a matter of updating the submodule and setting DOXYGEN_USE_MATHJAX to YES).

@ahundt
Copy link
Author

ahundt commented Jul 20, 2015

Thanks, I'm planning on using this with the Posture Generator library. I also wouldn't mind cloning and compiling the code myself. Is there a branch that is better to use than master?

@ahundt
Copy link
Author

ahundt commented Jul 20, 2015

I tried running my script again, reproduced below. However several of the dependencies still failed.

# We make assumption that you have already installed Homebrew!
    # If this is not the case, please look at: http://brew.sh/

    # Add the repositories
    brew tap homebrew/python   # only for roboptim-core-python
    brew tap homebrew/science  # for IPOPT, CMinPack
    brew tap roboptim/roboptim

    # RobOptim Core
    brew install --HEAD roboptim/roboptim/roboptim-core

    # RobOptim Core Plugin CMinPack
    brew install --HEAD roboptim/roboptim/roboptim-core-plugin-cminpack

    # RobOptim Core Plugin IPOPT
    brew install --HEAD roboptim/roboptim/roboptim-core-plugin-ipopt

    # RobOptim Trajectory
    brew install --HEAD roboptim/roboptim/roboptim-trajectory

    # RobOptim Capsule
    brew install --HEAD roboptim/roboptim/roboptim-capsule

    # IMPORTANT: some of these repositories are not released.
    # In this case, you can install from Git using:
    # brew install --HEAD a_package
    #
    # Note that in this case, you have to install *all* packages
    # from source (even roboptim-core!).

For example: here is the next error on the list:

○  brew install --HEAD roboptim/roboptim/roboptim-core-plugin-cminpack
==> Installing roboptim-core-plugin-cminpack from roboptim/homebrew-roboptim
==> Cloning https://github.com/roboptim/roboptim-core-plugin-cminpack.git
Updating /Library/Caches/Homebrew/roboptim-core-plugin-cminpack--git
==> Checking out branch master
Error: inreplace failed
CMakeLists.txt:
  expected replacement of "ADD_REQUIRED_DEPENDENCY(\"roboptim-core >= 2.0\")" with "ADD_REQUIRED_DEPENDENCY(\"roboptim-core\")"

@bchretien
Copy link
Member

For the PG (cc @jorisv), the only RobOptim packages you need are roboptim-core and roboptim-core-plugin-ipopt (which is missing from PG's CMakeLists.txt), and apparently the old 2.0 API is used.

@ahundt
Copy link
Author

ahundt commented Jul 22, 2015

Ok, thanks for the info. Are the 2.0 components still present in the current API or has there been a breaking change? That is, do I need to use an old version or will the current one run with it?

@bchretien
Copy link
Member

The API changed quite a lot, mostly from version 2.0 to 3.0, the biggest change involves the functions and was required since we now use Eigen::Ref to avoid costly allocations/copies.

I don't know if @jorisv plans on updating it, but just in case: most of it can be solved with some simple regular expressions, and the details are explained here. Also, if using the master branch and the IPOPT plugin, some of the latest (not released) changes target sparse computation for increased performance: when filling the Jacobian matrix of constraints (e.g. here), coeffRef needs to be used in place of insert, since we now keep the allocated matrices in the plugins, and insert cannot be used on existing elements, while coeffRef will add it if it does not exist. I did this since that specific part became quite expensive for very large sparse matrices (e.g. ~30 000 nonzeros), and got a really appreciated speedup out of it.

In the meantime you need to use the 2.0 release (but we're back to the original problem where latex/dvips/gs will be expected when generating the doc).

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