udacity / CarND-MPC-Project

CarND Term 2 Model Predictive Control (MPC) Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAC instructions completely fail

westofpluto opened this issue · comments

Cannot run that checkout command (or revert) - it says something about "not a tree"

I have the same issue.

$ cd /usr/local/Homebrew
$ git checkout 19f75951641d3a5e70ea105f76a6a77bc0553d07
fatal: reference is not a tree: 19f75951641d3a5e70ea105f76a6a77bc0553d07

$ cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-science
$ git checkout 19f75951641d3a5e70ea105f76a6a77bc0553d07
fatal: reference is not a tree: 19f75951641d3a5e70ea105f76a6a77bc0553d07

The solution is to install directly from the source repo, i.e., don't use homebrew. I detailed the solution in the udacity discussion forums:

https://discussions.udacity.com/t/installing-ipopt-on-mac/502218/43

So I finally got it to work on my MacBook, but not using brew. Instead I downloaded and installed directly, as follows:

Get the Ipopt zip file from here: https://www.coin-or.org/download/source/Ipopt/. I downloaded Ipopt-3.12.9.zip, although I suspect the tgz file would work fine too.

Unpack the zip or tar file, then CD into that folder. Let’s call that folder IPOPT_ROOT. On my system it is /Users/milgen/Downloads/Ipopt-3.12.9/

In that folder you will see a subfolder called ThirdParty. Cd into ThirdParty. There you will see subfolders for dependencies like ASL, Blas, HSL, Lapack etc. For all folders except HSL, do the following:

3A. CD into the folder and run ./get* where the * part depends on the folder. For example for Blas the file is get.Blas. This command downloads the source code to build.

3B. Run this command: ./configure --prefix=/usr/local. This creates a valid makefile such that later we can run make install and it will install the code into subfolders from /usr/local

3C. After configure completes, run "make"
3D. After make completes, run “make install”

Do the above for all the subfolders of ThirdParty other than HSL. I think the code in HSL gets compiled automatically when we compile ipopt itself, see below.

Now that all the ThirdParty dependencies are built and installed, cd back up from the ThirdParty folder into IPOPT_ROOT (should be /your/path/to/Ipopt-3.12.9). Now run the following:
./configure --prefix=/usr/local
make
make install
I did all this and everything seemed to compile and build just fine. Later when I went into the project folder, I edited the file CMakeLists.txt only to fix the link_directories statement for libuv: The path before said something like /usr/local/Cellar/libuv/1.*/lib, which my compiler didn’t like. On my machine, the actual path is /usr/local/Cellar/libuv/1.18.0/lib so that is what I used:
link_directories(/usr/local/Cellar/libuv/1.18.0/lib)

Finally I built the project in the usual way:
mkdir build
cd build
cmake …
make

Anyway, everything worked fine installing this way. Yes it takes a while but it works.

Hi! I've updated the script to be included within our own repo. If you are still having trouble, can you switch it to: brew tap udacity/CarND-MPC-Project https://github.com/udacity/CarND-MPC-Project

The updated script is not working, following error is displayed


make[2]: dynamiclib: No such file or directory
make[2]: [libpord.dylib] Error 1 (ignored)
echo libpord.dylib

I am trying to follow westofpluto instruction but I am stuck downloading two dependencies: Mumps and Metis; all the other dependencies were downloaded without issue.

Downloading the source code from ...
./get.Mumps: line 31: ftp: command not found

Downloading the source code from glaros.dtc.umn.edu...
./get.Metis: line 26: ftp: command not found

Anyone else have this problem? I think it's the same issue that cause the provided script to fail