Dear Wolfram,
Thank you for your report. I suspect that a harmful macro TIME is defined on SUSE.
Could you try to insert the following lines
#ifdef TIME # undef TIME #endif
in the header files and see if the error is fixed?
Best, Synge
On 2011/04/18, at 21:15, Wolfram Brenig wrote:
Hi,
compiling ALPS on SuSE 11.4 crashes with errors as listed at the end of this mail. [gcc version 4.5.1 20101208 [gcc-4_5-branch revision 167585] (SUSE Linux), kernel 2.6.37.1-1.2-desktop]
The err msgs seem to point to the 'TIME' typename in a bunch of header files in alps_whatever/applications/qmc/looper/looper, namely in
correlation.h susceptibility.h measurement.h custom.h operator.h stiffness.h
Indeed, simply changing 'TIME' in these headers into something else, say 'MyTIME', does away with the compile error. However if this fix will induce other errors at run-time, I don't know?
Does anybody have a clue on this?
Wolfram Brenig
PS.: Actually, there seems to be a somehow similar issue with VTK, over which I stumbled while compiling it prior to vistrails, and which seems to have bugged also others: http://comments.gmane.org/gmane.comp.lib.vtk.user/55300
compile errs:--------------------------------------------
[ 49%] Building CXX object applications/qmc/looper/CMakeFiles/loop.dir/loop_custom.C.o cd /home/userxx/temporary/alpsbuilt/applications/qmc/looper && /usr/bin/c++ -O3 -march=core2 -DNDEBUG -I/usr/local/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -I/home/userxx/temporary/alpsbuilt/src -I/home/userxx/temporary/alps/src -I/home/userxx/temporary/alps/applications/qmc/looper -o CMakeFiles/loop.dir/loop_custom.C.o -c /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C In file included from /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:29:0, from /home/userxx/temporary/alps/applications/qmc/looper/loop_config.h:38, from /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C:26: /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:182:72: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:182:72: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:418:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:418:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:422:13: error: expected unqualified-id before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:483:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:483:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:490:13: error: expected unqualified-id before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:491:49: error: type/value mismatch at argument 3 in template parameter list for ‘template<class MEASUREMENT1, class MEASUREMENT2> template<class MC, class LAT, int <anonymous> > struct looper::composite_measurement<M1, M2>::estimator’ /home/userxx/temporary/alps/applications/qmc/looper/looper/measurement.h:491:49: error: expected a constant of type ‘int’, got ‘time_t’ In file included from /home/userxx/temporary/alps/applications/qmc/looper/loop_config.h:38:0, from /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C:26: /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:37:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:37:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:41:13: error: expected unqualified-id before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:136:60: error: ‘"16:54:59"’ is not a valid template argument for type ‘int’ because string literals can never be used in this context /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:136:61: error: ‘<declaration error>’ is not a template /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:139:60: error: ‘"16:54:59"’ is not a valid template argument for type ‘int’ because string literals can never be used in this context /home/userxx/temporary/alps/applications/qmc/looper/looper/correlation.h:139:61: error: ‘<declaration error>’ is not a template In file included from /home/userxx/temporary/alps/applications/qmc/looper/loop_config.h:39:0, from /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C:26: /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:63:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:63:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:127:60: error: ‘"16:54:59"’ is not a valid template argument for type ‘int’ because string literals can never be used in this context /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:127:61: error: ‘<declaration error>’ is not a template /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:130:60: error: ‘"16:54:59"’ is not a valid template argument for type ‘int’ because string literals can never be used in this context /home/userxx/temporary/alps/applications/qmc/looper/looper/custom.h:130:61: error: ‘<declaration error>’ is not a template In file included from /home/userxx/temporary/alps/applications/qmc/looper/loop_config.h:40:0, from /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C:26: /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:40:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:40:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:45:13: error: expected unqualified-id before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:46:49: error: type/value mismatch at argument 3 in template parameter list for ‘template<unsigned int MAX_DIM> template<class MC, class LAT, int <anonymous> > struct looper::stiffness<MAX_DIM>::estimator’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:46:49: error: expected a constant of type ‘int’, got ‘time_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h: In member function ‘void looper::stiffness<MAX_DIM>::estimator<MC, LAT, <anonymous> >::estimate::begin_bs(const looper::stiffness::estimator::estimator_t&, const lattice_t&, double, int, int, int)’: /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:98:15: error: request for member ‘bond_vector_relative’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:98:40: error: request for member ‘real_bond’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:99:33: error: request for member ‘dim’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h: In member function ‘void looper::stiffness<MAX_DIM>::estimator<MC, LAT, <anonymous> >::estimate::end_bs(const looper::stiffness::estimator::estimator_t&, const lattice_t&, double, int, int, int)’: /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:105:15: error: request for member ‘bond_vector_relative’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:105:40: error: request for member ‘real_bond’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/stiffness.h:106:33: error: request for member ‘dim’ in ‘emt’, which is of non-class type ‘const looper::stiffness::estimator::estimator_t’ In file included from /home/userxx/temporary/alps/applications/qmc/looper/loop_config.h:41:0, from /home/userxx/temporary/alps/applications/qmc/looper/loop_custom.C:26: /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h: At global scope: /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:37:48: error: expected nested-name-specifier before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:37:48: error: expected ‘>’ before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:41:13: error: expected unqualified-id before string constant /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:42:49: error: type/value mismatch at argument 3 in template parameter list for ‘template<class MC, class LAT, int <anonymous> > struct looper::susceptibility::estimator’ /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:42:49: error: expected a constant of type ‘int’, got ‘time_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h: In member function ‘void looper::susceptibility::estimator<MC, LAT, <anonymous> >::estimate::end_s(const looper::susceptibility::estimator::estimator_t&, const lattice_t&, double, int, int)’: /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:128:25: error: request for member ‘gauge’ in ‘emt’, which is of non-class type ‘const looper::susceptibility::estimator::estimator_t’ /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h: In member function ‘void looper::susceptibility::estimator<MC, LAT, <anonymous> >::estimate::start_bottom(const looper::susceptibility::estimator::estimator_t&, const lattice_t&, double, int, int)’: /home/userxx/temporary/alps/applications/qmc/looper/looper/susceptibility.h:140:25: error: request for member ‘gauge’ in ‘emt’, which is of non-class type ‘const looper::susceptibility::estimator::estimator_t’ make[2]: *** [applications/qmc/looper/CMakeFiles/loop.dir/loop_custom.C.o] Error 1 make[2]: Leaving directory `/home/userxx/temporary/alpsbuilt' make[1]: *** [applications/qmc/looper/CMakeFiles/loop.dir/all] Error 2 make[1]: Leaving directory `/home/userxx/temporary/alpsbuilt' make: *** [all] Error 2