-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Conversation
print *, "done" | ||
end | ||
EOS | ||
Pathname('in.f90').write(fixture) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(testpath/"in.f90").write(fixture)
Any good news? |
No, been busy with other stuff. Will get on this eventually. |
Just add symlinks for gcc, g++ for backwards compatibility.
@adamv @jacknagel @mistydemeo @asparagui This is ready for review. Will probably merge later today if there's no objections. |
Looks good. |
I think the alias will cause problems, for example:
|
@mistydemeo expressed similar concerns. Will remove it and we can always add it back in future. |
Merged without alias. |
I've been trying to install gfortran as a dependency for a numpy install and it looks like gcc should now be used instead. Is there a resource anywhere that tells people how to cope with this sort of change? The disappearance of gfortran left me quite puzzled, and it took a while to find the cause... |
I don't understand. So now if I want Is there some way that it can be made very obvious that |
@kevinushey You already have gcc whenever you have gfortran. Gcc is the basis of the compiler collection. Homebrew made it implicit before, now it makes explicit. |
I see, thanks. I imagine there will be a few other people in my shoes ("huh? It seems bad to just break |
Is it possible to keep gfortran separate from gcc formula in homebrew? I already have gcc installed from the xcode developer commandline tools. |
@freddycct I don't know much about the formula, but gcc installed from the xcode should be actually clang. You can check it by run:
If you see some thing like |
Oh ok, what's the difference between clang gcc and the gcc in homebrew? I know one probably runs on some low-level VM while the other runs natively. Is the performance better for homebrew gcc ? |
Ran into an issue with this. On one Mac I have older
Adding |
So, doing:
fixed the above issue; but, how can users best be notified to do this? Reinstate |
@NikolausDemmel To be clear, you can always choose what compiler software should be built with. That much software defaults to something named "gcc" doesn't mean you don't have a choice. Homebrew itself already takes care of it internally. Outside Homebrew, you can always |
@xuhdev: Note that I am on 10.9 and I am talking about compiling opencv from source manually (not homebrew). When I do this with
For other software, e.g. urdfdom I get libstdc++ / libc++ incpatibility problems because dependecies are built with clang:
|
@mistydemeo: Yes. I think this is totally reasonable for people who need to use gcc as C/C++ compiler in addition to clang for some projects. I personally can do this, no problem. But I am not speaking for myself, I am advocating for the users who use homebrew as a tool to satisfy dependencies of stuff they install. They might not even use anything installed through homebrew directly. IMHO, if they never intend to do anything not default with their c/c++ compiler, but need gfortran (which Apple does not provide) for example to install popular python packages like numpy, scipy, matplotlib, they should not need to modify their [I said I would not argue this point any longer, but @mistydemeo's comment made me feel like it did not come across that I was not just arguing for my own sake; sorry, I hope I can resist the urge to reply next time.] |
I understand the position the Homebrew developers are taking, it is not really a dup, so making it keg-only doesn't really make sense. If I install I think our solution will be to create a copy of the This isn't the optimal solution because I don't want to take on the maintenance burden of |
I think I know one solution here. The gcc formula should remove the |
@xuhdev: Thanks for the hint. For the record, removing just the c++ does seem to resolve the issue of cmake for projects that |
Hi, I've been hit by this quit badly. Because I needed a re-install of numpy, and the standalone gfortran wasn't available any more, I eventually installed gcc - and hoped that it wouldn't interfere with the Xcode environment. Yes, I know about CC and CXX, but in effect requiring these settings for every upgrade of every homebrew package just to stay consistent with how things worked previously is a nightmare. Interestingly, @MikeMcQuaid states on https://github.com/Homebrew/homebrew/wiki/Custom-GCC-and-cross-compilers:
Absolutely true. Why are you doing it then? Removing the standalone gfortran compiler and requiring to put the entire gcc collection into the main path massively changes how the development environment behaves, and it breaks with homebrew's tradition to rely on the system provided tools. I'd be very much in favour of having a gcc than I can easily use along with Apple's command line tools There were a number of solutions proposed (different names - similar to glibtool vs. libtool / optionally linking in only parts of the compiler suite / keg-only) that are all fine to work with. But removing a standalone fortran compiler and forcing users to have to use a different compiler as default just because they want to use numpy or scipy (or R or god knows what) isn't a good way forward in my opinion. Some have argued that gcc isn't the default compiler on a Unix system. That's true formally, but practically, the vast majority of open source software will use a gcc if it finds one. One has to actively do something to enforce the use of another compiler in the presence of gcc. Putting gcc in the PATH means I actively have to do something in order to use the system's default compiler. And that means that for the majority of homebrew packages, the default compiler changes. Please reconsider this repackaging of gfortran. |
Would people rather we installed e.g. |
@MikeMcQuaid: I cannot judge if:
What I (and it seems some other people) would want is way to make gfortran available with a To directly answer your question, out of these two options I probably prefer the latter, but they are both suboptimal. |
@NikolausDemmel Can you please investigate those things by editing the formula and/or trying |
Yes. Basically being able to use a fortran compiler without side effects. Ideally, I'd also like to have a way to use the gcc compiler for compiling software, or even homebrew formulae (I have a use case for that, actually). I understand that one could temporarily add the respective cellar to PATH just for that build. What might be even nicer would be an option in a formula which specifies which compiler to use (maybe that's already possible; sorry, I'm relatively new to Homebrew) |
@cmarquardt You can use the |
Thanks for the hint;-) The use case I mentioned is a library (plain C) which uses OpenMP for parallelization. Oh but we are digressing from the original topic - sorry. |
@MikeMcQuaid: At least the specific problem with cmake seems to be caused by presence of /usr/local/c++, so if that were removed or renamed to c++-4.8 that specific problem goes away. However i have no idea about other situations where the c/c++ binaries with -4.8 suffix might affect something. As for gfortran, it turns out that at least the scipy pip package looks for |
@cmarquardt You can use Sounds like the best call may be to bring back prefixing the binaries e.g. |
@MikeMcQuaid: I think that could be a good practical solution, but I am by no means sure about the non-interference of |
@NikolausDemmel I disagree. Can you please try and do some decent research and publish your results here? It feels to me like you're wanting me to spend time fixing your issue without being willing to spend time researching what will or won't fix your problem. |
@MikeMcQuaid: The issue I personally noticed and reported, namely cmake projects with I'm not sure what else you would have me research. |
I'll give it a go. I have to rebuild numpy and scipy anyway... |
I've re-added the version suffix to everything installed by |
Using your gcc.rb from pull request 29943 (just before you merged it, actually...). Note I'm using a non-standard homebrew prefix /opt/homebrew instead of /usr/local; that never was an issue so far.
gives
Next
works fine and uses
results in errors, saying it can't find a working fortran compiler (I've removed stuff from the output to keep it readable:
which means it uses Apple's Acceleratioin framework for Lapack and Blas etc. It also finds the
I think the numpy setup.py tries to link something with the Fortran compiler; the python traceback ends with
I'll try to find out what's actually tested in setup.py, but did the old Thanks! |
I'm not sure if this the problem, but IIRC numpy's distutils build objects with the respective language compiler (say, With
and
gcc links this fine:
but of course
Again, I think the older |
Sorry - please forget all of the above. After completely scratching my installation of gcc and python, and updating brew, building python, numpy, scipy and matplotlib build without problems (using clang/clang++ and gfortran). Thank you @MikeMcQuaid for making that possible again. |
@cmarquardt Glad it's working, thanks for your patience and work. |
Thanks @MikeMcQuaid. With the latest gcc formula scipy installes through pip and so far no more c/c++ compiler issues popped up for us. |
Don't merge this yet; still work in progress.
This is the starting point to eventually replace the
gfortran
formula withgcc
now it is in core. We'll still allow people to set their own Fortran compilers but default to ourgcc
formula if it hasn't been set.