List Info

Thread: what causes "HAVE_CONFIG_H not found"?




what causes "HAVE_CONFIG_H not found"?
user name
2007-02-28 18:32:21
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-usergentoo.org mailing list


Re: what causes "HAVE_CONFIG_H not found"?
user name
2007-02-28 20:01:45
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-usergentoo.org mailing list


Re: what causes "HAVE_CONFIG_H not found"?
user name
2007-02-28 21:40:39
> 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-usergentoo.org mailing list


Re: what causes "HAVE_CONFIG_H not found"?
user name
2007-02-28 21:57:40
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-usergentoo.org mailing list


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )