error compiling 1.7.3 on RedHat
Moderators: silvia, selimgunay, Moderators
-
- Posts: 11
- Joined: Wed Jun 23, 2004 12:03 pm
- Location: Bucknell University
error compiling 1.7.3 on RedHat
I get the error listed below.
Seems like a conflict between math.h and tclAppInit.cpp.?
Steve
local/OpenSees1.7.3/SRC/reliability/FEsensitivity -I/usr/local/OpenSees1.7.3/SRC/reliability/tcl -I/usr/local/OpenSees1.7.3/SRC/unittest -I/usr/local/OpenSees1.7.3/SRC -I/usr/local/OpenSees1.7.3/OTHER/SuperLU_3.0/SRC -I/usr/local/OpenSees1.7.3/SRC/package -c tclAppInit.cpp
In file included from /usr/include/c++/3.2.3/cmath:51,
from /usr/include/c++/3.2.3/bits/locale_facets.tcc:41,
from /usr/include/c++/3.2.3/locale:46,
from /usr/include/c++/3.2.3/bits/istream.tcc:37,
from /usr/include/c++/3.2.3/istream:297,
from /usr/include/c++/3.2.3/fstream:45,
from /usr/local/OpenSees1.7.3/SRC/handler/FileStream.h:30,
from tclAppInit.cpp:83:
/usr/include/math.h:288: declaration of C function `int matherr(__exception*)'
conflicts with
tclAppInit.cpp:55: previous declaration `int matherr()' here
make[2]: *** [tclAppInit.o] Error 1
make[2]: Leaving directory `/usr/local/OpenSees1.7.3/SRC/tcl'
make[1]: *** [tcl] Error 2
make[1]: Leaving directory `/usr/local/OpenSees1.7.3/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Seems like a conflict between math.h and tclAppInit.cpp.?
Steve
local/OpenSees1.7.3/SRC/reliability/FEsensitivity -I/usr/local/OpenSees1.7.3/SRC/reliability/tcl -I/usr/local/OpenSees1.7.3/SRC/unittest -I/usr/local/OpenSees1.7.3/SRC -I/usr/local/OpenSees1.7.3/OTHER/SuperLU_3.0/SRC -I/usr/local/OpenSees1.7.3/SRC/package -c tclAppInit.cpp
In file included from /usr/include/c++/3.2.3/cmath:51,
from /usr/include/c++/3.2.3/bits/locale_facets.tcc:41,
from /usr/include/c++/3.2.3/locale:46,
from /usr/include/c++/3.2.3/bits/istream.tcc:37,
from /usr/include/c++/3.2.3/istream:297,
from /usr/include/c++/3.2.3/fstream:45,
from /usr/local/OpenSees1.7.3/SRC/handler/FileStream.h:30,
from tclAppInit.cpp:83:
/usr/include/math.h:288: declaration of C function `int matherr(__exception*)'
conflicts with
tclAppInit.cpp:55: previous declaration `int matherr()' here
make[2]: *** [tclAppInit.o] Error 1
make[2]: Leaving directory `/usr/local/OpenSees1.7.3/SRC/tcl'
make[1]: *** [tcl] Error 2
make[1]: Leaving directory `/usr/local/OpenSees1.7.3/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Stephen Buonopane
Dept. of Civil Engineering
Bucknell Univ.
Lewisburg, PA 17837
Dept. of Civil Engineering
Bucknell Univ.
Lewisburg, PA 17837
It's a real issue (your compiler is smarter than mine! )
It doesn't look like matherr actually gets used in 1.7.3. I did a grep on it, and here's where I found it:
SRC/tcl/mpiMain.cpp:extern "C" int matherr();
SRC/tcl/mpiMain.cpp://int *tclDummyMathPtr = (int *)matherr;
SRC/tcl/mpiParameterMain.cpp:extern "C" int matherr();
SRC/tcl/mpiParameterMain.cpp://int *tclDummyMathPtr = (int *)matherr;
SRC/tcl/tclAppInit.cpp:extern "C" int matherr();
SRC/tcl/tclAppInit.cpp://int *tclDummyMathPtr = (int *) matherr;
SRC/tcl/tkAppInit.cpp:extern "C" int matherr();
SRC/tcl/tkAppInit.cpp:int *tclDummyMathPtr = (int *) matherr;
So it's all just declarations. I'd just try commenting it out for now; Frank is out this month..
good luck,
alisa
It doesn't look like matherr actually gets used in 1.7.3. I did a grep on it, and here's where I found it:
SRC/tcl/mpiMain.cpp:extern "C" int matherr();
SRC/tcl/mpiMain.cpp://int *tclDummyMathPtr = (int *)matherr;
SRC/tcl/mpiParameterMain.cpp:extern "C" int matherr();
SRC/tcl/mpiParameterMain.cpp://int *tclDummyMathPtr = (int *)matherr;
SRC/tcl/tclAppInit.cpp:extern "C" int matherr();
SRC/tcl/tclAppInit.cpp://int *tclDummyMathPtr = (int *) matherr;
SRC/tcl/tkAppInit.cpp:extern "C" int matherr();
SRC/tcl/tkAppInit.cpp:int *tclDummyMathPtr = (int *) matherr;
So it's all just declarations. I'd just try commenting it out for now; Frank is out this month..
good luck,
alisa
-
- Posts: 11
- Joined: Wed Jun 23, 2004 12:03 pm
- Location: Bucknell University
Maybe the version of your compiler has something to do with it? I am using CentOS 4 (which is basically Red Hat Entreprise Linux), and I didn't have any problem. I use the CVS version though, and I just updated today (9/25).
My version of gcc is:
which you can find out by
- Simon
My version of gcc is:
Code: Select all
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
Code: Select all
gcc -v