Results 1 to 6 of 6
  1. #1
    Hello World app takes 45s  to start from the terminal, gcc, gdb and dtrace problems

    Member Since
    Feb 11, 2009
    Posts
    3
    Hello World app takes 45s to start from the terminal, gcc, gdb and dtrace problems
    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

  2. #2
    Hello World app takes 45s  to start from the terminal, gcc, gdb and dtrace problems
    deer dance's Avatar
    Member Since
    Jan 23, 2009
    Location
    Indiana
    Posts
    162
    Specs:
    Soon to own
    Remove the int argc, blah blah... Stuff, should be instantanious.

    Proud Python Programmer/HTML Expert
    Believer in Mac OS 7

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

    Member Since
    Feb 11, 2009
    Posts
    3
    Quote Originally Posted by deer dance View Post
    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.

  4. #4
    Hello World app takes 45s  to start from the terminal, gcc, gdb and dtrace problems
    deer dance's Avatar
    Member Since
    Jan 23, 2009
    Location
    Indiana
    Posts
    162
    Specs:
    Soon to own
    What are your work computer's specs? Small processor = slow compiler

    Proud Python Programmer/HTML Expert
    Believer in Mac OS 7

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

    Member Since
    Feb 11, 2009
    Posts
    3
    Quote Originally Posted by deer dance View Post
    What are your work computer's specs? Small processor = slow compiler
    Brand new 2 x 2.8 GHz Quad-Core Intel Xeon

    I wish it was that easy :-)

  6. #6
    Hello World app takes 45s  to start from the terminal, gcc, gdb and dtrace problems
    deer dance's Avatar
    Member Since
    Jan 23, 2009
    Location
    Indiana
    Posts
    162
    Specs:
    Soon to own
    What compiler are you using?

    If it's the Dev C++ Compiler, then I'm stumped

    If not, Download Dev C++

    Proud Python Programmer/HTML Expert
    Believer in Mac OS 7

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. imac takes 3-4 mins to start
    By christle in forum Switcher Hangout
    Replies: 3
    Last Post: 09-10-2012, 11:12 PM
  2. Takes a long time to start up
    By Akaira in forum Apple Notebooks
    Replies: 7
    Last Post: 01-22-2011, 10:54 PM
  3. GCC creates console app
    By meldaproduction in forum OS X - Development and Darwin
    Replies: 1
    Last Post: 11-04-2009, 08:05 PM
  4. HELP: MacBook Pro Freezes/Grey Folder at Start up/Start up takes forever
    By TreyPeezyDotCom in forum OS X - Operating System
    Replies: 0
    Last Post: 06-15-2009, 05:26 PM
  5. Terminal.app Problems
    By meltbanana314 in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 02-13-2005, 01:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •