[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode 3.0, gcc and autoconf

From: Sebastien Mirolo
Subject: XCode 3.0, gcc and autoconf
Date: Thu, 10 Apr 2008 16:38:12 -0700

This is not a bug report per-se and I am not sure if it has already been
fixed or analyzed. All I could find on the internet were logs of
configure failures on MacOSX10.5 and various esoteric workarounds. 
"error: cannot remove conftest.dSYM"
I did some digging and here is what I found. I hope it helps.
Giving up on stabs, Apple has introduced two options for debugging
executable binaries in their toolchain: dwarf and dwarf-with-dsym. It
seems that until recently, the Apple gcc driver was configured to use
dwarf but in the later toolchain release (shipping with MacOSX 10.5.2),
the compiler driver runs dsymutil has the last pass of the compilation.
Here's the example command and tail of the log.
$gcc -v -g -o hello hello.c
Using built-in specs.
Target: i686-apple-darwin9
 /usr/libexec/gcc/i686-apple-darwin9/4.0.1/collect2 -dynamic -arch i386
-macosx_version_min 10.5.2 -weak_reference_mismatches non-weak -o hello
-lcrt1.10.5.o -L/usr/lib/i686-apple-darwin9/4.0.1
1 -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../..
-lgcc_s.10.5 -lgcc -lSystem
 dsymutil hello
dsymutil is run automatically at the end of the driver and that causes
the .dSYM to appear.
The most informative information about gdb and .dSYM is at
http://developer.apple.com/releasenotes/DeveloperTools/RN-GDB/. I tried
    defaults write com.apple.DebugSymbols DBGDSYMPath -string /tmp
    gcc -g -o hello -v hello.c
but it does not help. The .dSYM is still in the executable directory.
The following commands do NOT automatically produce a .dSYM file though:
     gcc -c -g -o hello.o hello.c
     gcc -g -o hello hello.o
    gcc -o hello hello.c
I tried to figure out a way to configure Apple's gcc to avoid the
automatic dsymutil invokation or pass "--outpath=" option as specified
in dsymutil man pages but have not been successful at doing so yet.
At least, I now have an exact explanation for the "rm -f conftest.dSYM"
failure I see. I thought you might be interested if you did not already

reply via email to

[Prev in Thread] Current Thread [Next in Thread]