Build issues

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

Moderators: silvia, selimgunay, Moderators

Post Reply
wkirkha
Posts: 2
Joined: Tue Jun 22, 2004 8:33 am
Location: Portland, OR

Build issues

Post by wkirkha » Tue Jun 22, 2004 8:40 am

I am trying to install OpenSees 1.5.2 on a Mac G4 DP under OS/X 10.3.4. There are a number of issues that have come up during the compilation, most of them required minor editing. I am down to hopefully the last few, and I could use some help.

1) BerkeleyDbDatastore.cpp - generates about 50 errors for undeclared functions and structs, even though all the include files are present. An example of the errors follows:

In file included from BerkeleyDbDatastore.cpp:25:
/Users/wkirkham/OpenSees/SRC/database/BerkeleyDbDatastore.h:89: error: syntax
error before `*' token
/Users/wkirkham/OpenSees/SRC/database/BerkeleyDbDatastore.h:48: error: `NULL'
was not declared in this scope
BerkeleyDbDatastore.cpp: In constructor `
BerkeleyDbDatastore::BerkeleyDbDatastore(const char*, Domain&,
FEM_ObjectBroker&, char*)':
BerkeleyDbDatastore.cpp:60: error: `dbenv' undeclared (first use this function)
BerkeleyDbDatastore.cpp:60: error: (Each undeclared identifier is reported only
once for each function it appears in.)
BerkeleyDbDatastore.cpp:60: error: `db_env_create' undeclared (first use this
function)
BerkeleyDbDatastore.cpp:62: error: `db_strerror' undeclared (first use this
function)
BerkeleyDbDatastore.cpp:71: error: `DB_CREATE' undeclared (first use this
function)

and it continues for a while. Can anyone verify whether the current download file has the correct includes?

2) It appears the the installation of Tcl/Tk is somewhat different under 8.4.6 than under 8.3, which appears in the Makfile.def for MacOSX. It seems to build dynamic libs rather than static libs. At least I think that's the problem. When I get to the linking step, I get the following messages:

LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM
wkirkham William-Kirkhams-Computer.local 7.4.0 Darwin Tue Jun 22 09:12:50 PDT 2004
gnumake[1]: Nothing to be done for `tcl'.
gnumake[2]: Nothing to be done for `tcl'.
g++: /Users/wkirkham/lib/libOpenSees.a: No such file or directory
g++: /Users/wkirkham/lib/libReliability.a: No such file or directory

So, even though OpenSees is all compiled, nothing seems to be needed for Tcl, so there is no OpenSees.a library. Has anyone had this experience?

3) Just out of curiousity, is anyone currently using OpenSees on a Mac or on anything outside of the Berkeley enviroment? I am a little suspicious that the BerkeleyDbDatastore problems could be more significant if the program depends on some Berkeley specific MySQL implementation.

Thanks for your help!

:)
--Bill

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

Post by fmk » Thu Jun 24, 2004 10:43 am

QUESTION 1: compilation problems with BerkeleyDB are typically due to the fact that they, like MySQL folks, changed their API. If you are version 4.1 or greater you need to add -D_BerkeleyDB41orGreater to the list of C++ flags in the Makefile.def.

if you still have probelms you should use 'cvs update -d' to get the latest version of OpenSees, as we no longer include it be default in a build. To remove it youself you
have to edit 3 files:
1. OpenSees/SRC/Makefile - remove the BerkeleyDBDatastore.o line
2. OpenSees/SRC/database/Makefile - remove BerkeleyDBDatastore.o from list of objects.
3. OpenSees/Makefile.def - remove the -DBERKELEYDB flag

if it fails to lonk complaining about BErkeleyDBDatastore being undefined look in
OpenSees/SRC/database/TclDatabaseCommands.cpp and remove BerkeleyDBDatastore
references.

QUESTION 2: the problem here is that the compilation failed in the database and no libOpenSees was created. if 'make' fails in one of the SRC directories the libs are not created.

QUESTION 3: when using MySQL we only call the MySQL API, what MySQL depends on your installation and hence it will not matter if it was built to use BerkeleyDB underneath.

khpcom
Posts: 1
Joined: Thu Nov 15, 2012 9:04 am

Re: Build issues

Post by khpcom » Thu Nov 15, 2012 9:06 am

Thank you for help with this. I appreciate it.

Post Reply