Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04 LTS
Moderators: silvia, selimgunay, Moderators
Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04 LTS
Hi, i've got Ubuntu 10.04 LTS (April 2010 release) and i'm trying to compile OpenSees 2.2.2.
[b]Steps Followed
1. First downloaded and unpacked OpenSees 2.2.2
2. In terminal entered the following command:
[/b]
~/$ sudo apt-get install build-essential gfortran gfortran-4.3 libatk1.0-dev libcairo2-dev libdirectfb-dev libdirectfb-extra libexpat1-dev libfontconfig1-dev libfreetype6-dev libgfortran3 libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev libgtk2.0-dev libice-dev libjpeg62-dev libpango1.0-dev libpixman-1-dev libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libsysfs-dev libx11-dev libxau-dev libxcb1-dev libxcb-render0-dev libxcb-render-util0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev libxss-dev mesa-common-dev tcl8.5 tcl8.5-dev tcllib tk8.5 tk8.5-dev x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev
That was for getting all "dependent files".
[b]then used the following "make file":[/b]
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################
include Makefile.def
############################################################################
#
# First, modify the definitions in Makefile.def to match
# your library archiver, compiler, and the options to be used.
#
# Sample Makefile.def's can be found in the directory MAKES
#
# Then to create or add to the libraries needed, enter make after having
# making the modifications to this file.
#
# The name of the libraries created and their placement are defined
# in the file called Makefile.def.
#
# To remove the object files after the libraries and testing executables
# are created, enter
# make clean
# To remove the object files and the libraries specified in WIPE_LIBS, enter
# make wipe
# To just make the libs, enter
# make lib
# To just build the interpreter type
# make OpenSees
############################################################################
all:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
@$(ECHO) LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM;
@$(CD) $(FE)/tcl; ./OSverCreate.sh ; $(MAKE) tcl; ./OSverRemove.sh
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSees: tcl
tcl:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tcl;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSeesTk: tk
tk:
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tk;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tk;
libs:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
clean:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe;
wipe:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) $(WIPE_LIBS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe;
wipeall:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) $(WIPE_LIBS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe
@$(RM) $(RMFLAGS) $(OpenSees_PROGRAM);
help:
@$(ECHO) "usage: make ?"
[b]and Makefile.def:
[/b]
############################################################################
#
# Programa: OpenSees
#
# Proposito: Makefile para crear las librerias necesarias
# para usar OpenSees framework. trabaja sobre Ubuntu 9.04.
#
#
# Escrito originalmente: fmk
# Created: 10/99
#
# Mandar reporte de fallas asi como comentarios y sugerencias a 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
OPERATING_SYSTEM = LINUX
GRAPHICS = UsingOpenGL
PROGRAMMING_MODE = SEQUENTIAL
DEBUG_MODE = NO_DEBUG
RELIABILITY = NO_RELIABILITY
# %---------------------------------%
# | SECTION 2: 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/pipolinux/OpenSees
FE = $(HOME)/src/SRC
BLASdir = $(HOME)/src/OTHER/BLAS
CBLASdir = $(HOME)/src/OTHER/CBLAS
LAPACKdir = $(HOME)/src/OTHER/LAPACK
SUPERLUdir = $(HOME)/src/OTHER/SuperLU_3.0/SRC
ARPACKdir = $(HOME)/src/OTHER/ARPACK
UMFPACKdir = $(HOME)/src/OTHER/UMFPACK
METISdir = $(HOME)/src/OTHER/METIS
SRCdir = $(HOME)/SRC
DIRS = $(BLASdir) $(CBLASdir) $(LAPACKdir) \
$(SUPERLUdir) $(ARPACKdir) $(UMFPACKdir) $(SRCdir) $(METISdir)
# %-------------------------------------------------------%
# | SECTION 3: 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/lib/libtk8.5.so /usr/lib/libX11.so /usr/lib/libtcl8.5.so
BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a
ifeq ($(GRAPHICS), UsingX11)
GRAPHIC_LIBRARY = -L/usr/lib/libX11.so
else
GRAPHIC_LIBRARY = -L/usr/lib -lX11 -lGL -lGLU
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)
# %---------------------------------------------------------%
# | SECTION 4: 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++
CC = /usr/bin/gcc
FC = /usr/bin/gfortran
AR = ar
ARFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =
# 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
#
# modified as optimizaton currently causing problems with Steeln01 code
ifeq ($(DEBUG_MODE), DEBUG)
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL85 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) \
-g -pg
CFLAGS = -Wall -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
# Linker
LINKER = $(CC++)
LINKFLAGS = -g -pg
else
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL85 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) -O3 -ffloat-store
CFLAGS = -Wall -O2
FFLAGS = -Wall -O
# Linker
LINKER = $(CC++)
LINKFLAGS = -rdynamic -Wl
endif
GRAPHIC_FLAG = -D_GLX
# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
# %---------------------------------------------------------%
# | SECTION 5: 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 6: 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) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY)\
-ldl -lgfortran -lpng
MACHINE_SPECIFIC_LIBS =
# %---------------------------------------------------------%
# | SECTION 7: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include \
-I$(BASE)/include \
-I/usr/include/c++/4.3 \
-I/usr/include/GL \
-I$(HOME)/include -I$(HOME)/blitz
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
TCL_INCLUDES = -I/usr/include/tcl8.5
INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
[b]I'm getting the following error:[/b]
tkMain.cpp:112: error: new declaration ‘char* strrchr(const char*, int)’
/usr/include/string.h:253: error: ambiguates old declaration ‘const char* strrchr(const char*, int)’
tkMain.cpp: In function ‘void Tk_MainOpenSees(int, char**, int (*)(Tcl_Interp*), Tcl_Interp*)’:
tkMain.cpp:308: warning: deprecated conversion from string constant to ‘char*’
tkMain.cpp:325: warning: deprecated conversion from string constant to ‘char*’
make[2]: *** [tkMain.o] Error 1
make[2]: se sale del directorio `/home/pipolinux/OpenSees/src/SRC/tcl'
make[1]: *** [tk] Error 2
make[1]: se sale del directorio `/home/pipolinux/OpenSees/src/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Any help I would be very grateful.
[b]Steps Followed
1. First downloaded and unpacked OpenSees 2.2.2
2. In terminal entered the following command:
[/b]
~/$ sudo apt-get install build-essential gfortran gfortran-4.3 libatk1.0-dev libcairo2-dev libdirectfb-dev libdirectfb-extra libexpat1-dev libfontconfig1-dev libfreetype6-dev libgfortran3 libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev libgtk2.0-dev libice-dev libjpeg62-dev libpango1.0-dev libpixman-1-dev libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libsysfs-dev libx11-dev libxau-dev libxcb1-dev libxcb-render0-dev libxcb-render-util0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev libxss-dev mesa-common-dev tcl8.5 tcl8.5-dev tcllib tk8.5 tk8.5-dev x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev
That was for getting all "dependent files".
[b]then used the following "make file":[/b]
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################
include Makefile.def
############################################################################
#
# First, modify the definitions in Makefile.def to match
# your library archiver, compiler, and the options to be used.
#
# Sample Makefile.def's can be found in the directory MAKES
#
# Then to create or add to the libraries needed, enter make after having
# making the modifications to this file.
#
# The name of the libraries created and their placement are defined
# in the file called Makefile.def.
#
# To remove the object files after the libraries and testing executables
# are created, enter
# make clean
# To remove the object files and the libraries specified in WIPE_LIBS, enter
# make wipe
# To just make the libs, enter
# make lib
# To just build the interpreter type
# make OpenSees
############################################################################
all:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
@$(ECHO) LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM;
@$(CD) $(FE)/tcl; ./OSverCreate.sh ; $(MAKE) tcl; ./OSverRemove.sh
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSees: tcl
tcl:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tcl;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSeesTk: tk
tk:
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tk;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tk;
libs:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
clean:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe;
wipe:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) $(WIPE_LIBS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe;
wipeall:
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(ECHO) Making lib in $$f; \
$(MAKE) wipe; \
$(CD) ..; \
done );
@$(RM) $(RMFLAGS) $(WIPE_LIBS) *.o *~ core
@$(CD) $(FE)/../EXAMPLES; $(MAKE) wipe
@$(RM) $(RMFLAGS) $(OpenSees_PROGRAM);
help:
@$(ECHO) "usage: make ?"
[b]and Makefile.def:
[/b]
############################################################################
#
# Programa: OpenSees
#
# Proposito: Makefile para crear las librerias necesarias
# para usar OpenSees framework. trabaja sobre Ubuntu 9.04.
#
#
# Escrito originalmente: fmk
# Created: 10/99
#
# Mandar reporte de fallas asi como comentarios y sugerencias a 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
OPERATING_SYSTEM = LINUX
GRAPHICS = UsingOpenGL
PROGRAMMING_MODE = SEQUENTIAL
DEBUG_MODE = NO_DEBUG
RELIABILITY = NO_RELIABILITY
# %---------------------------------%
# | SECTION 2: 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/pipolinux/OpenSees
FE = $(HOME)/src/SRC
BLASdir = $(HOME)/src/OTHER/BLAS
CBLASdir = $(HOME)/src/OTHER/CBLAS
LAPACKdir = $(HOME)/src/OTHER/LAPACK
SUPERLUdir = $(HOME)/src/OTHER/SuperLU_3.0/SRC
ARPACKdir = $(HOME)/src/OTHER/ARPACK
UMFPACKdir = $(HOME)/src/OTHER/UMFPACK
METISdir = $(HOME)/src/OTHER/METIS
SRCdir = $(HOME)/SRC
DIRS = $(BLASdir) $(CBLASdir) $(LAPACKdir) \
$(SUPERLUdir) $(ARPACKdir) $(UMFPACKdir) $(SRCdir) $(METISdir)
# %-------------------------------------------------------%
# | SECTION 3: 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/lib/libtk8.5.so /usr/lib/libX11.so /usr/lib/libtcl8.5.so
BLITZ_LIBRARY = $(HOME)/blitz/lib/libblitz.a
ifeq ($(GRAPHICS), UsingX11)
GRAPHIC_LIBRARY = -L/usr/lib/libX11.so
else
GRAPHIC_LIBRARY = -L/usr/lib -lX11 -lGL -lGLU
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)
# %---------------------------------------------------------%
# | SECTION 4: 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++
CC = /usr/bin/gcc
FC = /usr/bin/gfortran
AR = ar
ARFLAGS = cqls
RANLIB = ranlib
RANLIBFLAGS =
# 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
#
# modified as optimizaton currently causing problems with Steeln01 code
ifeq ($(DEBUG_MODE), DEBUG)
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL85 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG) \
-g -pg
CFLAGS = -Wall -pg $(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) $(PROGRAMMING_FLAG)
FFLAGS = -Wall
# Linker
LINKER = $(CC++)
LINKFLAGS = -g -pg
else
C++FLAGS = -Wall -D_LINUX -D_UNIX -D_TCL85 \
$(GRAPHIC_FLAG) $(RELIABILITY_FLAG) $(DEBUG_FLAG) \
$(PROGRAMMING_FLAG) -O3 -ffloat-store
CFLAGS = -Wall -O2
FFLAGS = -Wall -O
# Linker
LINKER = $(CC++)
LINKFLAGS = -rdynamic -Wl
endif
GRAPHIC_FLAG = -D_GLX
# Misc
MAKE = make
CD = cd
ECHO = echo
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
# %---------------------------------------------------------%
# | SECTION 5: 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 6: 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) \
$(LAPACK_LIBRARY) $(BLAS_LIBRARY) $(CBLAS_LIBRARY) \
$(GRAPHIC_LIBRARY)\
-ldl -lgfortran -lpng
MACHINE_SPECIFIC_LIBS =
# %---------------------------------------------------------%
# | SECTION 7: INCLUDE FILES |
# | |
# | The following macros specify include files needed for |
# | compilation. |
# %---------------------------------------------------------%
MACHINE_INCLUDES = -I/usr/include \
-I$(BASE)/include \
-I/usr/include/c++/4.3 \
-I/usr/include/GL \
-I$(HOME)/include -I$(HOME)/blitz
# this file contains all the OpenSees/SRC includes
include $(FE)/Makefile.incl
TCL_INCLUDES = -I/usr/include/tcl8.5
INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
[b]I'm getting the following error:[/b]
tkMain.cpp:112: error: new declaration ‘char* strrchr(const char*, int)’
/usr/include/string.h:253: error: ambiguates old declaration ‘const char* strrchr(const char*, int)’
tkMain.cpp: In function ‘void Tk_MainOpenSees(int, char**, int (*)(Tcl_Interp*), Tcl_Interp*)’:
tkMain.cpp:308: warning: deprecated conversion from string constant to ‘char*’
tkMain.cpp:325: warning: deprecated conversion from string constant to ‘char*’
make[2]: *** [tkMain.o] Error 1
make[2]: se sale del directorio `/home/pipolinux/OpenSees/src/SRC/tcl'
make[1]: *** [tk] Error 2
make[1]: se sale del directorio `/home/pipolinux/OpenSees/src/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Any help I would be very grateful.
Last edited by cmpolitis on Tue Nov 16, 2010 6:20 pm, edited 1 time in total.
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
Thank you frank,
Now into the next error. I'm getting the following:
/home/jose/lib/libOpenSees.a(AMDNumberer.o): In function `AMD::number(Graph&, int)':
AMDNumberer.cpp:(.text+0x191): undefined reference to `amd_order'
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/home/jose/OpenSEES/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Thanks
Now into the next error. I'm getting the following:
/home/jose/lib/libOpenSees.a(AMDNumberer.o): In function `AMD::number(Graph&, int)':
AMDNumberer.cpp:(.text+0x191): undefined reference to `amd_order'
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make[1]: Leaving directory `/home/jose/OpenSEES/SRC/modelbuilder/tcl'
make: *** [all] Error 2
Thanks
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
In the end it was not compiling the AMD library. I included this in the DIRS variable and the compile and link worked.
Now I need to compile for parallel processing.
Cheers.
Now I need to compile for parallel processing.
Cheers.
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
i will try to respond more quickly if you have errors this time .. you can always shoot me en email & tell me to reply to something if i lag as chances are i have missed it or have forgotten about the problem.
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
hmmm i would try to debug the code...
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
Hi ja_abell,
Could you compile the parallel version?
Thanks
Could you compile the parallel version?
Thanks
-
- Posts: 1
- Joined: Mon Apr 04, 2011 7:52 pm
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
I accept with information: * Report this post
* Reply with quote
Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04 LTS
Postby cmpolitis » Tue Nov 16, 2010 2:04 pm
Hi, i've got Ubuntu 10.04 LTS (April 2010 release) and i'm trying to compile OpenSees 2.2.2.
[b]Steps Followed
1. First downloaded and unpacked OpenSees 2.2.2
2. In terminal entered the following command:
[/b]
~/$ sudo apt-get install build-essential gfortran gfortran-4.3 libatk1.0-dev libcairo2-dev libdirectfb-dev libdirectfb-extra libexpat1-dev libfontconfig1-dev libfreetype6-dev libgfortran3 libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev libgtk2.0-dev libice-dev libjpeg62-dev libpango1.0-dev libpixman-1-dev libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libsysfs-dev libx11-dev libxau-dev libxcb1-dev libxcb-render0-dev libxcb-render-util0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev libxss-dev mesa-common-dev tcl8.5 tcl8.5-dev tcllib tk8.5 tk8.5-dev x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev
That was for getting all "dependent files".
[b]then used the following "make file":[/b]
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################
include Makefile.def
############################################################################
#
# First, modify the definitions in Makefile.def to match
# your library archiver, compiler, and the options to be used.
#
# Sample Makefile.def's can be found in the directory MAKES
#
# Then to create or add to the libraries needed, enter make after having
# making the modifications to this file.
#
# The name of the libraries created and their placement are defined
# in the file called Makefile.def.
#
# To remove the object files after the libraries and testing executables
# are created, enter
# make clean
# To remove the object files and the libraries specified in WIPE_LIBS, enter
# make wipe
# To just make the libs, enter
# make lib
# To just build the interpreter type
# make OpenSees
############################################################################
all:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
@$(ECHO) LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM;
@$(CD) $(FE)/tcl; ./OSverCreate.sh ; $(MAKE) tcl; ./OSverRemove.sh
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSees: tcl
tcl:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tcl;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
* Reply with quote
Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04 LTS
Postby cmpolitis » Tue Nov 16, 2010 2:04 pm
Hi, i've got Ubuntu 10.04 LTS (April 2010 release) and i'm trying to compile OpenSees 2.2.2.
[b]Steps Followed
1. First downloaded and unpacked OpenSees 2.2.2
2. In terminal entered the following command:
[/b]
~/$ sudo apt-get install build-essential gfortran gfortran-4.3 libatk1.0-dev libcairo2-dev libdirectfb-dev libdirectfb-extra libexpat1-dev libfontconfig1-dev libfreetype6-dev libgfortran3 libgl1-mesa-dev libglu1-mesa libglu1-mesa-dev libgtk2.0-dev libice-dev libjpeg62-dev libpango1.0-dev libpixman-1-dev libpng12-dev libpthread-stubs0 libpthread-stubs0-dev libsm-dev libsysfs-dev libx11-dev libxau-dev libxcb1-dev libxcb-render0-dev libxcb-render-util0-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxrandr-dev libxrender-dev libxss-dev mesa-common-dev tcl8.5 tcl8.5-dev tcllib tk8.5 tk8.5-dev x11proto-composite-dev x11proto-core-dev x11proto-damage-dev x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-render-dev x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev
That was for getting all "dependent files".
[b]then used the following "make file":[/b]
############################################################################
#
# Program: OpenSees
#
# Purpose: A Top-level Makefile to create the libraries needed
# to use the OpenSees framework.
#
# Written: fmk
# Created: 10/99
#
# Send bug reports, comments or suggestions to fmckenna@ce.berkeley.edu
#
############################################################################
include Makefile.def
############################################################################
#
# First, modify the definitions in Makefile.def to match
# your library archiver, compiler, and the options to be used.
#
# Sample Makefile.def's can be found in the directory MAKES
#
# Then to create or add to the libraries needed, enter make after having
# making the modifications to this file.
#
# The name of the libraries created and their placement are defined
# in the file called Makefile.def.
#
# To remove the object files after the libraries and testing executables
# are created, enter
# make clean
# To remove the object files and the libraries specified in WIPE_LIBS, enter
# make wipe
# To just make the libs, enter
# make lib
# To just build the interpreter type
# make OpenSees
############################################################################
all:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@( \
for f in $(DIRS); \
do \
$(CD) $$f; \
$(MAKE); \
$(CD) ..; \
done );
@$(ECHO) LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM;
@$(CD) $(FE)/tcl; ./OSverCreate.sh ; $(MAKE) tcl; ./OSverRemove.sh
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
OpenSees: tcl
tcl:
ifdef MKDIR
$(MKDIR) $(HOME)/OpenSees/bin
$(MKDIR) $(HOME)/OpenSees/lib
endif
@$(ECHO) Building OpenSees Program ..;
@$(CD) $(FE)/tcl; $(MAKE) tcl;
@$(CD) $(FE)/modelbuilder/tcl; $(MAKE) tcl;
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
Same problem with other compilers?
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
I have installed tcl8.5, tk8.5, tcl8.5-dev, tk8.5-dev & tcllib
As I try to build OpenSees on Ubuntu 10.10 64bit, I get this error message.
compilation terminated.
make[1]: *** [TclModelBuilder.o] Error 1
make[1]: Leaving directory `/home/numubuntu/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2
The problem seems to relate to Tcl header ... please advice
Edit: Compiler g++
As I try to build OpenSees on Ubuntu 10.10 64bit, I get this error message.
compilation terminated.
make[1]: *** [TclModelBuilder.o] Error 1
make[1]: Leaving directory `/home/numubuntu/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2
The problem seems to relate to Tcl header ... please advice
Edit: Compiler g++
Hisham El Safti
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
Try installing and linking to tcl8.4 instead -- that worked for me with Ubuntu 10.04
TCL_INCLUDES = -I/usr/include/tcl8.4 -I/usr/include/
INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
TCL_INCLUDES = -I/usr/include/tcl8.4 -I/usr/include/
INCLUDES = $(TCL_INCLUDES) $(FE_INCLUDES) $(MACHINE_INCLUDES)
Re: Help - Problem compiling OpenSees 2.2.2 in Ubuntu 10.04
I have changed the TCL_INCLUDES variable in the Makefile.def file as you advised. However, the same message appeared. I also made 8.4 tcl installations and tried again but again the same message appeared. I then uninstalled tcl8.5 and tried again but no luck ... same msg!
Thanks for your effort .... I still need help!
Thanks for your effort .... I still need help!
Hisham El Safti