0

I had no luck finding precompiled packages of glibc for apple darwin. I could not compile gcc from source, and I'm assuming that compiling glibc will also be very difficult. What I want:

Configuring the darwin system so that it only uses the GNU C runtime libraries, along with gcc.

I can specify more if needed.

osolmaz
  • 1,873
  • 2
  • 24
  • 41
  • Q: What's wrong with the standard "libc" preinstalled on your system??? Q: What specific problems did you have compiling glibc? – paulsm4 Nov 14 '12 at 19:19
  • @paulsm4 I am using a finite element software written in fortran, mixed with c for dynamic allocation. After some debugging, I've come to believe that apple's c library is the problem. I've not tried installing glibc yet, but I assume it would be as painful as not being able to compile gcc. The computer belongs to someone else, and I'll try compiling glibc when I find some time. But it would be nice if there were any precompiled packages beforehand. – osolmaz Nov 14 '12 at 19:24
  • OK: Please look at these links: 1) [GNU-Darwin libc](http://www.gnu-darwin.org/cvs2.php), 2) [How to build Apple's opensource libc](http://stackoverflow.com/questions/7592069/how-to-build-apples-opensource-libc); please tell us 3) what FORTRAN and C compilers/versions you're using, and 4) what build/runtime errors you're getting by mixing C and FORTRAN. Ideally, you won't have to build or install anything :) – paulsm4 Nov 14 '12 at 19:42
  • @paulsm4 I'm using gfortran and gcc 4.2 (both). I'm getting a segmentation fault(11), and the program can run on the same machine with valgrind without segmentation faults. The same program executes perfectly on an ubuntu box. Does these ring a bell? – osolmaz Nov 14 '12 at 19:57

1 Answers1

0

I still haven't found a solution to this problem, but that is irrelevant now. The segmentation fault can only be reproduced in the 64 bit darwin libc. Furthermore, running the program with valgrind on the darwin suppresses the fault.

This led me to the conclusion that the problem is in the code, rather than the libraries. The code was not mine at the beginning, hence it's not my problem anymore. The program in some stage tries to access unallocated memory and my guess is that using glibc somehow compensates this error.

osolmaz
  • 1,873
  • 2
  • 24
  • 41