Hello World app takes 45s to start from the terminal, gcc, gdb and dtrace problems

Joined
Feb 11, 2009
Messages
3
Reaction score
0
Points
1
Hi,

If I compile a program like

#include <stdio.h>

int main(int argc, char** argv)
{
printf("Hello World\n");
return 0;
}​

on the terminal (simply using 'gcc helloworld.c') and then run it from Terminal, it takes about 45 seconds where the entire terminal app is locked up and the spinning pinwheel is shown before the program executes.

What on earth could be going on? If I try

sudo dtruss ~/ea/c/a.out
Password:
dtrace: failed to execute /Users/ea/c/a.out: file is set-id or unreadable [Note: the '-c' option requires a full pathname to the file]​

The file is a+rx (what does set-id mean?).

Finally, if i try gdb ./a.out:

gdb ./a.out
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"..../a.out: No such file or directory.

(gdb) run
Starting program:
No executable file specified.
Use the "file" or "exec-file" command.
(gdb) start​

I'm totally confused. This stuff should all just work. What could be happening? FWIW, This is using

gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)​

gdb -v
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".​

Mac OS X 10.5.5, Xcode 3.1.2
 
Joined
Jan 23, 2009
Messages
162
Reaction score
1
Points
18
Location
Indiana
Your Mac's Specs
Soon to own
Remove the int argc, blah blah... Stuff, should be instantanious.
 
OP
E
Joined
Feb 11, 2009
Messages
3
Reaction score
0
Points
1
Remove the int argc, blah blah... Stuff, should be instantaneous.

Thanks for the idea, but no dice. These problems are on my work computer. I tried the same thing on my macbook pro w/o any problem. Reinstalling xcode didn't help.
 
Joined
Jan 23, 2009
Messages
162
Reaction score
1
Points
18
Location
Indiana
Your Mac's Specs
Soon to own
What are your work computer's specs? Small processor = slow compiler
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top