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. 10 1475
On 2 Jul 2004 14:18:28 -0700, hi********@hotm ail.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.progr ammer or in
one of the Linux groups, maybe alt.linux.suse.
--
Al Balmer
Balmer Consulting re************* ***********@att .net
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
"jacob navia" <ja***@jacob.re mcomp.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.progr ammer, 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_Keit h) 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.
"Keith Thompson" <ks***@mib.or g> a écrit dans le message de
news:ln******** ****@nuthaus.mi b.org... "jacob navia" <ja***@jacob.re mcomp.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".
On Sat, 3 Jul 2004 01:35:30 +0200, in comp.lang.c , "jacob navia"
<ja***@jacob.re mcomp.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.c om/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 =---
> 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.
"jacob navia" <ja***@jacob.re mcomp.fr> writes: "Keith Thompson" <ks***@mib.or g> a écrit dans le message de news:ln******** ****@nuthaus.mi b.org... "jacob navia" <ja***@jacob.re mcomp.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_Keit h) 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.
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
In <ln************ @nuthaus.mib.or g> Keith Thompson <ks***@mib.or g> writes: "jacob navia" <ja***@jacob.re mcomp.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 return to a program.
so, excatly, I need to know the name of the executable file that is executed.
originally, I try to windows service + FileSystemWatcher.
but, There are just created, renamed, deleted, and changed four events in
the...
|
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 NFA has initial states: 2 and 12
ending states 2 and 12
I need help to switch program below from FSA to recognize NFA. I was
trying to do a general program so if i have another expression it can
be easily changed thus no...
|
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 occurs. After the
program has read the file, it should offer a menu with three choices.
the first is to list all the words along with the number of occurences.
The second is to let you enter a word, with the program reporting how
many times the...
|
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 run-time or not. The program should work with any
mathematical function provided by users.
Let's take an example in the C language:
|
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# so that I can debug the resulting code?
I have been able to add the manifest file, to the exe after I have built the program. But then, when I try to debug my C# code, the program crashes at the point where a function call is made that is used by...
| |
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 any other room measurments are to be calculated, at which point if they answer yes, the program will run through again.
At the end of it, (when they answer no at the prompt to measure any other rooms) the program will caluclate the total amount of...
|
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 like this : (very simple..........)
010001010110001101010101010101010101010101
#include<stdio.h>
|
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 the text files from the
watched folder line by line into variables and then posting them to a SQL
table.
All of the code for the form is shown below. And it works fine except for 2
issues.
First issue: In the Finally of the Try for teh SQL...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |