Index: doctor.tcl
===================================================================
--- doctor.tcl	(revision 129415)
+++ doctor.tcl	(working copy)
@@ -107,23 +107,23 @@
         get_config config_options $parser_options $xcode_config_path 
 
         # Start the checks
-        check_path $config_options(macports_location) $config_options(profile_path) $config_options(shell_location)
-        check_xcode config_options
-        check_for_app curl
-        check_for_app rsync
-        check_for_app openssl
-        check_for_app sqlite3
-        check_macports_location
-        check_free_space
-        check_for_x11
-        check_for_files_in_usr_local 
-        check_tarballs 
-        check_port_files 
-        check_for_package_managers
-        check_for_stray_developer_directory
+        #check_path $config_options(macports_location) $config_options(profile_path) $config_options(shell_location)
+        #check_xcode config_options
+        #check_for_app curl
+        #check_for_app rsync
+        #check_for_app openssl
+        #check_for_app sqlite3
+        #check_macports_location
+        #check_free_space
+        #check_for_x11
+        #check_for_files_in_usr_local 
+        #check_tarballs 
+        #check_port_files 
+        #check_for_package_managers
+        #check_for_stray_developer_directory
         check_compilation_error_cache
-        check_for_dyld
-        check_for_clt
+        #check_for_dyld
+        #check_for_clt
     }
 
     proc check_for_clt {} {
@@ -238,6 +238,8 @@
         # Returns:
         #           None
 
+        # TODO: Should we drop privileges?
+
         output "compilation errors"
 
         set filename    "test.c"
@@ -246,15 +248,24 @@
         puts $fd "int main() { return 0; }"
         close $fd
 
-        set output      [exec clang $filename -o main_test]
+        # 'clang' will fail when using
+        # https://trac.macports.org/wiki/UsingTheRightCompiler#testing
+        # TODO: use default C compiler
+        # TODO: skip if no C compiler installed
+        catch {exec /usr/bin/clang $filename -o main_test} output
 
         file delete $filename
         file delete "main_test"
 
-        if {"couldn't create cache file" in $output} {
-            ui_warn "found errors when attempting to compile file. To fix this issue, delete your tmp folder using:
+        if {[string length $output] > 0} {
+            # Some type of error
+            if {[string match "*couldn't create cache file*" $output]} {
+                ui_warn "found errors when attempting to compile file. To fix this issue, delete your tmp folder using:
                        rm -rf \$TMPDIR"
-            success_fail 0 
+            } else {
+                ui_warn $output
+            }
+            success_fail 0
             return
         }
 
