compilation error after a git pull

Dear LAMMPS developpers,

After a git pull, I tried
make serial
After some compilations that went OK, I got
g++ -O -DLAMMPS_GZIP -I…/…/lib/reax -I…/STUBS -c pppm_cg.cpp
In file included from pppm_cg.h:23:0,
from pppm_cg.cpp:28:
pppm.h:45:16: error: conflicting return type specified for ‘virtual void LAMMPS_NS::PPPM::timing(int, double&, double&)’
In file included from pppm.h:34:0,
from pppm_cg.h:23,
from pppm_cg.cpp:28:
kspace.h:77:15: error: overriding ‘virtual int LAMMPS_NS::KSpace::timing(int, double&, double&)’
make[1]: *** [pppm_cg.o] Error 1
make[1]: Leaving directory `/usr/local/src/LAMMPS/lammpsGIT/src/Obj_serial’

I use g++ v4.7.1

g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.7/lto-wrapper
Target: x86_64-suse-linux
Configured with: …/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.7 --enable-ssp --disable-libssp --disable-libitm --disable-plugin --with-bugurl= --with-pkgversion=‘SUSE Linux’ --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.7 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux Thread model: posix gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux)

Did you do a: make package-update
Axel

Ho, well …, no ! It is indeed much better after a make package-update! (sorry for forgetting that) However, I have had other problems: g++ -O -DLAMMPS_GZIP -I…/…/lib/reax -I…/STUBS -c pair_hybrid.cpp In file included from style_pair.h:11:0, from pair_hybrid.cpp:19: pair_buck_coul_omp.h:28:21: fatal error: thr_omp.h: No such file or directory compilation terminated. make[1]: *** [pair_hybrid.o] Error 1 make[1]: Leaving directory /usr/local/src/LAMMPS/lammpsGIT/src/Obj_serial' with a "find . -name thr_omp", I saw that it is in USER-OMP (but not in src), so that I successively did make clean-serial make no-user-omp make serial and still got the same error Then I did make yes-user-omp and then this error was gone, ... but then I had: g++ -O -DLAMMPS_GZIP -DLMP_USER_OMP -I../../lib/reax -I../STUBS -c force.cpp In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:33:16: error: redefinition of ‘struct LAMMPS_NS::cvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:33:16: error: previous definition of ‘struct LAMMPS_NS::cvector’ In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:33:52: error: invalid type in declaration before ‘;’ token ewald_n.h:33:52: error: conflicting declaration ‘typedef int LAMMPS_NS::cvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:33:45: error: ‘LAMMPS_NS::cvector’ has a previous declaration as ‘typedef struct LAMMPS_NS::cvector LAMMPS_NS::cvector’ In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:34:16: error: redefinition of ‘struct LAMMPS_NS::hvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:34:16: error: previous definition of ‘struct LAMMPS_NS::hvector’ In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:34:51: error: invalid type in declaration before ‘;’ token ewald_n.h:34:51: error: conflicting declaration ‘typedef int LAMMPS_NS::hvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:34:44: error: ‘LAMMPS_NS::hvector’ has a previous declaration as ‘typedef struct LAMMPS_NS::hvector LAMMPS_NS::hvector’ In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:35:16: error: redefinition of ‘struct LAMMPS_NS::kvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:35:16: error: previous definition of ‘struct LAMMPS_NS::kvector’ In file included from style_kspace.h:3:0, from force.cpp:23: ewald_n.h:35:49: error: invalid type in declaration before ‘;’ token ewald_n.h:35:49: error: conflicting declaration ‘typedef int LAMMPS_NS::kvector’ In file included from style_kspace.h:2:0, from force.cpp:23: ewald_disp.h:35:42: error: ‘LAMMPS_NS::kvector’ has a previous declaration as ‘typedef struct LAMMPS_NS::kvector LAMMPS_NS::kvector’ make[1]: *** [force.o] Error 1 make[1]: Leaving directory /usr/local/src/LAMMPS/lammpsGIT/src/Obj_serial’ make: *** [serial] Error 2

Did you do a: make package-update

Ho, well ..., no !
It is indeed much better after a make package-update! (sorry for forgetting
that)

However, I have had other problems:
g++ -O -DLAMMPS_GZIP -I../../lib/reax -I../STUBS -c pair_hybrid.cpp
In file included from style_pair.h:11:0,
                 from pair_hybrid.cpp:19:
pair_buck_coul_omp.h:28:21: fatal error: thr_omp.h: No such file or

ahhh, yes. this is a problem, that i am currently working on.
between your previous git update and now, some files in
installable packages were removed or renamed. this results
in those files not being removed, when you uninstall or update
packages. until this is fixed, you have two options.

if you can, just make a clean new git clone and continue from there.

or make a git clone and then install the same packages that you
want to have installed and then compare the files in the src directory
and remove all in your old checkout, that are not present in the
new checkout (and that were not added by you).

sorry for the mess, but this is an issue that comes up very rarely
and only to people following the source code archives through
svn or git.

salut,
     axel.

Dear Axel, Thanks for your help. It gave me the idea to use a third quick and dirty way: I did “make clean-serial” (and “make clean-g++”) then “rm -f *.cpp *.h” in src, then I did a “make yes-xxxx” for all the packages I wanted and it compiled OK