installation on OS X 10.7

Discussions on installation issues go here.

Moderator: Moderators

folderol
Posts: 3
Joined: 26 Jun 2012, 12:01

installation on OS X 10.7

Postby folderol » 26 Jun 2012, 12:33

I'm trying to install polymake for someone who has been unable to do it on their own. I personally have no idea what polymake is for or what it does, but I know how to install software.

That said, I cannot for the life of me get this thing going. Even simply following the noodly appendages of the hacked flowchart that is the installation instructions has been maddening, so I'm turning to you guys to maybe restart from square one.

Initially, I tried to compile polymake without fink. Hours later, I realized this is nigh impossible.

So, I uninstalled all the stuff I managed to successfully install, then tried again with fink.

Hours later, I got all of the prerequisites installed, but polymake still won't compile, neither 2.11 with the patch nor 2.12 without it. I've tried 3 different gcc versions, but no dice.

The binary installation allegedly doesn't work for 10.7. I see there is supposed to be some sort of "app", but there's nothing in any of the folders labeled "apps" that looks appy.

So.

Let's start over.

What should I be doing to make this work? Which version should I try?

The place where I last gave up is this...fink is installed, along with all the necessary packages (maybe).

./configure output for 2.12 says:

Code: Select all

Could not compile a test program checking for the GNU Multiprecision Library (GMP). The most probable reasons are that the library is installed at a non-standard location, lacking developer's subpackage or missing at all. Please refer to the installation instructions at http://polymake.mathematik.tu-darmstadt.de/doku.php/howto/install. The complete error log follows: dyld: Library not loaded: /usr/local/lib/libppl_c.4.dylib Referenced from: /usr/local/libexec/gcc/x86_64-apple-darwin11.4.0/4.7.1/cc1plus Reason: image not found g++: internal compiler error: Trace/BPT trap: 5 (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
"fink install gmp" doesn't work because there's no package called gmp, but I did install gmp5. Is this the problem, or another wild goose chase?

paffenholz
Developer
Posts: 182
Joined: 24 Dec 2010, 13:47

Re: installation on OS X 10.7

Postby paffenholz » 26 Jun 2012, 14:15

I assume that you use a Mac with Mac OS 10.7.

polymake has been successfully compiled both with and without fink. Take 2.12, there is no reason that 2.11 should make something easier, but you miss a lot of new features.

There are binaries on the download page, that should work in all but very few cases. New ones will probably appear in the next one or two weeks. The "polymake app" is not a true and native app, it just contains a precompiled polymake with all dependencies and a script that starts a terminal, sets some ENV variables and starts polymake inside this terminal. But it should start by clicking the app-folder.

Compiling polymake:

In any case: the gcc apple includes in Xcode only shares the name with the real gcc. You need to have your own. The one of fink would be okay. You can compile your own, but don't take any of the 4.5.*. And maybe also don't take a 4.7.*, in the past those with odd minor numbers tend to not work well. Supply CC=<path-to-your>/gcc CXX=<path-to-your>/g++ to configure. clang is too buggy.

with fink:
- you are right, it should be gmp5. From the given error message I assume this is not found. Has fink installed ppl ("fink list ppl" should have an "i" in front of some "ppl")? I don't think apple ships a libppl, but I currently don't have a 10.7 to check. Is "sw/*" in your $PATH, and comes before apples directories? Otherwise call ". /sw/bin/init.sh" in the shell, or supply "FINK=/sw/bin/fink" to configure. If nothing helps you could put /sw/{lib,include} into LDFLAGS, CFLAGS
- You have to compile everything for the same architecture as fink was built. But that seems to be the case.

EDIT: the error message more likely suggest that your privately installed gcc does not find your libppl. Is that installed at a place where it can be found?

without fink:
- You have to supply "--with-fink=no" to configure. Otherwise polymake tries to deduce some parameters from the fink script
- the self-compiled gmp,... must provide the same architecture (x86_64 recommended). Provide CFLAGS="-arch x86_64" ARCHFLAGS='-arch x86_64' if needed.
- and they must be found, e.g. by placing them into CFLAGS and LDFLAGS, or use the --with-* statements.

------------------------

Apologies for the lengthy installtion instructions, but they try to take care of every possible extra wishes various people had for installing polymake.

Please ask again if this does not help.

folderol
Posts: 3
Joined: 26 Jun 2012, 12:01

Re: installation on OS X 10.7

Postby folderol » 26 Jun 2012, 15:55

Hmmm, well, I was hoping for directions on a more specific path (please, limit my options!), but thank you very much for all the work.

I am currently away from the machine, but just want to make sure I understand all your advice before I get back to it...

So, I should be able to just double-click on the "app" folder and it should Just Work? Without any installation of all the other stuff? I'm not a Mac person, so I didn't know that was a reasonable thing to try.

As for the binaries, is it also true that I should just be able to download those and have them Just Work without gmp and mpfr and all those other consonants? The instructions I saw said to do a "dpkg -i" on the binaries files, but I've never used dpkg and it wasn't clear to me that it would work on a Mac. Pretty sure they also said that I'd need to install Xcode and fink to make that work, and by "Xcode" they meant "some other version of gcc", which needs all that other stuff...which seems like it wouldn't involve any time savings.

If you need to do all that heavy lifting, you might as well just compile it and be sure it will work, right? Although, I guess I haven't had any success at compiling...

Anyway, as for where I got stuck...OK, it at least seems like I'm on the right track. I had gcc 4.7 installed, but then thought it might be too new, so I went back to 4.6. gmp5 and some version of ppl are installed.

