jeanluct / braidlab

Matlab package for analyzing data using braids
GNU General Public License v3.0
23 stars 9 forks source link

GMP installation issues with 3.0 #101

Closed jeanluct closed 9 years ago

jeanluct commented 9 years ago

Margaux is having some issues with the Mac binaries. Basically, they don't work out of the box if you don't have GMP installed. What's the easiest way to resolve this?

Two easiest things to do:

mbudisic commented 9 years ago

I believe both can be done for both distributions, no? In certain cases, users even on linux will not have sufficient privileges to install GMP using apt, and I wouldn't want to support manual installation of GMP for them.

On Mac, "homebrew" for now does a decent job of replicating the ease of use of apt. We could add that to "install GMP" suggestions.

jeanluct commented 9 years ago

Ok, well let's test it with Margaux, see if it works!

jeanluct commented 9 years ago

Update: Marko compiled _noGMP_ binaries and they work for Margaux.

New problem: -DBRAIDLAB_USE_GMP=0 does not work on Mac OSX. Linux uses GNU make, and Mac must use BSD make or something.

mbudisic commented 9 years ago

No no. That flag works fine. It's the specific syntax $ make BRAIDLAB_USE_GMP=0 vs $ make BRAIDLAB_USE_GMP=1 that does not work.

jeanluct commented 9 years ago

Ah, right. No need for -D. But it work on Linux.

mbudisic commented 9 years ago

This works on Mac OS X: $ BRAIDLAB_USE_GMP=1; make vs $ BRAIDLAB_USE_GMP=0; make but not on linux. I would guess this is due to Mac OS X using bash 3.2 and linux 4.2 on my machines. make is actually the same exact version on both of the systems I'm using.

jeanluct commented 9 years ago

Does this work on both? $ export BRAIDLAB_USE_GMP=1; make vs $ export BRAIDLAB_USE_GMP=0; make

mbudisic commented 9 years ago

OK, I figured out what it is. the syntax $ make BRAIDLAB_USE_GMP=0 is overriden by the global variable. In other words, first setting a global variable prevents make from using the variable passed as an argument. Global has to be cleared first before this syntax works. (And then it works on both Mac and linux, regardless of bash version)

jeanluct commented 9 years ago

So this wasn't working for you because you had a global defined? So for most people it won't be a problem?

mbudisic commented 9 years ago

Yes, I believe so. I had a global leftover from compiling makedist.

jeanluct commented 9 years ago

Ok, so it's not a bug. Just an unfortunate convention...

On Thu, Dec 11, 2014 at 1:52 PM, Marko Budisic notifications@github.com wrote:

Yes, I believe so. I had a global leftover from compiling makedist.

— Reply to this email directly or view it on GitHub https://github.com/jeanluct/braidlab/issues/101#issuecomment-66677545.

jeanluct commented 9 years ago

So does anything really need to change? Should we clarify something in the manual?

mbudisic commented 9 years ago

Not really, only if you feel like make BRAIDLAB_USE_GMP=0 syntax being overloaded by environ variable is something to note.

jeanluct commented 9 years ago

TODO: Marko writes a short blurb in guide about using homebrew to install GMP on OSX.

Then we can release 3.0.1.