473,326 Members | 2,111 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,326 software developers and data experts.

Program will not recognize that I have changed a file

I've encountered a problem where I am changing a particular c source
document and then running the associated make command in the console.
If I then run that program, it is as though the update has been
ignored.
In actuality this change I am making is for the file tcpdump.c for the
program tcpdump.
I am changing a simple print statement that I am sure will be
executed:

Something like
fprintf(stderr, "%d packets received by
filter\n",stat.ps_recv);

** is changed to **

fprintf(stderr, "%d packets received by filter BLAH \n",
stat.ps_recv);

I don't feel that the particular program is the source of my problem.
I have done the basic commands to set it up (./configure, make, make
install) and it is running fine. Concerning my update, I am sure that
tcpdump.c is actually being changed and the giving the make command
again acts as though it recognizes a change of a file, and running
make once again will reply that all the created .o files are up to
date. Does anybody know of what could be keeping my addition of "BLAH"
from being printed? I am not very experienced with c so I figure I
must be overlooking something involving compilation.
.. I am using SuSE linux and the makefile calls the gcc compiler.
Nov 14 '05 #1
10 1453
On 2 Jul 2004 14:18:28 -0700, hi********@hotmail.com (Wes Johnson)
wrote:
I've encountered a problem where I am changing a particular c source
document and then running the associated make command in the console.


This is off topic here, where we discuss the C language. You seem to
have a problem with your makefile. Ask in comp.unix.programmer or in
one of the Linux groups, maybe alt.linux.suse.

--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 14 '05 #2
Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

I had that problem once. Can't tell you if it is the problem
in your case but it is worth checking...

Check the name of the file you are saving also.
Maybe you are saving a different copy than the
copy that the makefile is expecting, in another
directory maybe?

Open a command shell and type make with
a special option to make "make" tell you what is doing.

In the docs of your "make" you will find that kind of
stuff.

Happy debugging

Jacob
Nov 14 '05 #3
"jacob navia" <ja***@jacob.remcomp.fr> writes:
Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

[...]

It's not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won't break Makefiles. The reasons are best discussed in a
more relevant newsgroup probably comp.unix.programmer, where they can
tell you about the issues of clock synchronization between NFS clients
and servers, if that happens to be relevant to your problem.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #4

"Keith Thompson" <ks***@mib.org> a écrit dans le message de
news:ln************@nuthaus.mib.org...
"jacob navia" <ja***@jacob.remcomp.fr> writes:
Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

[...]

It's not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won't break Makefiles.

Try this Keith:
1) Recompile some package. All objects will have date of 2 July.
2) Set the date to July 1st
3) Go to the same package and modify a file.

The file will never be recompiled since its object file
will have 2 July as date, and the source 1 July.

Some good make utilities warn about "The date
of xxx is in the future".

Nov 14 '05 #5
On Sat, 3 Jul 2004 01:35:30 +0200, in comp.lang.c , "jacob navia"
<ja***@jacob.remcomp.fr> wrote:
Try this Keith:
1) Recompile some package. All objects will have date of 2 July.
2) Set the date to July 1st
3) Go to the same package and modify a file.


Jacob, thats different to what you said. It may be what you meant but its
not what you said.

You said "if the time is wrong, makefiles will not work". This is different
to "if the time changes to be in the past, makefiles will not work".

Keith is correct. On a standalone system the timestamp is largely
irrelevant unless you have a badly broken system clock. OTOH if the source
is stored server-side then clock discrepancies between the server and local
machine can definitely cause the effect you're discussing.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #6
> Keith is correct. On a standalone system the timestamp is largely
irrelevant unless you have a badly broken system clock. OTOH if the source
is stored server-side then clock discrepancies between the server and local machine can definitely cause the effect you're discussing.


Or, your motherboard crashed. That happened to me last week (my
amd64 MSI K8T crashed, and I had to buy a new motherboard). When
I installed it, started to work again and my makefiles would not work.

It was a while till I got to the clock. Maybe because it was fresh
in my mind, I started with that possibility.

True, if the clock goes up regularly this will not happen. But it
*may* happen, and is an easy verification to do in all systems.

When debugging, an easy verification can save a lot of time if
positive, and doesn't cost a lot when negative.