I put ". /sw/bin/init.sh" in the .profile, and fink itself seemed to be working fine.

Everything is installed at whereever fink decided the best place was. I didn't make any changes to the default configurations.

Let's just forget about "without fink", because I couldn't get half of the packages to compile without it.

Whew, OK. I think that's everything. At least I seem to be in the neighborhood of knowing what's going on.

Again, thanks very much for all your help.

paffenholz
Developer
Posts: 182
Joined: 24 Dec 2010, 13:47

Re: installation on OS X 10.7

Postby paffenholz » 26 Jun 2012, 22:33

I wasn't sure about what you were trying and what you would prefer...
So, I should be able to just double-click on the "app" folder and it should Just Work? Without any installation of all the other stuff? I'm not a Mac person, so I didn't know that was a reasonable thing to try. As for the binaries, is it also true that I should just be able to download those and have them Just Work without gmp and mpfr and all those other consonants?
This applies to the thing you can download here (or with the "bundle" link on the downloads page). If you mount it (double click) it contains a compiled version of polymake that you can just drag to the /Application/ folder. Then you can double click it like any other program. No further installation necessary. The other things in the dmg are there for license reasons.

The drawback: Currently it comes with gmp 5.0.2, and that has a bug that may sometimes cause polymake running into an infinite loop. I'm switching to 5.0.5, but this may take another couple of days. You can wait, or just replace the polymake.app in /Application later. The only trace apart the thing in /Application that polymake leaves on the computer is a hidden directory in the home folder for customization.
The instructions I saw said to do a "dpkg -i" on the binaries files, but I've never used dpkg and it wasn't clear to me that it would work on a Mac. Pretty sure they also said that I'd need to install Xcode and fink to make that work, and by "Xcode" they meant "some other version of gcc", which needs all that other stuff...which seems like it wouldn't involve any time savings.
That only applies to older versions of Mac OS. The many changes between 10.6 and 10.7 made the installation description a bit messy. Basically Mac OS is a unix variant, and fink uses package management similar to debian.
Anyway, as for where I got stuck...OK, it at least seems like I'm on the right track. I had gcc 4.7 installed, but then thought it might be too new, so I went back to 4.6. gmp5 and some version of ppl are installed.

I put ". /sw/bin/init.sh" in the .profile, and fink itself seemed to be working fine.
That sound like everything should be okay. Then I currently can't explain the lacking libppl that your gcc complains about. Is there a libppl at the place where cc1plus wants to find it? Is is somewhere else? Are the gmpxx header and lib in /sw/{lib,include}? It seems that you are using your own version of gcc, not one of fink. But this should not be a problem.

I'll think about it again. I don't have a 10.7 available right now, but when I have I will try installation with fink myself.
Whew, OK. I think that's everything. At least I seem to be in the neighborhood of knowing what's going on.
Again, thanks very much for all your help.
I really hope you get it running, and I am really sorry for all the problems. Apple dropping support for gcc and switching to an unfinished version of clang came unexpected.

folderol
Posts: 3
Joined: 26 Jun 2012, 12:01

Re: installation on OS X 10.7

Postby folderol » 28 Jun 2012, 13:50

I wasn't sure about what you were trying and what you would prefer...
All I wanted to do was install it and make it work. I only tried all that complicated stuff because the documentation seemed to indicate that it was necessary.
This applies to the thing you can download here (or with the "bundle" link on the downloads page).
Ah, if I'd understood that initially, I would not have troubled you at all! That seems to work, thank you.
Basically Mac OS is a unix variant, and fink uses package management similar to debian.
I understood the basic premise, but misunderstood the documentation. Where it says...
Except for the 10.7 app bundle you first have to install Xcode.
...I interpreted the "Except for" as "However", which is poor grammar but that's how it sounded in my head.

Also I didn't think there would be pages of complex explanation if there were a simple "app". Note that in the "Installing the App Bundle" section, there's no actual link to the bundle itself. I didn't notice it hidden in the large compatibility chart.

I would suggest that the "polymake on the Mac" page have an explicit note at the top that says if you have 10.7, just download this .dmg file and go to town.

If all you want to do is make it work, everything else is just noise.
It seems that you are using your own version of gcc, not one of fink. But this should not be a problem.
Nope, I just used the gcc46 package on fink. (Although I initially tried installing it without fink, and also tried gcc47 with fink.)

At any rate, thanks for the help. I see that updating in the future (and future installations) will be trivial, so I appreciate all your hard work. My issue was with the documentation, not the engineering.

Success!

paffenholz
Developer
Posts: 182
Joined: 24 Dec 2010, 13:47

Re: installation on OS X 10.7

Postby paffenholz » 28 Jun 2012, 16:22

All I wanted to do was install it and make it work. I only tried all that complicated stuff because the documentation seemed to indicate that it was necessary.
Ah, if I'd understood that initially, I would not have troubled you at all! That seems to work, thank you.

Also I didn't think there would be pages of complex explanation if there were a simple "app". Note that in the "Installing the App Bundle" section, there's no actual link to the bundle itself. I didn't notice it hidden in the large compatibility chart.
Some people prefer to compile themselves, and some want to be able to add own code, etc. So they are not happy with a binary version... I tried to make this point more clear on the installation page.

Sorry for the complications. Enjoy.

paffenholz
Developer
Posts: 182
Joined: 24 Dec 2010, 13:47

Re: installation on OS X 10.7

Postby paffenholz » 04 Jul 2012, 00:42

I have updated the binaries for 10.7 and polymake 2.12 with gmp 5.0.5. Hopefully this solves toe problem with infinte loops caused by some commands.


Return to “Installing polymake”

cron