cc command is blocking

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hnshashi
    New Member
    • Jul 2008
    • 15

    cc command is blocking

    Hi all,
    I am using Linux OS,
    cc and make commands are blocking,

    If i compile any c program
    $cc hell.c

    blocking.....


    $
    make also not working

    plz help me

    --
    shashidhar
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Try to strace it, as in:

    [code=c]
    strace cc hell.c
    [/code]

    and see if it hangs in a system call somewhere. Also consult your man pages
    for the strace utility.

    kind regards,

    Jos

    Comment

    • hnshashi
      New Member
      • Jul 2008
      • 15

      #3
      Ya i checked o/p of strace(strace cc hell.c).
      but i didnt get.

      If give complete path of cc command i'e $/usr/bin/cc hell.c then it is working.


      Even PATH env. varaible also has set properly.

      Any solution....


      --
      Shashidhara HN

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by hnshashi
        Ya i checked o/p of strace(strace cc hell.c).
        but i didnt get.
        Did strace 'hang' as well? What was the last system call?

        kind regards,

        Jos

        Comment

        • hnshashi
          New Member
          • Jul 2008
          • 15

          #5
          Even with strace also it hang,
          I am pasting last few lines from "strace cc hell.c".

          access("/opt/java/jstudio_ent81/ide/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
          access("/opt/java/eclipse/cc", X_OK) = -1 ENOENT (No such file or directory)
          access("/usr/kerberos/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
          access("/usr/lib/ccache/cc", X_OK) = 0
          lstat64("/usr/lib/ccache/cc", {st_mode=S_IFLN K|0777, st_size=15, ...}) = 0
          stat64("/usr/lib/ccache/cc", {st_mode=S_IFRE G|0755, st_size=40300, ...}) = 0
          lstat64("/usr", {st_mode=S_IFDI R|0755, st_size=4096, ...}) = 0
          lstat64("/usr/lib", {st_mode=S_IFDI R|0755, st_size=61440, ...}) = 0
          lstat64("/usr/lib/ccache", {st_mode=S_IFDI R|0755, st_size=4096, ...}) = 0
          lstat64("/usr/lib/ccache/cc", {st_mode=S_IFLN K|0777, st_size=15, ...}) = 0
          readlink("/usr/lib/ccache/cc", "/usr/bin/ccache", 4096) = 15
          lstat64("/usr", {st_mode=S_IFDI R|0755, st_size=4096, ...}) = 0
          lstat64("/usr/bin", {st_mode=S_IFDI R|0755, st_size=69632, ...}) = 0
          lstat64("/usr/bin/ccache", {st_mode=S_IFRE G|0755, st_size=40300, ...}) = 0
          access("/usr/local/bin/cc", X_OK) = -1 ENOENT (No such file or directory)
          access("/usr/bin/cc", X_OK) = 0
          lstat64("/usr/bin/cc", {st_mode=S_IFLN K|0777, st_size=3, ...}) = 0
          stat64("/usr/bin/cc", {st_mode=S_IFRE G|0755, st_size=204264, ...}) = 0
          lstat64("/usr", {st_mode=S_IFDI R|0755, st_size=4096, ...}) = 0
          lstat64("/usr/bin", {st_mode=S_IFDI R|0755, st_size=69632, ...}) = 0
          lstat64("/usr/bin/cc", {st_mode=S_IFLN K|0777, st_size=3, ...}) = 0
          readlink("/usr/bin/cc", "gcc", 4096) = 3
          lstat64("/usr/bin/gcc", {st_mode=S_IFRE G|0755, st_size=204264, ...}) = 0
          stat64("kk.c", {st_mode=S_IFRE G|0644, st_size=73, ...}) = 0
          open("/home/shashidhara.n/.ccache/stats", O_RDWR) = 4
          fcntl64(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET , start=0, len=1}) = ? ERESTARTSYS (To be restarted)
          --- SIGWINCH (Window changed) @ 0 (0) ---
          fcntl64(4, F_SETLKW, {type=F_WRLCK, whence=SEEK_SET , start=0, len=1} (Last System Call)




          --
          Shashidhara HN

          Comment

          • gpraghuram
            Recognized Expert Top Contributor
            • Mar 2007
            • 1275

            #6
            Type
            which CC
            command and see which CC it is picking up.


            Raghu

            Comment

            • hnshashi
              New Member
              • Jul 2008
              • 15

              #7
              I typed "which cc" command.
              its showing like this
              [shashidhara.n@l ocalhost ~]$ which cc
              /usr/lib/ccache/cc
              [shashidhara.n@l ocalhost ~]$


              --
              Shashidhara

              Comment

              • hnshashi
                New Member
                • Jul 2008
                • 15

                #8
                Now it is working,

                Some link problem was there b/w /usr/lib/ccache/cc and /usr/bin/ccache


                Thanking for your's suggestions.



                --
                Shashidhara HN

                Comment

                Working...