I am using cvs version of opensees, doing sequential compilation. Using tcl8.5. Running into some problems with compilation. attached find my def file. I would really appreciate any help in this. Thanks.
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework. Works for Linux 7.1 and
# above, modified to use the OpenGl libraries.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################
# %---------------------------------%
# | SECTION 1: PROGRAM |
# %---------------------------------%
#
# Specify the location and name of the OpenSees interpreter program
# that will be created (if this all works!)
OpenSees_PROGRAM = $(HOME)/bin/OpenSees
# %---------------------------------%
# | SECTION 2: MAKEFILE CONSTANTS |
# %---------------------------------%
#
# Specify the constants the are used as control structure variables in the Makefiles.
#OPERATING_SYSTEM = LINUX
#GRAPHICS = UsingOpenGL, UsingX11
GRAPHICS = UsingX11
#PROGRAMMING_MODE = SEQUENTIAL, THREADS OR DISTRIBUTED_MPI
PROGRAMMING_MODE = SEQUENTIAL
#COMPILER = GCC, KAI
COMPILER = GCC-4.3
#DEBUG_MODE = DEBUG, NO_DEBUG
DEBUG_MODE = NO_DEBUG
#RELIABILITY = YES_RELIABILITY, NO_RELIABILITY
RELIABILITY = YES_RELIABILITY
# %---------------------------------%
# | SECTION 3: PATHS |
# %---------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries or if you have
# any of the libraries already leave the directory location blank AND
# remove the directory from DIRS.
BASE = /usr
HOME = /home/nmitra
FE = $(HOME)/OpenSees/SRC
BLASdir = $(HOME)/OpenSees/OTHER/BLAS
CBLASdir = $(HOME)/OpenSees/OTHER/CBLAS
LAPACKdir = $(HOME)/OpenSees/OTHER/LAPACK
ARPACKdir = $(HOME)/OpenSees/OTHER/ARPACK
UMFPACKdir = $(HOME)/OpenSees/OTHER/UMFPACK
METISdir = $(HOME)/OpenSees/OTHER/METIS
SRCdir = $(HOME)/OpenSees/SRC
ifeq ($(PROGRAMMING_MODE), THREADS)
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_MT
else
SUPERLUdir = $(HOME)/OpenSees/OTHER/SuperLU_3.0/SRC
endif
DIRS = $(BLASdir) $(CBLASdir) $(LAPACKdir) \
$(SUPERLUdir) $(ARPACKdir) $(UMFPACKdir) $(SRCdir) $(METISdir)
# %-------------------------------------------------------%
# | SECTION 4: LIBRARIES |
# | |
# | The following section defines the libraries that will |
# | be created and/or linked with when the libraries are |
# | being created or linked with. |
# %-------------------------------------------------------%
#
# Note: if vendor supplied BLAS and LAPACK libraries leave the
# libraries blank. You have to get your own copy of the tcl/tk
# library!!
#
# Note: For libraries that will be created (any in DIRS above)
# make sure the directory exsists where you want the library to go!
FE_LIBRARY = $(HOME)/lib/libOpenSees.a
NDARRAY_LIBRARY = $(HOME)/lib/libndarray.a # BJ_UCD jeremic@ucdavis.edu
MATMOD_LIBRARY = $(HOME)/lib/libmatmod.a # BJ_UCD jeremic@ucdavis.edu
BJMISC_LIBRARY = $(HOME)/lib/libBJmisc.a # BJ_UCD jeremic@ucdavis.edu
LAPACK_LIBRARY = $(HOME)/lib/libLapack.a
BLAS_LIBRARY = $(HOME)/lib/libBlas.a
SUPERLU_LIBRARY = $(HOME)/lib/libSuperLU.a
CBLAS_LIBRARY = $(HOME)/lib/libCBlas.a
ARPACK_LIBRARY = $(HOME)/lib/libArpack.a
UMFPACK_LIBRARY = $(HOME)/lib/libUmfpack.a
METIS_LIBRARY = $(HOME)/lib/libMetis.a
TCL_LIBRARY = /usr/lib64/libtk8.5.so /usr/lib64/libtcl8.5.so
BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a
ifeq ($(GRAPHICS), UsingX11)
GRAPHIC_LIBRARY = /usr/X11R6/lib/libX11.a
else
GRAPHIC_LIBRARY = /usr/lib/libGL.a /usr/X11R6/lib/libX11.a /usr/X11R6/lib/libXext.a \
/usr/lib/libGLU.a
endif
ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_LIBRARY = $(HOME)/lib/libReliability.a
else
RELIABILITY_LIBRARY =
endif
# WATCH OUT .. These libraries are removed when 'make wipe' is invoked.
WIPE_LIBS = $(FE_LIBRARY) \
$(LAPACK_LIBRARY) \
$(BLAS_LIBRARY) \
$(CBLAS_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(ARPACK_LIBRARY) \
$(UMFPACK_LIBRARY) \
$(METIS_LIBRARY) \
$(RELIABILITY_LIBRARY)
# %---------------------------------------------------------%
# | SECTION 5: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%
# Compilers
CC++ = /usr/bin/g++-4.3
CC = /usr/bin/gcc-4.3
FC = /usr/bin/gfortran-4.3
AR = ar
ARFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =
#GRAPHICS = UsingOpenGL, UsingX11
ifeq ($(GRAPHICS), UsingOpenGL)
GRAPHIC_FLAG = -D_GLX
else
GRAPHIC_FLAG = -D_X11
endif
ifeq ($(PROGRAMMING_MODE), THREADS)
PROGRAMMING_FLAG = -D_THREADS -D_PTHREAD
else
PROGRAMMING_FLAG =
endif
ifeq ($(DEBUG_MODE), DEBUG)
DEBUG_FLAG = -D_G3DEBUG
else
DEBUG_FLAG =
endif
ifeq ($(RELIABILITY), YES_RELIABILITY)
RELIABILITY_FLAG = -D_RELIABILITY
else
RELIABILITY_FLAG =
endif
# Compiler Flags
#
# NOTES:
# C++ FLAGS TAKE need _UNIX or _WIN32 for preprocessor dircetives
# - the _WIN32 for the Windows95/98 or NT operating system.
# C FLAGS used -DUSE_VENDOR_BLAS (needed in SuperLU) if UNIX in C++ FLAGS
#
ifeq ($(DEBUG_MODE), DEBUG)
C++FLAGS = -Wall -funroll-loops -fcse-follow-jumps \
-fthread-jumps -fcse-skip-blocks -frerun-cse-after-loop \
-felide-constructors \
-fcaller-saves -ffloat-store -fforce-addr \
-fschedule-insns -fschedule-insns2 -D_LINUX -D_UNIX \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) \
-fexpensive-optimizations \
-fforce-addr -fforce-mem -finline-functions \
-fkeep-inline-functions \
-fno-function-cse -fno-inline -fno-peephole \
-fschedule-insns -fschedule-insns2 \
-fstrength-reduce -fthread-jumps -g -pg \
-ffloat-store -D_RELIABILITY
CFLAGS = -Wall -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
# Linker
LINKER = $(CC++)
LINKFLAGS = -g -pg
else
# modified as optimizaton currently causing problems with Steel01 code
C++FLAGS = -Wall -O3 -D_UNIX -ftemplate-depth-30 -D_LINUX \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) \
-ffloat-store
CFLAGS = -Wall -O3 $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall -O
# Linker
LINKER = $(CC++)
LINKFLAGS =
endif
ifeq ($(COMPILER), KAI)
CC++ = /usr/local/KAI/KCC_BASE/bin/KCC
CC = /usr/local/KAI/KCC_BASE/bin/KCC
FC = /usr/bin/g77
C++FLAGS = -D_KAI -D_UNIX -D_LINUX +K1 +K3 -O3 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
--display_error_number --backend -ffloat-store
CFLAGS = -D_KAI -D_UNIX -D_LINUX $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) \
$(DEBUG_FLAG) $(PROGRAMMING_FLAG) +K3 -O3 --c
FFLAGS = -Wall -O
LINKER = $(CC++)
LINKFLAGS =
endif
# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
# %---------------------------------------------------------%
# | SECTION 6: COMPILATION |
# | |
# | The following macros specify the macros used in |
# | to compile the source code into object code. |
# %---------------------------------------------------------%
.SUFFIXES:
.SUFFIXES: .C .c .f .f90 .cpp .o .cpp
#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-------------------------------------------%
# | Command to build .o files from .f files. |
# %-------------------------------------------%
#
.cpp.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.C.o:
@$(ECHO) Making $@ from $<
$(CC++) $(C++FLAGS) $(INCLUDES) -c $< -o $@
.c.o:
@$(ECHO) Making $@ from $<
$(CC) $(CFLAGS) -c $< -o $@
.f.o:
@$(ECHO) Making $@ from $<
$(FC) $(FFLAGS) -c $< -o $@
# %---------------------------------------------------------%
# | SECTION 7: OTHER LIBRARIES |
# | |
# | The following macros specify other libraries that must |
# | be linked with when creating executables. These are |
# | platform specific and typically order does matter!! |
# %---------------------------------------------------------%
MACHINE_LINKLIBS = -L$(BASE)/lib \
-L$(HOME)/lib
MACHINE_NUMERICAL_LIBS = -lm \
$(ARPACK_LIBRARY) \
$(SUPERLU_LIBRARY) \
$(UMFPACK_LIBRARY) $(METIS_LIBRARY) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY) $(RELIABILITY_LIBRARY) -lg2c -ldl
ifeq ($(PROGRAMMING_MODE), THREADS)
MACHINE_SPECIFIC_LIBS = -lpthread
else
MACHINE_SPECIFIC_LIBS =
endif
# %---------------------------------------------------------%
# | SECTION 8: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include \
-I$(BASE)/include \
-I/usr/include/cxx \
-I$(HOME)/include -I$(HOME)/blitz \
-I$(UMFPACKdir) -I$(SUPERLUdir)
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
TCL_INCLUDES =
INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
The type of error that I am getting are related to Tcl. For example the errors are as follows (just pasted some of it while doing make)
TclModelBuilder.cpp:547: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:550: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:550: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:554: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:554: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:571: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:571: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:576: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:576: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:580: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:580: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:596: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:596: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp:602: error: invalid conversion from ‘int (*)(void*, Tcl_Interp*, int, char**)’ to ‘int (*)(void*, Tcl_Interp*, int, const char**)’
TclModelBuilder.cpp:602: error: initializing argument 3 of ‘Tcl_Command_* Tcl_CreateCommand(Tcl_Interp*, const char*, int (*)(void*, Tcl_Interp*, int, const char**), void*, void (*)(void*))’
TclModelBuilder.cpp: In function ‘int TclCommand_addNodalLoad(void*, Tcl_Interp*, int, char**)’:
TclModelBuilder.cpp warning: suggest explicit braces to avoid ambiguous ‘else’
TclModelBuilder.cpp: In function ‘int TclCommand_addImposedMotionSP(void*, Tcl_Interp*, int, char**)’:
TclModelBuilder.cpp warning: unused variable ‘ndf’
TclModelBuilder.cpp: In function ‘int TclCommand_doBlock2D(void*, Tcl_Interp*, int, char**)’:
TclModelBuilder.cpp error: invalid conversion from ‘char***’ to ‘const char***’
TclModelBuilder.cpp error: initializing argument 4 of ‘int Tcl_SplitList(Tcl_Interp*, const char*, int*, const char***)’
TclModelBuilder.cpp: In function ‘int TclCommand_doBlock3D(void*, Tcl_Interp*, int, char**)’:
TclModelBuilder.cpp error: invalid conversion from ‘char***’ to ‘const char***’
TclModelBuilder.cpp error: initializing argument 4 of ‘int Tcl_SplitList(Tcl_Interp*, const char*, int*, const char***)’
TclModelBuilder.cpp: In function ‘int TclCommand_Package(void*, Tcl_Interp*, int, char**)’:
TclModelBuilder.cpp warning: unused variable ‘result’
TclModelBuilder.cpp warning: unused variable ‘funcName’
make[1]: *** [TclModelBuilder.o] Error 1
make[1]: Leaving directory `/home/nmitra/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Makefile.def for x86_64 in OpenSuse 11
Moderators: silvia, selimgunay, Moderators
-
- Posts: 73
- Joined: Tue Feb 20, 2007 6:48 am
- Location: IIEES
- Contact:
OK, So I did couple of things and it is able to compile fine now. However I am running into linking problems.
The compiler complains that it is unable to find -libgfortran in /usr/lib64/gcc/x86_64-suse-linux/4.3 ../../../../x86_64-suse-linux/bin/ld
Now the question is wven though in Machine_specific_libs I am giving in a particular directory why doesnt it search in there and instead search in bin/ld which doesnt exist. In the directory which I provided I do see a libgfortran.a file which has links to /usr/lib/libgfortran.so.3
Any help on this would be really appreciated.....
Amongst the things that I did for correct compilation:
-- created the correct path to Graphic_library
-- added in -D_TCL85 to the C++Flags
-- changed libg2c to libgfortran [since gcc4.3 no longer has libg2c but libgfortran
-- By the way I also did take out -ldl in machine_numerical_libs [frankly I donot know what it is for]
-- obviously I did add in the machine_specific_libs as indiacted in my previous post
-- Yes I also did put in a link to TCL_INCLUDE (even though I feel that was not necessary since the directory was already being referenced by Machine_Includes)
The compiler complains that it is unable to find -libgfortran in /usr/lib64/gcc/x86_64-suse-linux/4.3 ../../../../x86_64-suse-linux/bin/ld
Now the question is wven though in Machine_specific_libs I am giving in a particular directory why doesnt it search in there and instead search in bin/ld which doesnt exist. In the directory which I provided I do see a libgfortran.a file which has links to /usr/lib/libgfortran.so.3
Any help on this would be really appreciated.....
Amongst the things that I did for correct compilation:
-- created the correct path to Graphic_library
-- added in -D_TCL85 to the C++Flags
-- changed libg2c to libgfortran [since gcc4.3 no longer has libg2c but libgfortran
-- By the way I also did take out -ldl in machine_numerical_libs [frankly I donot know what it is for]
-- obviously I did add in the machine_specific_libs as indiacted in my previous post
-- Yes I also did put in a link to TCL_INCLUDE (even though I feel that was not necessary since the directory was already being referenced by Machine_Includes)