News for hackers. Stuff that matters.
Re:Xcode, GCC, and Homebrew by nohat on Thursday February 16, 2012 @05:15PM (#3600952)
I remember a terrible experience trying to get gfortran working on osx. I ended up permanently borking my glibc. If this doesn't use the real gcc I imagine similar experiences may await. Nonetheless that is much better than downloading xcode just for GCC.
Re:Xcode, GCC, and Homebrew by ruediger on Thursday February 16, 2012 @05:54PM (#3601092)
Apple doesn't use glibc.
Re:Xcode, GCC, and Homebrew by nohat on Thursday February 16, 2012 @05:58PM (#3601106)
I needed it for my gcc and gfortran install. I am not sure whether osx uses glibc for xcode. Somehow despite removing and replacing everything related to glibc, it was still broken. Never did figure it out.
Re:Xcode, GCC, and Homebrew by calloc on Thursday February 16, 2012 @06:33PM (#3601250)
glibc is not used by the base system. So if you installed glibc yourself then the problem is not Apple's.
Re:Xcode, GCC, and Homebrew by nohat on Thursday February 16, 2012 @07:39PM (#3601451)
Sure, the problem was installing gfortran, which (as I recall) requires the real gcc. I suspect (though I never did figure out what exactly was wrong) that some sort of a library conflict with xcode's gcc was responsible. As this package is still not the real gcc (they don't want gpl v3 I believe) anyone who wants eg. gfortran will still need a separate installation.
Re:Xcode, GCC, and Homebrew by nknight on Thursday February 16, 2012 @08:29PM (#3601595)
gcc and glibc are different things, and gcc does not require glibc. I don't know that glibc even runs on OS X/Darwin, it would seem strange for any time to be invested in such an endeavour.
Re:Xcode, GCC, and Homebrew by nohat on Thursday February 16, 2012 @08:46PM (#3601639)
gfortran requires glibc.
Re:Xcode, GCC, and Homebrew by nknight on Thursday February 16, 2012 @09:08PM (#3601721)
I can't find any evidence of that. The gfortran 4.3 release notes strongly imply it doesn't:

"Support for backtraces on glibc-based systems via the -fbacktrace option is now implemented. On all systems, a coredump can be generated for errors in the run-time library using `-fdump-core`."

The GCC suite has a pretty clear history of not being dependent on glibc, and some searching brings up no mention of it requiring glibc, and a few mentions of people clearly building it without glibc.

Re:Xcode, GCC, and Homebrew by nohat on Thursday February 16, 2012 @09:29PM (#3601781)
http://old.nabble.com/GLIBC-and-executable-builds-on-Gfortra...

'I have been attempting unsuccessfully to try the latest gfortran snapshot executables...The reason for the problem is that they require the bleeding-edge version of GLIBC to run:'

http://www-zeuthen.desy.de/linear_collider/cernlib/cernlib_2...

key excerpt being: 'One problem is that the functions csqrt, csqrtf, csqrtl of libm (glibc) which are used by gcc4 are still buggy for x86_64 architectures...'

Re:Xcode, GCC, and Homebrew by nknight on Thursday February 16, 2012 @09:55PM (#3601879)
Your first link is about gfortran executables for Linux (specifically a specific snapshot build, not the source code itself), not OS X. Your second one is about glibc systems, not OS X, is over six years old, and complains simply about buggy functions in glibc -- what is it that makes you think using glibc would solve a glibc problem?

Neither of these in any way imply a general dependency on glibc. On the contrary, the second one implies you'd have more luck without it, if the issue were still extant -- which it's not, the bugs were closed out six years ago.

Re:Xcode, GCC, and Homebrew by nohat on Friday February 17, 2012 @11:52AM (#3603959)
First: Yep, there's not much available about compiling gfortran for osx. The link does show an example of gfortran requiring glibc - which is the point you were disagreeing with.

Second: just another example (by descending order of googleableness) of the main gcc requiring glibc.

Quite possibly there is an osx (or other bsd) specific c library that can substitute for glibc, but I did not find it, and gfortran will complain without it.

'what is it that makes you think using glibc would solve a glibc problem?' Eh? I used glibc to solve a 'missing glibc' problem. I then had other problems with glibc which I attempted to solve.

Re:Xcode, GCC, and Homebrew by nknight on Friday February 17, 2012 @06:31PM (#3605439)
You're not understanding. The first example "requires glibc" because the binaries were linked against glibc, just like they'd be linked against OS X's libc if they'd been built for OS X.

The second example is, again, an issue of gcc being built against glibc. You can build it against any libc you want, but when built against glibc, the resulting binaries are obviously going to use glibc.

You appear to have a fundamental misunderstanding of the difference between the requirements of source code, and the requirements of the binaries built from them. The latter are not the same as the former, and will vary depending on how you built the source code.

And when I just built gfortran, it didn't complain about the lack of glibc at all. If yours was complaining, I think you must have configured something incorrectly, though it escapes me what that could be.