Reputation: 11
I have been trying to install GDB on my new Macbook Pro running Mountain Lion. I have installed using both Macports and Brew, I have successfully code signed the binaries, but in both cases when I try to debug a simple "Hello World" application I receive a whole load of warnings similar to:
warning: `/Users/gkhanna/build/x86_64-apple-darwin13.0.0/libgfortran/.libs/_abs_c10.o': can't open to read symbols: No such file or directory.
warning: `/Users/gkhanna/build/x86_64-apple-darwin13.0.0/libgfortran/.libs/_abs_c16.o': can't open to read symbols: No such file or directory.
warning: `/Users/gkhanna/build/x86_64-apple-darwin13.0.0/libgfortran/.libs/_abs_c4.o': can't open to read symbols: No such file or directory.
warning: `/Users/gkhanna/build/x86_64-apple-darwin13.0.0/libgfortran/.libs/_abs_c8.o': can't open to read symbols: No such file or directory.
Now, my username is not gkhanna and there are no users registered on the laptop by that name. The versions of gdb I have installed are 7.6.0 and 7.6.1. Could anybody explain what has happened here and how to point GDB to the correct path?
Upvotes: 1
Views: 617
Reputation: 158
To quiet the warnings, you can strip the debugging symbols that can't be read (since they point to files not on your machine and really shouldn't have been left in there in the first place.)
First, figure out which libgfortran dylib your gcc is using with otool -L a.out
, then strip the debug symbols from that libgfortran dylib with strip -x path_to_libgfortran_dylib
.
Upvotes: 1