While installing moose_2.0.0_kalakand from the source tarball downloaded from the internet,I get the following error.
cs/ReadKkit.cpp -o build/temp.linux-x86_64-2.7/kinetics/ReadKkit.o -O0 -Wall -pedantic -Wno-long-long
In file included from /usr/include/c++/4.7/x86_64-suse-linux/bits/os_defines.h:40:0,
from /usr/include/c++/4.7/x86_64-suse-linux/bits/c++config.h:2058,
from /usr/include/c++/4.7/iomanip:40,
from kinetics/ReadKkit.cpp:11:
/usr/include/features.h:330:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
kinetics/ReadKkit.cpp:14:29: fatal error: utility/utility.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
I have resolved all dependencies before starting the installation process.
Reported by: *anonymous
Designs
Child items
...
Linked items
0
Link issues together to show that they're related.
Learn more.
Are you doing a debug build (make BUILD=debug)? The default is (make) release build and in that case optimization is enabled (-O3) and the warning you mentioned appears for compilation with optimization disabled (-O0). The warning is a known issue with gcc: https://www.wireshark.org/lists/wireshark-bugs/201207/msg00189.html
The last error, "utility/utility.h: No such file or directory" should not occur either as kinetics/Makefile adds the parent directory of "utility" to include path.
Modifying kinetics/ReadKkit.cpp: line # 14 from:
Is openSUSE not preferred to install and use Moose ? Most of the errors which I am encountering is because of some or the other package or configuration problem in openSUSE.
On executing make SVN=0,I get the following error where the execution stops and returns back to the terminal.
g++ -O3 -pthread -fpermissive -fno-strict-aliasing -fPIC -Wall -Wno-long-long -pedantic -DNDEBUG -DUSE_GENESIS_PARSER -DLINUX -DUSE_GSL -DUSE_HDF5 -DH5_NO_DEPRECATED_SYMBOLS -I/usr/local/hdf5/include basecode/_basecode.o msg/_msg.o shell/_shell.o biophysics/_biophysics.o hsolve/_hsolve.o randnum/_randnum.o scheduling/_scheduling.o builtins/_builtins.o device/_device.o kinetics/_kinetics.o ksolve/_ksolve.o regressionTests/_rt.o utility/_utility.o geom/_geom.o mesh/_mesh.o manager/_manager.o signeur/_signeur.o -L/usr/lib -L/usr/local/lib -lpthread -L/lib64 -L/usr/lib64 -L/usr/lib -lgsl -lgslcblas -lm -lhdf5 -o moose
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: cannot find -lhdf5
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
collect2: error: ld returned 1 exit status
make: *** [moose] Error 1
The make process stops here.I tried installing the pthread 32bit devel headers and files,using the glib-32bit,still stuck.
tells you that libhdf5 was not available in the standard library path. You may want to add -L{directory containing libhdf5.so} in line # 165 of the toplevel Makefile:
LIBS = -L/usr/lib -L/usr/local/lib -lpthread -L{location of libhdf5.so}
Sorry, my instructions were not accurate. It should work when you do not pass any further command line arguments to make (just make). The simplest solution is to do
make SVN=0 without any further arguments (BUILD defaults to release in the released version).
Another solution for the released source (not from svn repo) will be: around line # 150
ifndef SVNSVN?=1endif
changed to
ifndef SVNSVN?=0endif
A bit of explanation:
The SVN argument indicates whether we want to add the svn revision number as part of the version number compiled into MOOSE. This uses the svnversion command to determine the current svn version. When it is not an svn check-out code, the directory does not have any svn version number and svnrevision prints the string Unversioned directory. Now the unescaped space in the middle messes up the command line and g++ thinks that it has to compile a file called directory".
But the appropriate fix will be to check for Unversioned directory in the string printed by svnversion. I'll commit the fix in svn repo.
This fix was committed in revision: 4487. The fix is as follows (around line# 150 in top level Makefile):
replace
# Insert the svn revision no. into the code as a preprocessor macro.# Only for release versions we want to pass SVN=0 to make.ifndef SVNSVN?=1endififneq ($(SVN),0)SVN_REVISION=$(shell svnversion)ifneq ($(SVN_REVISION),export)CXXFLAGS+=-DSVN_REVISION=\"$(SVN_REVISION)\"endifendif
with
# Insert the svn revision no. into the code as a preprocessor macro.# Only for release versions we want to pass SVN=0 to make.ifndef SVNSVN?=1endifempty :=space := $(empty) $(empty)ifneq ($(SVN),0)# Some versions of svnrevision return "Unversioned directory" which causes confusion to gccSVN_REVISION := $(shell svnversion)SVN_REVISION := $(subst space,_,$(SVN_REVISION))# SVN_REVISION := $(subst :,_,$(SVN_REVISION))ifneq ($(SVN_REVISION),export)CXXFLAGS+=-DSVN_REVISION=\"$(SVN_REVISION)\"endifendif
I was able to successfully execute the makefile on OpenSUSE 12.3. This is the following error that comes to when I execute the command "sudo make install"
## copy icon to /usr/share/icons/hicolor/<size>/apps (hicolor is the fallback theme)mkdir -p /usr/share/icons/hicolor/scalable/appscp gui/icons/moose_icon.png /usr/share/icons/hicolor/scalable/apps/cp gui/icons/squid.png /usr/share/icons/hicolor/scalable/apps/## need to update the icon cache to show the iconupdate-icon-caches /usr/share/icons/hicolor/make: update-icon-caches: Command not foundmake: *** [install] Error 127
This is an issue with the installation script. On debian based systems libgtk provides that command, but KDE being the primary desktop environment for SUSE, it may not exist there. The script should not fail due to this. Creating a new issue: https://sourceforge.net/p/moose/bugs/112/.