Nov 14 '05 #7
"jacob navia" <ja***@jacob.remcomp.fr> writes:
"Keith Thompson" <ks***@mib.org> a écrit dans le message de
news:ln************@nuthaus.mib.org...
"jacob navia" <ja***@jacob.remcomp.fr> writes:
Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

[...]

It's not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won't break Makefiles.


Try this Keith:

[snip]

I stand by my previous statement.

But the real point, which you snipped, is that this discussion is
off-topic. It's not about C, it's about "make". I'll be happy to
discuss the interaction between "make" and the system clock in an
appropriate newsgroup, but not here in comp.lang.c.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #8
Wes Johnson wrote:
I've encountered a problem where I am changing a particular c source
document and then running the associated make command in the console.
If I then run that program, it is as though the update has been
ignored.
In actuality this change I am making is for the file tcpdump.c for the
program tcpdump.
I am changing a simple print statement that I am sure will be
executed:

Something like
fprintf(stderr, "%d packets received by
filter\n",stat.ps_recv);

** is changed to **

fprintf(stderr, "%d packets received by filter BLAH \n",
stat.ps_recv);

I don't feel that the particular program is the source of my problem.
I have done the basic commands to set it up (./configure, make, make
install) and it is running fine. Concerning my update, I am sure that
tcpdump.c is actually being changed and the giving the make command
again acts as though it recognizes a change of a file, and running
make once again will reply that all the created .o files are up to
date. Does anybody know of what could be keeping my addition of "BLAH"
from being printed? I am not very experienced with c so I figure I
must be overlooking something involving compilation.
. I am using SuSE linux and the makefile calls the gcc compiler.


Are you sure you are executing the changed file? ie: ./mynewfile
Under Linux the path is searched before the current dir is so if
mynewfile is also in /usr/local/bin (which is usually on your path)
and you compile a new version of mynewfile in /home/yourName/Code
and then whilst sitting in /home/yourName/Code you type: mynewfile
the one in /usr/local/bin will execute instead of the one your staring
at. Of course I am assuming you havnt modified the default path to
something like PATH=.:$PATH, and I also am assuming you are running
Linux, I could be totaly wrong on both assumptions.
Eric

Nov 14 '05 #9
In <ln************@nuthaus.mib.org> Keith Thompson <ks***@mib.org> writes:
"jacob navia" <ja***@jacob.remcomp.fr> writes:
Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

[...]

It's not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won't break Makefiles.


It *may*, when importing a set of sources from another system, if the
original timestamps are preserved.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #10
>It's not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won't break Makefiles.


A clock on a standalone system that goes backwards (say, during a
reboot or being manually set) CAN break Makefiles. I've had it
happen. This was an old system with no network or shared filesystems
whatever, and none of the relevant files were imported on floppies.

Gordon L. Burditt

Nov 14 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: spentun | last post by:
How can I moitor file which is executed by user or program in window. I need to write a code to monitor file. When user clicks the file(.exe) or is called by program, the name of file will be...
1
by: Willing 2 Learn | last post by:
Below is a program I did to recognize a Finite State Automata for ASCII (J+H)*. I got that one working but im having trouble getting the NFA program to work. I really desperately need help! My...
66
by: genestarwing | last post by:
QUESTION: Write a program that opens and read a text file and records how many times each word occurs in the file. Use a binary search tree modified to store both a word and the number of times it...
6
by: trungthanh78 | last post by:
Hello everyone, I'm totally new to the group and I would like to learn from you. Thank you in advance! I need to write a program to track whether a mathematical function has changed during...
0
xarzu
by: xarzu | last post by:
Getting a C# program with a manifest file to run in the debugger ---------------------------------------------------------------- How do I declare a manifest file in the Visual Studio IDE for C#...
4
by: asdasdaasdalsdjas | last post by:
Hey, Im trying to create a program that will ask the user to input a set of numbers (measurments =length, width, height; using formula for surface area) for a room, and then will be prompted if...
9
by: xiao | last post by:
It always dumped when I tried to run it... But it compiles OK. What I want to do is to do a test: Read information from a .dat file and then write it to another file. The original DAT file is...
9
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.