Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

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

Moderators: silvia, selimgunay, Moderators

Post Reply
arahmani
Posts: 8
Joined: Sun Mar 11, 2012 8:08 pm
Location: Advanced Geosolutions Inc

Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by arahmani »

Hi all,

I have been trying to compile OpenSees 2.4.1 on Mac OS X 10.7.5 and 10.8.3. I have been able to build all libraries except libOpenSees.a. I get this error at the end of the compilation:

ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make: *** [all] Error 2

Any idea to resolve this error?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by fmk »

what are the symbols that are missing .. should be shown above this message
arahmani
Posts: 8
Joined: Sun Mar 11, 2012 8:08 pm
Location: Advanced Geosolutions Inc

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by arahmani »

Undefined symbols for architecture x86_64:
"__gfortran_stop_string", referenced from:
_fillcommon_ in libOpenSees.a(fillCommon.o)
"__gfortran_st_write", referenced from:
_steel_ in libOpenSees.a(DoddRestrepo.o)
_dsaupd_ in libArpack.a(dsaupd.o)
_umd2p1_ in libUmfpack.a(umd2p1.o)
_ivout_ in libArpack.a(ivout.o)
_dvout_ in libArpack.a(dvout.o)
_umd2p2_ in libUmfpack.a(umd2p2.o)
_fillcommon_ in libOpenSees.a(fillCommon.o)
...
"__gfortran_st_write_done", referenced from:
_steel_ in libOpenSees.a(DoddRestrepo.o)
_dsaupd_ in libArpack.a(dsaupd.o)
_umd2p1_ in libUmfpack.a(umd2p1.o)
_ivout_ in libArpack.a(ivout.o)
_dvout_ in libArpack.a(dvout.o)
_umd2p2_ in libUmfpack.a(umd2p2.o)
_fillcommon_ in libOpenSees.a(fillCommon.o)
...
"__gfortran_compare_string", referenced from:
_dsaupd_ in libArpack.a(dsaupd.o)
_dseupd_ in libArpack.a(dseupd.o)
_ilaenv_ in libLapack.a(ilaenv.o)
_dsaup2_ in libArpack.a(dsaup2.o)
_dsesrt_ in libArpack.a(dsesrt.o)
_dsortr_ in libArpack.a(dsortr.o)
_dsgets_ in libArpack.a(dsgets.o)
...
"__gfortran_transfer_integer_write", referenced from:
_dsaupd_ in libArpack.a(dsaupd.o)
_umd2p1_ in libUmfpack.a(umd2p1.o)
_ivout_ in libArpack.a(ivout.o)
_dvout_ in libArpack.a(dvout.o)
_umd2p2_ in libUmfpack.a(umd2p2.o)
_fillcommon_ in libOpenSees.a(fillCommon.o)
_elmt02_ in libOpenSees.a(elmt02.o)
...
"__gfortran_transfer_real_write", referenced from:
_dsaupd_ in libArpack.a(dsaupd.o)
_umd2p1_ in libUmfpack.a(umd2p1.o)
_dvout_ in libArpack.a(dvout.o)
_umd2p2_ in libUmfpack.a(umd2p2.o)
_elmt02_ in libOpenSees.a(elmt02.o)
"__gfortran_second_sub", referenced from:
_dsconv_ in libArpack.a(dsconv.o)
"__gfortran_transfer_character_write", referenced from:
_umd2p1_ in libUmfpack.a(umd2p1.o)
_ivout_ in libArpack.a(ivout.o)
_dvout_ in libArpack.a(dvout.o)
_umd2p2_ in libUmfpack.a(umd2p2.o)
_fillcommon_ in libOpenSees.a(fillCommon.o)
_elmt02_ in libOpenSees.a(elmt02.o)
"__gfortran_concat_string", referenced from:
_dormqr_ in libLapack.a(dormqr.o)
_dormlq_ in libLapack.a(dormlq.o)
_dtrtri_ in libLapack.a(dtrtri.o)
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by fmk »

you need to link with the gfortran library .. -lgfortran or the full path to it depending on how you built the compiler(s).
em17
Posts: 4
Joined: Tue Mar 02, 2010 10:48 am
Location: Rice University

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by em17 »

I'm getting a similar error. I added the -lgfortran line and without the SMA materials I want to add, the program compiles. I have used these same files when compiling on a PC and it compiles fine. Im not sure what is wrong...please help.

My errors look like this:

LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM
make[1]: Nothing to be done for `tcl'.
make[2]: Nothing to be done for `tcl'.
Undefined symbols for architecture x86_64:
"SMAMaterial::SMAMaterial(int, double, double, double, double, double, double)", referenced from:
TclModelBuilderUniaxialMaterialCommand(void*, Tcl_Interp*, int, char const**, Domain*) in libOpenSees.a(TclModelBuilderUniaxialMaterialCommand.o)
"SuperelasticSMA::SuperelasticSMA(int, double, double, double, double, double, double, double, double, double, double, double)", referenced from:
TclModelBuilderUniaxialMaterialCommand(void*, Tcl_Interp*, int, char const**, Domain*) in libOpenSees.a(TclModelBuilderUniaxialMaterialCommand.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [tcl] Error 1
make: *** [all] Error 2
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by fmk »

SMA material is not in the repository anymore. The code that called it is commented out in the file SRC/material/uniaxial/TclModelBuilerUniaxialMaterialCommand.cpp. It was commented out in the file about 4 years ago and should not be in a 2.4.1 build unless you uncommented it or you have the wrong file.
mfarzad
Posts: 3
Joined: Sun Nov 17, 2013 9:16 pm
Location: zanjan university

Re: Compiling OpenSees2.4.3 on Mac OS X 10.7.5 and 10.8.3

Post by mfarzad »

Hi
I'm installing opensees2.4.3 but it does not work!
the error message is "MSVCR100.DLL was not found"
please help me
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Compiling OpenSees2.4.1 on Mac OS X 10.7.5 and 10.8.3

Post by fmk »

a .dll file missing is an error for a windows operating system, not a mac!
Post Reply