473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 15 '08 #1
7 1670
JosAH
11,448 Expert 8TB
Try to strace it, as in:

Expand|Select|Wrap|Line Numbers
  1. strace cc hell.c
  2.  
and see if it hangs in a system call somewhere. Also consult your man pages
for the strace utility.

kind regards,

Jos
Jul 15 '08 #2
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
Jul 15 '08 #3
JosAH
11,448 Expert 8TB
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
Jul 15 '08 #4
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_IFLNK|0777, st_size=15, ...}) = 0
stat64("/usr/lib/ccache/cc", {st_mode=S_IFREG|0755, st_size=40300, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
lstat64("/usr/lib/ccache", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/lib/ccache/cc", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
readlink("/usr/lib/ccache/cc", "/usr/bin/ccache", 4096) = 15
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
lstat64("/usr/bin/ccache", {st_mode=S_IFREG|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_IFLNK|0777, st_size=3, ...}) = 0
stat64("/usr/bin/cc", {st_mode=S_IFREG|0755, st_size=204264, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/bin", {st_mode=S_IFDIR|0755, st_size=69632, ...}) = 0
lstat64("/usr/bin/cc", {st_mode=S_IFLNK|0777, st_size=3, ...}) = 0
readlink("/usr/bin/cc", "gcc", 4096) = 3
lstat64("/usr/bin/gcc", {st_mode=S_IFREG|0755, st_size=204264, ...}) = 0
stat64("kk.c", {st_mode=S_IFREG|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
Jul 16 '08 #5
gpraghuram
1,275 Expert 1GB
Type
which CC
command and see which CC it is picking up.


Raghu
Jul 16 '08 #6
I typed "which cc" command.
its showing like this
[shashidhara.n@localhost ~]$ which cc
/usr/lib/ccache/cc
[shashidhara.n@localhost ~]$


--
Shashidhara
Jul 16 '08 #7
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
Jul 16 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: mkent | last post by:
I'm trying to use signal.alarm to stop a run-away os.system command. Can anyone exlain the following behavior? Given following the trivial program: import os import signal def...
1
by: Rittercorp | last post by:
I am debugging an app which blocks many processes in a SQL7 server DB. The app log writes every transaction "open" and "close". The weird thing is : when the app logfile says the transaction is...
1
by: Hal | last post by:
I am experiencing blocking problems on SQL Server 2000, SP3a. I have read the posts and set up a job SQL agent to report on these occurences I save the results to a table before executing an sp to...
3
by: Mario | last post by:
Hello, I couldn't find a solution to the following problem (tried google and dejanews), maybe I'm using the wrong keywords? Is there a way to open a file (a linux fifo pipe actually) in...
7
by: Michi Henning | last post by:
Hi, I'm using a non-blocking connect to connect to a server. Works fine -- the server gets and accepts the connection. However, once the connection is established, I cannot retrieve either the...
1
by: darren kirby | last post by:
Hello all. I have a python script here which is just a wrapper for 2 or more system commands. I would estimate the program spends at least 95.5% of 'real' time running the system commands. ...
9
by: RajW | last post by:
Disclaimer: I'm new to C. I'm building a simple text based program and I'm not sure I'm designing it correctly. What I have is simple and it works but it just seems weird. Is there a better way?...
40
by: =?Utf-8?B?Um9iZXJ0IEUuIEZsYWhlcnR5?= | last post by:
What is the C# command to wait for a specified period of time? I am writing a windows service that will process a file once it has beed created or changed. I'm using the fileSystemWatcher to...
12
by: puzzlecracker | last post by:
is it even possible or/and there is a better alternative to accept input in a nonblocking manner?
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.