building 1.7.0 on Linux

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
Radu Serban
Posts: 2
Joined: Thu Dec 06, 2007 11:26 am

building 1.7.0 on Linux

Post by Radu Serban »

I actually have two issues related to building OpenSees under Linux. I've been using the Makefile.def.LINUX8 as a starting point.

I have managed to build OpenSees 1.7.4 under Linux although with one glitch: I had to disable the reliability module since I was getting tcl-related compilation errors. I used tcl & tk v.8.3.0, which was the only one that worked at all (I also tried -- unsuccessfully -- 8.0.5 and 8.4.16). FYI, I attached the error message issued when trying to compile with RELIABILITY turned ON at the end of this message.

In any case, I'm trying now to build OpenSees 1.7.0 with the same setup as for 1.7.4 (i.e. no reliability and using tcl 8.3.0). However, the build stops with an "undefined symbol" error at link stage. I tried to figure out the differences in Makefiles between 1.7.0 and 1.7.4 that could lead to this -- but that's hopeless. I was wondering if anyone could point to the right fix (I must be some trivial issue in a Makefile). FYI, I listed below the last few lines from my build.



Thanks,
--Radu

P.S. The undefined symbol for 1.7.0 is OpenSees_Exit. This is not the exact name of the offending function, but I had to include the underscore in the name simply to be able to post here -- without it, I got a message saying I used a blacklisted word - I'll let you figure out what :-)



=================================
Error for 1.7.4 with RELIABILITY ON
=================================

TclReliabilityBuilder.cpp: In function `int
TclReliabilityModelBuilder_addRandomVariablePositioner(void*, Tcl_Interp*,
int, char**)':
TclReliabilityBuilder.cpp:2017: invalid conversion from `char**' to `const
char**'
TclReliabilityBuilder.cpp:2017: initializing argument 4 of `
RandomVariablePositioner::RandomVariablePositioner(int, int,
DomainComponent*, const char**, int)'





=================================
Error for 1.7.0 (RELIABILITY OFF)
=================================

make[1]: Leaving directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC'
LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM
make[1]: Entering directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/tcl'
make[1]: Nothing to be done for `tcl'.
make[1]: Leaving directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/tcl'
make[1]: Entering directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/modelbuilder/tcl'
make[2]: Entering directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/tcl'
make[2]: Nothing to be done for `tcl'.
make[2]: Leaving directory `/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/tcl'
/home/radu/SOFTWARE/OPEN_SEES/1.7.0/OpenSees/SRC/tcl/commands.o(.text+0x31d): In function `g3AppInit(Tcl_Interp*)':
: undefined reference to `OpenSees_Exit(void*, Tcl_Interp*, int, char**)'
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i suggest you ditch the Makefile.def.LINUX8 and try one of the Fedora ones. the reason that your one works with 8.3 and not any version > 8.4 is that the tcl developers changed their interface around and in a lot of cases const char * replaced char * where it made sense to do so .. hence -D_TCL84 in the C++ flags is required for versions > tcl 8.4
Radu Serban
Posts: 2
Joined: Thu Dec 06, 2007 11:26 am

Post by Radu Serban »

Yes, I noticed the API changes in tcl8.4 but didn't know about the -D_TCL84 directive.

Using Makefile.def.FEDORA4 as a starting point and tcl8.4 worked just fine for both versions 1.7.0 and 1.7.4. I only had to add a few things related to reliability (such as the name of the library) and, of course, to fix the compiler names and replace the -lgfortran library with -lg2c for my RedHat8.

Thanks.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

now you need to dump 1.7.4 and try 1.7.5 .. there are a few important bug fixes in 1.7.5
hellojikir
Posts: 10
Joined: Tue Apr 15, 2008 6:38 am

Post by hellojikir »

:D :D :D :D






ImageImageImageImageImageImageImageImageImageImage
Post Reply