public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] what causes "HAVE_CONFIG_H not found"?
@ 2007-03-01  0:32 Denis
  2007-03-01  2:01 ` Mark Kirkwood
  0 siblings, 1 reply; 4+ messages in thread
From: Denis @ 2007-03-01  0:32 UTC (permalink / raw
  To: gentoo-user

It's not really a Gentoo question but more a general Linux question
about "make".  I'm trying to install a third-party numerics package
for multidimensional integration that was written in C and also uses
the "mcc" compiler to build Mathematica executables from the C code
(MathLink package).  The configure operation runs fine and generates a
config.h in the main directory of the package.  The main directory of
the package is ".", then there's a common source directory
"./src/common" and the subpackage directory "./src/vegas", Vegas being
the name for one algorithm used for multi-dimensional adaptive Monte
Carlo integration.

Here's the output when I run "make":
____________________
CC=gcc mcc -O3 -fomit-frame-pointer -ffast-math -DHAVE_CONFIG_H
-I./src/common -I. -I. -o Vegas ./src/vegas/Vegas.tm

/usr/bin/mcc: line 1: exec: HAVE_CONFIG_H: not found
make: *** [Vegas] Error 127
____________________

There's a config.h file in the main "." directory, an stddecl.h file
in the "./src/common" directory that refers to config.h:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

and a decl.h file in the "./src/vegas" directory that has a line

#include "stddecl.h"

in it.  Now, since the compiler call has -I. and -I./src/common in its
statement above, I figure the notation is probably consistent.

So why oh why am I getting the "HAVE_CONFIG_H" not found error
message??  What's wrong with the linking?

Appreciate any help
Denis
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] what causes "HAVE_CONFIG_H not found"?
  2007-03-01  0:32 [gentoo-user] what causes "HAVE_CONFIG_H not found"? Denis
@ 2007-03-01  2:01 ` Mark Kirkwood
  2007-03-01  3:40   ` Denis
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kirkwood @ 2007-03-01  2:01 UTC (permalink / raw
  To: gentoo-user

Denis wrote:

> Here's the output when I run "make":
> ____________________
> CC=gcc mcc -O3 -fomit-frame-pointer -ffast-math -DHAVE_CONFIG_H
> -I./src/common -I. -I. -o Vegas ./src/vegas/Vegas.tm
> 
> /usr/bin/mcc: line 1: exec: HAVE_CONFIG_H: not found
> make: *** [Vegas] Error 127
> ____________________
> 

Looks like the mcc compiler does not understand that -Dfoo means "define 
  foo" and instead thinks that a file "foo" is being linked - is mcc 
supposed to invoke gcc on that line? that 'CC=gcc mcc' construction is a 
little odd..... looks like the Makefile is broken - have you chosen 
unusual options are configure time?

Best bet might be to post on the mailing list for the 3rd party package 
as well as here!

Cheers

Mark
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] what causes "HAVE_CONFIG_H not found"?
  2007-03-01  2:01 ` Mark Kirkwood
@ 2007-03-01  3:40   ` Denis
  2007-03-01  3:57     ` Mark Kirkwood
  0 siblings, 1 reply; 4+ messages in thread
From: Denis @ 2007-03-01  3:40 UTC (permalink / raw
  To: gentoo-user

> supposed to invoke gcc on that line? that 'CC=gcc mcc' construction is a
> little odd..... looks like the Makefile is broken - have you chosen

Boy this one was messy, but I figured it out.  It turns out that
there's another "mcc" compiler from MatLab, and it was installed on my
system in /usr/bin.  Mathematica's "mcc" compiler/linker, which I
needed to use with the Monte Carlo integration package, was linked to
my PATH also, but for some reason, the wrong "mcc" (from MatLab) was
getting invoked first and thus messing up the compile process
completely.  I deleted the MatLab "mcc" from /usr/bin, and after that
the make script worked like a charm and built all executables just
like it was supposed to!

Thanks for the help - looking into the makefile and then finding out
and comparing the two mcc's and their respective command lines made me
realize what's going on.
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] what causes "HAVE_CONFIG_H not found"?
  2007-03-01  3:40   ` Denis
@ 2007-03-01  3:57     ` Mark Kirkwood
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Kirkwood @ 2007-03-01  3:57 UTC (permalink / raw
  To: gentoo-user

Denis wrote:

> 
> Boy this one was messy, but I figured it out.  It turns out that
> there's another "mcc" compiler from MatLab, and it was installed on my
> system in /usr/bin.  Mathematica's "mcc" compiler/linker, which I
> needed to use with the Monte Carlo integration package, was linked to
> my PATH also, but for some reason, the wrong "mcc" (from MatLab) was
> getting invoked first and thus messing up the compile process
> completely.  I deleted the MatLab "mcc" from /usr/bin, and after that
> the make script worked like a charm and built all executables just
> like it was supposed to!
> 

Well done - messy indeed!

Cheers

Mark
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-01  4:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01  0:32 [gentoo-user] what causes "HAVE_CONFIG_H not found"? Denis
2007-03-01  2:01 ` Mark Kirkwood
2007-03-01  3:40   ` Denis
2007-03-01  3:57     ` Mark Kirkwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox