CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Compiling OpenFOAM13 on AMD64 with OpenSUSE 101 (http://www.cfd-online.com/Forums/openfoam-installation/57510-compiling-openfoam13-amd64-opensuse-101-a.html)

silent_missile June 2, 2006 19:44

My system is OpenSUSE 10.1 x86
 
My system is OpenSUSE 10.1 x86_64. I installed gcc-4.1, g++-4.1, autoconf, automake, binutils from the DVD, and I installed cmake-2.4.1 from guru source through the internet.

I did by this wiki
http://openfoamwiki.net/index.php/Howto_compile_OpenF OAM
when I installed paraview, I downloaded paraview 2.4.3 and found I need to add
TCL_LIBRARY:FILEPATH=/usr/lib64/tcl8.4.5.so
TK_LIBRARY:FILEPATH=/usr/lib64/tk8.4.5.so
in cmakelist.txt. At last I installed paraview in /usr/local
Then I modified
$HOME/OpenFOAM/OpenFOAM-1.3/.OpenFOAM-1.3/apps/paraview/bashrc
to set the version of paraview

Then I modified the
$HOME/OpenFOAM/OpenFOAM-1.3/.bashrc
and
$HOME/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/Make/options
at last I typed ./Allmake in console, here is the information:

make: Nothing to be done for `all'.
make: Nothing to be done for `allFiles'.
make: "lnInclude/uptodate"is newest
make: "Make/linuxGcc4DPOpt/dependencies"is newest
libso
SOURCE_DIR=.
SOURCE=crc32.c ; gcc -m32 -Dlinux -DDP -Wall -O3 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/linuxGcc4DPOpt/crc32.o
In file included from /usr/include/features.h:346,
from /usr/include/string.h:26,
from zutil.h:21,
from crc32.c:21:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
make: *** [Make/linuxGcc4DPOpt/crc32.o] mistake 1
make: Nothing to be done for `allFiles'.
make: "lnInclude/uptodate"is newest
make: "Make/linuxGcc4DPOpt/dependencies"is newest
libso
/home/friend/OpenFOAM/OpenFOAM-1.3/wmake/bashScripts/mkObjectDir /home/friend/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/libfoamUser
rm -f so_locations
cd Make/linuxGcc4DPOpt ; \
g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -shared libfoamUser.o -L/home/friend/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt -o /home/friend/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/libfoamUser.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make: *** [/home/friend/OpenFOAM/OpenFOAM-1.3/lib/linuxGcc4DPOpt/libfoamUser.so] mistake 1
gmake: *** no rule to creat target"distclean"。 stoped

================================================== ==========================
== Configuring LAM version 7.1.1
================================================== ==========================

*** Initialization, setup
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: builddir: /home/friend/OpenFOAM/OpenFOAM-1.3/src/lam-7.1.1
configure: srcdir: /home/friend/OpenFOAM/OpenFOAM-1.3/src/lam-7.1.1
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
installing to directory "/home/friend/OpenFOAM/OpenFOAM-1.3/src/lam-7.1.1/platforms/linuxGcc4DPOpt"

*** C compiler and preprocessor
checking if want debugging output support... no
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
gmake: *** no target appointed and cann't find makefile. stoped.
gmake: *** no rule to create"install". stoped.
gmake: *** no rule to create"distclean". stoped
make: Nothing to be done for `allFiles'.
make: "Make/linuxGcc4DPOpt/dependencies"is newest
exe
SOURCE_DIR=.
SOURCE=foamSkel.c ; gcc -m32 -Dlinux -DDP -Wall -O3 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -c $SOURCE -o Make/linuxGcc4DPOpt/foamSkel.o
In file included from /usr/include/features.h:346,
from /usr/include/stdio.h:28,
from flexdef.h:31,
from foamSkel.c:3:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
make: *** [Make/linuxGcc4DPOpt/foamSkel.o] mistake 1
make: Nothing to be done for `allFiles'.
make: "lnInclude/uptodate"is newest
make: "Make/linuxGcc4DPOpt/dependencies"is newest
libso
SOURCE_DIR=.
SOURCE=Pstream.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/Pstream.o
In file included from /usr/include/features.h:346,
from /usr/include/limits.h:27,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/limits.h:122,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/syslimits.h:7,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/limits.h:11,
from /usr/include/c++/4.1.0/climits:50,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/label.H:38,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/labelList.H:36,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/Pstream.H:45,
from Pstream.C:32:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
make: *** [Make/linuxGcc4DPOpt/Pstream.o] mistake 1
make: Nothing to be done for `allFiles'.
make: "lnInclude/uptodate"is newest
make: "Make/linuxGcc4DPOptLAM/dependencies"is newest
libso
SOURCE_DIR=.
SOURCE=OPwrite.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/lam-7.1.1/platforms/linuxGcc4DPOpt/incl ude -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOptLAM/OPwrite.o
In file included from /usr/include/features.h:346,
from /usr/include/limits.h:27,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/limits.h:122,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/syslimits.h:7,
from /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include/limits.h:11,
from /usr/include/c++/4.1.0/climits:50,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/label.H:38,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/labelList.H:36,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/Pstream.H:45,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/OPstream.H:37,
from OPwrite.C:30:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
OPwrite.C:32:17: error: mpi.h: no file or directory



Take care, the information is the beginning of the console window, then these 2 lines apears several times

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
OPwrite.C:32:17: error: mpi.h: no file or director

at last I failed.
Can anyone help me?

silent_missile June 3, 2006 04:53

The last error information is
 
The last error information is here:

+ wmake foamInfoExec
Making dependency list for source file foamInfoExec.C

SOURCE_DIR=.
SOURCE=foamInfoExec.C ; g++ -m32 -Dlinux -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-30 -I/home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC -pthread -c $SOURCE -o Make/linuxGcc4DPOpt/foamInfoExec.o
In file included from /usr/include/features.h:346,
from /usr/include/c++/4.1.0/x86_64-suse-linux/bits/os_defines.h:39,
from /usr/include/c++/4.1.0/x86_64-suse-linux/bits/c++config.h:39,
from /usr/include/c++/4.1.0/string:44,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/string.H:47,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/stringList.H:36,
from /home/friend/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/argList.H:36,
from foamInfoExec.C:30:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: no file or directory
make: *** [Make/linuxGcc4DPOpt/foamInfoExec.o] mistake 1

mattijs June 5, 2006 04:56

You seem to be compiling 32 bi
 
You seem to be compiling 32 bit OpenFOAM (-m32). (you can change this with WM_64 as described on this forum)

You do not have some include files? Try and make a small C++ test program a compile this with the OF compilation flags.

silent_missile June 10, 2006 04:20

I have resolved the problem.
 
I have resolved the problem.
I don't know why, but I had to run echo $WM_ARCH to tell the system it is AMD64.
Then everything goes well.

maka August 10, 2007 06:39

zutil.h error: I'm trying t
 
zutil.h error:

I'm trying to install OpenFOAM on our linux cluster. I passed foamInstallationTest and then used ./Allwmake. I got the following error. Can any body help.

In file included from crc32.c:21:
zutil.h:20:22: error: stddef.h: No such file or directory
In file included from zutil.h:21,
from crc32.c:21:
/usr/include/string.h:39: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:43: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:52: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:59: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:62: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:66: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:88: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:96: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:102: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:109: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strxfrm'
/usr/include/string.h:184: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strcspn'
/usr/include/string.h:188: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strspn'
/usr/include/string.h:242: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'strlen'
/usr/include/string.h:281: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:288: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:292: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:296: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:299: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/string.h:329: error: expected declaration specifiers or '...' before 'size_t'
In file included from /usr/include/string.h:417,
from zutil.h:21,
from crc32.c:21:
/usr/include/bits/string2.h:969: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c1'
/usr/include/bits/string2.h:971: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c1'
/usr/include/bits/string2.h:979: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c2'
/usr/include/bits/string2.h:982: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c2'
/usr/include/bits/string2.h:991: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c3'
/usr/include/bits/string2.h:994: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strcspn_c3'
/usr/include/bits/string2.h:1045: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c1'
/usr/include/bits/string2.h:1047: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c1'
/usr/include/bits/string2.h:1056: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c2'
/usr/include/bits/string2.h:1059: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c2'
/usr/include/bits/string2.h:1068: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__strspn_c3'

Best regards,
Maka

maka August 10, 2007 07:31

OS is Redhat. I compile openfo
 
OS is Redhat. I compile openfoam after removing all any folder inside any Make/ or lib/ floder.

/Maka


All times are GMT -4. The time now is 18:14.