help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: using make to run binaries


From: andreas
Subject: RE: using make to run binaries
Date: Mon, 17 Sep 2007 16:22:16 +0200
User-agent: Mutt/1.5.9i

Hi Dave,

> > We have got a problem using 'make' to start binaries: we use 'make' not
> > only for compilation but also for testing our compiled binaries on input
> > data like this:
> > # make output.data
> > to create a line like this:
> > # /path/to/binary -i input.data [more args] > output.data
> > 
> > The problem is that output.data differs from the output obtained by the
> > very same command line when run manually. So the binary is the same, the
> > command line args are the same, too. What could be the problem? I also
> > already tried environment variables, but they are the same, too.
> 
> 1.  Are you /completely/ sure there isn't some other version of the program in
> your PATH that might be getting in the way of one of your tests but not the
> other?

The program is called always with the absolute path like in the example
above.

> 2.  How did you check the environment vars were the same? 
I compared the environment vars at the start of the program. I modified
the program to output the current vars to cerr. Apart from three vars
set by make (concerning the make level) there was no difference compared to 
manual launch.

> Are you certain you're using the same shell as make uses? 
Dunno, how can I check this?

> Does the problem occur even at the command-line if you prefix your command 
> with 'sh -c'?
Positive, problem remains.

> 3.  In what way do the output files differ?  Is it something the program is
> supposed to do?
We do predictions on a set of chemical compounds stored in the input
file. The XML output reports those predictions. The output is then
further processed by perl scripts. The difference is that the XML output
created by manual launch contains more chemical information. We use a
chemical library (openbabel) which is loaded as a shared library by our
program so it could be that two different libraries are used. However,
this can be ruled out as we have only one single version of the library
on our host. Also, the problem could be reproduced on another host.

> 4.  (I'm staking my 50 qatloos on this one:)  Are you in a different working
> directory when you try the command-line test as compared to when you run it
> under make?  Are there different input.data files in those different
> directories?  Are you looking by accident at the wrong output.data file?
Sorry, but this is also not an option ;-) We had this now literally
dozens of times, checking it over and over again and it differs
*always*.

Greets, Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]