Makefile.def for RHEL 3

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

Moderators: silvia, selimgunay, Moderators

Post Reply
mhill
Posts: 2
Joined: Tue Jan 16, 2007 11:10 am
Location: Tallahassee
Contact:

Makefile.def for RHEL 3

Post by mhill »

I'm not much of a programmer but I'm attempting to build Opensees onto a UNIX machine and I'm currently having some issues. Can anyone help me? I have used the makefile.def template located in the MAKES folder. The only changes that I made were mainly to the directory changing $(HOME) to /usr/local. Below is the error that I receive.

In file included from commands.cpp:203:
/usr/local/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SuperLU.h:78: '
superlu_options_t' is used as a type, but is not defined as a type.
/usr/local/OpenSees/SRC/system_of_eqn/linearSOE/sparseGEN/SuperLU.h:79: syntax
error before `;' token
make[2]: *** [commands.o] Error 1
make[2]: Leaving directory `/usr/local/OpenSees/SRC/tcl'
make[1]: *** [tcl] Error 2
make[1]: Leaving directory `/usr/local/OpenSees/SRC/modelbuilder/tcl'
make: *** [all] Error 2

[/code]
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hello,

I've come across a lot of errors compiling OpenSees and the most common problem that I've had is the paths to files listed in the Makefile.def are incorrect.

Just curious - which compilers are you using? What version are they (type 'gcc -v' into a shell without the quotes if you are using gcc)?
mhill
Posts: 2
Joined: Tue Jan 16, 2007 11:10 am
Location: Tallahassee
Contact:

Compliers

Post by mhill »

I left that information the same because I knew nothing about it and assumed it would work.

The gcc version is 3.2.3
rjaeger
Posts: 102
Joined: Thu Aug 31, 2006 9:57 pm
Location: UC Davis

Post by rjaeger »

Hello,

You will need to correct the Makefile.def for your system. If there is a RHEL 3 Makefile.def, it could be old and out-of-date.

What I would recommend you do is to first update gcc to a new version. You should look for version 4. I've never used RHEL 3 but if it's like the other Red Hat distributions, it will have an add/remove software program available in one of the dropdown menus assuming you are using GNOME. From there, you should be able to search for GCC and update it to a newer version. If that does not work, go to a terminal and type 'sudo yum update gcc' without the quotes.

You may also want to grab TCL8.4 and TK8.4 using the add/remove software program if you do not already have it.

After you have updated those, you can start hacking away at the Makefile.def file. In particular, look at changing the paths for TCL_LIBRARY and GRAPHIC_LIBRARY. The easiest way to locate the appropriate libraries is to open your Makefile.def in 1 window and have a terminal window open that you can use to search for files. You may have to look in /usr/lib/ or /usr/local/lib/ for libtcl8.4.so and libtk8.4.so. The graphic libraries are usually in /usr/X11R6/lib/. In particular, you're looking for graphics libraries like libGL.so, libGLU.so, and libX11.so.
jaugalde
Posts: 17
Joined: Sun Jan 21, 2007 12:04 am
Location: Fugro

Post by jaugalde »

Well, I have never used RHEL 3 either, but I'm not sure about yum on RHEL 3, if I'm not mistaken RHEL 3 still uses up2date and not yum by default(although maybe you can install yum).

I'm still new to this too, but to add a bit to Robbie's suggestions, I have found that the libraries are not correct if you can build everything but it fails during linking (LIBRARIES BUILT ... NOW LINKING OpenSees PROGRAM
). If it fails before this it can still be some of your paths are wrong, but also you may have issues with your gcc version.

Make sure that the library is in the place the makefile says it is. If its not, use $locate libX (or libtcl or whatever lib) to find what path you should specify.

BTW, if you are looking to upgrade your enterprise linux, Centos5 is build from RHEL 5 source. (comes with gcc 4.1.1).
sukumar_baishya
Posts: 31
Joined: Sun Jul 11, 2004 5:48 am
Location: NERIST, Arunachal Pradesh, India,791109
Contact:

Post by sukumar_baishya »

Hi,

I have not used RHEL 3, but i presume it would be more or less similar to Fedora 5. In that case u may try the Makefile.def that i posted as a reply to Pallavi's question in this forum(possibly in March 2007). It also contains detailed instruction suitable for a newbie. Look at the file, particularly the paths to Graphics Lib files and Tcl Lib files and compare their locations in your system. This should work. Pl. let us know if it works or not.

All the best
(Sukumar)

-----------------------------------------------------
"Good Judgement comes from Experience; experience comes from Bad Judgement" -Mark Twain
Post Reply