diff --git a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 index 7d1228a4b..ee15dd21a 100644 --- a/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 +++ b/ThirdParty/rpmBuild/SOURCES/libccmio-2.6.1.patch_0 @@ -7,7 +7,15 @@ diff -ruN libccmio-2.6.1_orig/config/config.gnu.to.star libccmio-2.6.1/config/co # $Id: config.gnu.to.star,v 1.4 2006/06/05 21:12:16 geoffp Exp $ -@@ -34,6 +34,8 @@ +@@ -24,6 +24,7 @@ + mips-sgi-irix64_6-null) echo irix64_6.5-mips4 ;; + i586-unknown-linux_2.2-glibc-null) echo linux_2.2-x86-glibc_2.2.0 ;; + i586-unknown-linux_2.4-glibc-null) echo linux_2.4-x86-glibc_2.3.2 ;; ++ i586-unknown-linux-libc5-null) echo linux_2.4-x86-glibc_2.3.2 ;; + ia64-unknown-linux-null) echo linux64_2.4-itanium-glibc_2.2.4 ;; + alpha-dec-osf3-null) echo osf1_4.0-com ;; + alpha-dec-osf5-null) echo osf1_5.1-com ;; +@@ -34,6 +35,8 @@ x86_64-unknown-linux-gnu-null) echo linux64_2.4-x86-glibc_2.2.5 ;; ppc64-unknown-linux-gnu-null) echo linux64_2.6-pwr4-glibc_2.3.3 ;; i386-apple-darwin8-null) echo i386-apple-darwin8 ;; diff --git a/ThirdParty/rpmBuild/SOURCES/scotch-5.1.10b_patch_0 b/ThirdParty/rpmBuild/SOURCES/scotch-5.1.10b_patch_0 index 6fd234ff4..29d09cbdc 100644 --- a/ThirdParty/rpmBuild/SOURCES/scotch-5.1.10b_patch_0 +++ b/ThirdParty/rpmBuild/SOURCES/scotch-5.1.10b_patch_0 @@ -39,7 +39,7 @@ diff -ruN scotch_5.1.10b_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib sco -CCD = gcc -CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DSCOTCH_PTHREAD -Drestrict=__restrict -CLIBFLAGS = -shared -fPIC -+CCD = gcc -I$(MPI_HOME)/include ++CCD = mpicc -I$(MPI_HOME)/include +CFLAGS = -O3 -fPIC -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_RENAME_PARSER -DSCOTCH_PTHREAD -Drestrict=__restrict +CLIBFLAGS = -shared LDFLAGS = -lz -lm -lrt diff --git a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.4.spec b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.4.spec index 8b1277278..199df02c8 100644 --- a/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.4.spec +++ b/ThirdParty/rpmBuild/SPECS/qt-everywhere-opensource-src-4.7.4.spec @@ -130,9 +130,11 @@ cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh export QT_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS export QT_BIN_DIR=\$QT_DIR/bin +export QT_LIB_DIR=\$QT_DIR/lib # Enable access to the runtime package applications [ -d \$QT_BIN_DIR ] && _foamAddPath \$QT_BIN_DIR +[ -d \$QT_LIB_DIR ] && _foamAddLib \$QT_LIB_DIR DOT_SH_EOF # @@ -143,10 +145,15 @@ cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.cs # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ setenv QT_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS setenv QT_BIN_DIR \$QT_DIR/bin +setenv QT_LIB_DIR \$QT_DIR/lib if ( -e \$QT_BIN_DIR ) then _foamAddPath \$QT_BIN_DIR endif + +if ( -e \$QT_LIB_DIR ) then + _foamAddLib \$QT_LIB_DIR +endif DOT_CSH_EOF #finally, generate a .tgz file for systems where using rpm for installing packages diff --git a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt new file mode 100644 index 000000000..6aad60fa4 --- /dev/null +++ b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_32-bit.txt @@ -0,0 +1,120 @@ +Installation of OpenFOAM-1.6-ext on Ubuntu 12.04 64-bit + +- Proceed with the installation of the OS +- Update your OS installation using "Update Manager". +- If asked to reboot your system, please do so. + +-------------------------------------------------------------------------------- + +# Installation of additional system packages: +git: sudo apt-get install git +flex: sudo apt-get install flex +bison: sudo apt-get install bison +rpm: sudo apt-get install rpm +g++: sudo apt-get install g++ +libz: sudo apt-get install zlib1g-dev +binutils-dev : sudo apt-get install binutils-dev +openmpi: sudo apt-get install openmpi-bin libopenmpi-dev +libxext: sudo apt-get install libxext-dev +libxt : sudo apt-get install libxt-dev +libXrender: sudo apt-get install libxrender-dev +libstdc++5: sudo apt-get install libstdc++5 +OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev + +# You can also install everything at once: +sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \ + openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \ + libstdc++5 libgl1-mesa-dev libglu1-mesa-dev + +-------------------------------------------------------------------------------- + +# If you need to compile swak4Foam, it is a good idea to install Mercurial (hg) +# sudo apt-get install mercurial + +-------------------------------------------------------------------------------- + +# Minor correction for make/gmake +sudo ln -s /usr/bin/make /usr/bin/gmake + +-------------------------------------------------------------------------------- + +# Download OpenFOAM-1.6-ext +mkdir ~/OpenFOAM +cd ~/OpenFOAM +git clone git://openfoam-extend.git.sourceforge.net/gitroot/openfoam-extend/OpenFOAM-1.6-ext + +-------------------------------------------------------------------------------- + +# Create the file etc/prefs.sh +cp ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh-EXAMPLE ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh + +-------------------------------------------------------------------------------- + +# Use the system compiler +sed -i s/"compilerInstall=System"/"compilerInstall=System\nWM_COMPILER=Gcc46"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh + +-------------------------------------------------------------------------------- + +# Use the system installation of OpenMPI +sed -i s/"#export WM_MPLIB=SYSTEMOPENMPI"/"export WM_MPLIB=SYSTEMOPENMPI"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh +sed -i s/"#export OPENMPI_DIR=path_to_system_installed_openmpi"/"export OPENMPI_DIR=\/usr"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh +sed -i s/"#export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/"export OPENMPI_BIN_DIR=\$OPENMPI_DIR\/bin"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh + +-------------------------------------------------------------------------------- + +# About QT4 +# +# Ubuntu 12.04 comes with QT4 version 4.8.1 +# Even thoug ParaView will compile with this version of QT, ParaView will also generate a bunch of +# warnings on the console at runtime. So we will be using the version of QT4 supplied with the +# ThirdParty packages. + +#Uncomment the variable QT_THIRD_PARTY in the file prefs.sh + +sed -i s/"#export QT_THIRD_PARTY=1"/"export QT_THIRD_PARTY=1"/g ~/OpenFOAM/OpenFOAM-1.6-ext/etc/prefs.sh + +# This section of the prefs.sh file should now look like this: + +export QT_THIRD_PARTY=1 +#export QT_DIR=path_to_system_installed_qt +#export QT_BIN_DIR=$QT_DIR/bin + +-------------------------------------------------------------------------------- + +# Source your OpenFOAM environment to get the basic configuration for +# compilation +. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc + +-------------------------------------------------------------------------------- + +# Compile the ThirdParty packages +cd $WM_PROJECT_DIR/ThirdParty +./AllMake.stage1 >& log.AllMake.stage1 +#./AllMake.stage2 >& log.AllMake.stage2 # No need for this one +./AllMake.stage3 >& log.AllMake.stage3 +./AllMake.stage4 >& log.AllMake.stage4 + +-------------------------------------------------------------------------------- + +# Update your OpenFOAM environment to get the basic configuration from the newly +# compiled ThirdParty packages +. ~/OpenFOAM/OpenFOAM-1.6-ext/etc/bashrc + +# Compile OpenFOAM-1.6-ext +cd $WM_PROJECT_DIR +./Allwmake >& log.Allwmake & +tail -f log.Allwmake # To keep an eye on the compilation process + +-------------------------------------------------------------------------------- + +# Run a tutorial to check the basic functionality +cd $FOAM_TUTORIAL/incompressible/simpleFoam/pitzDaily +blockMesh >& log.blockMesh +simpleFoam >& log.simpleFoam +paraFoam + +# You are done! + +-------------------------------------------------------------------------------- +Martin Beaudoin +May 2012 diff --git a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt index f63910903..ff09e2485 100644 --- a/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt +++ b/doc/buildInstructions/Ubuntu/12.04/Compilation_Ubuntu_12.04_64-bit.txt @@ -18,10 +18,12 @@ openmpi: sudo apt-get install openmpi-bin libopenmpi-dev libxext: sudo apt-get install libxext-dev libxt : sudo apt-get install libxt-dev libXrender: sudo apt-get install libxrender-dev +OpenGL: sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev # You can also install everything at once: sudo apt-get install git flex bison rpm g++ zlib1g-dev binutils-dev \ - openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev + openmpi-bin libopenmpi-dev libxext-dev libxt-dev libxrender-dev \ + libgl1-mesa-dev libglu1-mesa-dev -------------------------------------------------------------------------------- diff --git a/wmake/rules/linuxGcc46/X b/wmake/rules/linuxGcc46/X new file mode 100644 index 000000000..bed8bfedd --- /dev/null +++ b/wmake/rules/linuxGcc46/X @@ -0,0 +1,3 @@ +XFLAGS = +XINC = $(XFLAGS) -I/usr/X11R6/include +XLIBS = -L/usr/X11R6/lib -lXext -lX11 diff --git a/wmake/rules/linuxGcc46/c b/wmake/rules/linuxGcc46/c new file mode 100644 index 000000000..d914fcd37 --- /dev/null +++ b/wmake/rules/linuxGcc46/c @@ -0,0 +1,16 @@ +.SUFFIXES: .c .h + +cWARN = -Wall + +cc = gcc -m32 + +include $(RULES)/c$(WM_COMPILE_OPTION) + +cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC + +ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@ + +LINK_LIBS = $(cDBUG) + +LINKLIBSO = $(cc) -shared +LINKEXE = $(cc) -Xlinker --add-needed -Xlinker -z -Xlinker nodefs diff --git a/wmake/rules/linuxGcc46/c++ b/wmake/rules/linuxGcc46/c++ new file mode 100644 index 000000000..2f19f3a34 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++ @@ -0,0 +1,21 @@ +.SUFFIXES: .C .cxx .cc .cpp + +c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast + +CC = g++ -m32 + +include $(RULES)/c++$(WM_COMPILE_OPTION) + +ptFLAGS = -DNoRepository -ftemplate-depth-40 + +c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC + +Ctoo = $(WM_SCHEDULER) $(CC) $(c++FLAGS) -c $$SOURCE -o $@ +cxxtoo = $(Ctoo) +cctoo = $(Ctoo) +cpptoo = $(Ctoo) + +LINK_LIBS = $(c++DBUG) + +LINKLIBSO = $(CC) $(c++FLAGS) -shared -Xlinker --add-needed -Xlinker --no-as-needed +LINKEXE = $(CC) $(c++FLAGS) -Xlinker --add-needed -Xlinker --no-as-needed \ No newline at end of file diff --git a/wmake/rules/linuxGcc46/c++Debug b/wmake/rules/linuxGcc46/c++Debug new file mode 100644 index 000000000..19bdb9c33 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Debug @@ -0,0 +1,2 @@ +c++DBUG = -ggdb3 -DFULLDEBUG +c++OPT = -O0 -fdefault-inline diff --git a/wmake/rules/linuxGcc46/c++Opt b/wmake/rules/linuxGcc46/c++Opt new file mode 100644 index 000000000..4cb95b5b3 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Opt @@ -0,0 +1,2 @@ +c++DBUG = +c++OPT = -O3 diff --git a/wmake/rules/linuxGcc46/c++Prof b/wmake/rules/linuxGcc46/c++Prof new file mode 100644 index 000000000..3bda4dad5 --- /dev/null +++ b/wmake/rules/linuxGcc46/c++Prof @@ -0,0 +1,2 @@ +c++DBUG = -pg +c++OPT = -O2 diff --git a/wmake/rules/linuxGcc46/cDebug b/wmake/rules/linuxGcc46/cDebug new file mode 100644 index 000000000..72b638f45 --- /dev/null +++ b/wmake/rules/linuxGcc46/cDebug @@ -0,0 +1,2 @@ +cDBUG = -ggdb -DFULLDEBUG +cOPT = -O1 -fdefault-inline -finline-functions diff --git a/wmake/rules/linuxGcc46/cOpt b/wmake/rules/linuxGcc46/cOpt new file mode 100644 index 000000000..a8b063547 --- /dev/null +++ b/wmake/rules/linuxGcc46/cOpt @@ -0,0 +1,2 @@ +cDBUG = +cOPT = -O3 diff --git a/wmake/rules/linuxGcc46/cProf b/wmake/rules/linuxGcc46/cProf new file mode 100644 index 000000000..ca3ac9bf5 --- /dev/null +++ b/wmake/rules/linuxGcc46/cProf @@ -0,0 +1,2 @@ +cDBUG = -pg +cOPT = -O2 diff --git a/wmake/rules/linuxGcc46/general b/wmake/rules/linuxGcc46/general new file mode 100644 index 000000000..886bf6748 --- /dev/null +++ b/wmake/rules/linuxGcc46/general @@ -0,0 +1,10 @@ +CPP = cpp -traditional-cpp +LD = ld -melf_i386 + +PROJECT_LIBS = -l$(WM_PROJECT) -ldl + +include $(GENERAL_RULES)/standard + +include $(RULES)/X +include $(RULES)/c +include $(RULES)/c++ diff --git a/wmake/rules/linuxGcc46/mplib b/wmake/rules/linuxGcc46/mplib new file mode 100644 index 000000000..8a84b4014 --- /dev/null +++ b/wmake/rules/linuxGcc46/mplib @@ -0,0 +1,3 @@ +PFLAGS = +PINC = +PLIBS = diff --git a/wmake/rules/linuxGcc46/mplibGAMMA b/wmake/rules/linuxGcc46/mplibGAMMA new file mode 100644 index 000000000..d62c6250f --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibGAMMA @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lgamma diff --git a/wmake/rules/linuxGcc46/mplibHPMPI b/wmake/rules/linuxGcc46/mplibHPMPI new file mode 100644 index 000000000..8aff40632 --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibHPMPI @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include -D_MPICC_H +PLIBS = -L$(MPI_ARCH_PATH)/lib/linux_ia32 -lmpi diff --git a/wmake/rules/linuxGcc46/mplibMPICH b/wmake/rules/linuxGcc46/mplibMPICH new file mode 100644 index 000000000..e5a38a8e3 --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibMPICH @@ -0,0 +1,3 @@ +PFLAGS = -DMPICH_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -lrt diff --git a/wmake/rules/linuxGcc46/mplibMPICH-GM b/wmake/rules/linuxGcc46/mplibMPICH-GM new file mode 100644 index 000000000..88493ebc7 --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibMPICH-GM @@ -0,0 +1,3 @@ +PFLAGS = +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpich -L$(GM_LIB_PATH) -lgm diff --git a/wmake/rules/linuxGcc46/mplibOPENMPI b/wmake/rules/linuxGcc46/mplibOPENMPI new file mode 100644 index 000000000..834d2d3e2 --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibOPENMPI @@ -0,0 +1,3 @@ +PFLAGS = -DOMPI_SKIP_MPICXX +PINC = -I$(MPI_ARCH_PATH)/include +PLIBS = -L$(MPI_ARCH_PATH)/lib -lmpi diff --git a/wmake/rules/linuxGcc46/mplibSYSTEMOPENMPI b/wmake/rules/linuxGcc46/mplibSYSTEMOPENMPI new file mode 100644 index 000000000..98fa814ce --- /dev/null +++ b/wmake/rules/linuxGcc46/mplibSYSTEMOPENMPI @@ -0,0 +1 @@ +PFLAGS = -DOMPI_SKIP_MPICXX