-
Notifications
You must be signed in to change notification settings - Fork 107
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
GalSim on OSX 10.9? #493
Comments
More update: I was wondering if I should blame clang, so I installed gcc v4.9, and got the same error message with it. |
I'm confused by the fact that the compiler doing the link step seems to be gcc rather than g++. Try setting CXX=g++ explicitly (scons should have used that automatically, but maybe something weird happened) and see if that helps. |
I've also been working on this today. My
which looks similar to @rmandelb's but with a slightly simpler --with-gxx-include-dir path. FWIW, I got my Xcode command line tools by running My issue compiling TMV is openmp. When I run with the default
If I compile with |
Hi all. Sorry I've been offline most of the day. I think at least one of the the complaints (that of @jmeyers314 ) is simply due to the fact that:
That's why the |
Sorry. This is a known problem with Apple's recent XCode releases. They switched to using clang, which does not support OpenMP yet. The TMV scons stuff knows that clang can't do OpenMP, so it will automatically disable it if you use clang++ as the compiler. The problem is that Apple decided to lie about the name of the compiler. They call it g++, even though it isn't compatible with g++. Pretty lame, IMO. It's one thing to alias c++ to the compiler that you want, but to alias g++ to something that isn't actually g++ is bad practice, IMHO. So the options are either to use WITH_OPENMP=false as you did, or do CXX=clang++, which will get TMV to figure it out automatically. It's something I need to fix for the next release, but I haven't done so yet. |
Ah. As Barney just said as well. :) |
Haha! I totally agree that this is pretty lame though: we surely won't be the only project that will try to use OpenMP by default and be thwarted by this cloak-and-dagger compiler naming. |
Lame. Shall I put something about this in the installation FAQ? Now that I've put Moving right along, I decided to try compiling GalSIm just to see if it recognizes that TMV is compiled and linked properly. (I did this in the full expectation that it was going to whine at some later point because I need to recompile boost with the new compiler, which I didn't really feel like doing tonight. I'll find a spare 4 hours sometime for that one. ;) The results were mixed: (1) It is happy with TMV, but
For reference, the unhappy part of config.log is here:
Also, in the interest of full disclosure: In a fit of laziness, I did not reinstall python (in other words, when I went to the new machine I took my old account on my old computer and this is the same old python from the old machine). I was hoping that that would be okay, but do you think I need a new install in order for all this stuff to work? |
Oh wait, I just noticed the message from config.log suggests it was getting screwed up by some old module I had in the GalSim directory (which I had deleted, but the .pyc file was still sitting around). I'm not sure how / why that happened! But when I deleted that .pyc file, the error about numpy went away. Sorry for the false alarm. |
... and now I'm really confused because it's not making me reinstall boost. I thought it had to be compiled with the same compiler as the GalSim C++ code? But GalSim compiled happily and I am able to import the module, run unit tests, etc. There is a warning when compiling GalSim:
|
I think I fixed the warning for you. What it is warning about would normally be undefined behavior if I did it on branch #493, but if it works for you, we can probably just merge it into both master and 1.0 without a PR. |
I agree, I think this can be merged directly. (I fixed a very minor, mildly amusing typo above) |
Thanks for the fix - that works for me, and I agree about merging directly. I put something in the FAQ about this; please feel free to edit as needed. |
I merged this branch into master, and cherry-picked the two commits into releases/v1.0. Closing #493. |
I was wondering if anyone else has compiled GalSim on OSX 10.9? I have a new computer and am trying to install GalSim on it, but I'm hitting trouble with some of the prerequisites. I've been doing a lot of my GalSim work on the cluster at CMU, but it would be nice to be able to work locally! Any tips from someone who made the transition to 10.9 successfully would be great.
Right now my trouble is TMV:
I am trying to compile it using clang; if I do
g++ --version
the output isFor scons, I am using the
WITH_BLAS=false
option. When I start compiling TMV I get some warnings near the beginning, but then there are outright errors like(and on and on like this)
@rmjarvis , any ideas?
The text was updated successfully, but these errors were encountered: