Compiling Error with colvars with version Version 12-Dec-2018

Dear LAMMPS Users

I tried to compile Version 12-Dec-2018 lammps including colvars packages and have encountered the following errors.
There are no such errors for at least version 16-Mar-2018; there are no such error if I directly compile mpi without build the COLVARS library in lib/colvars.
I would really grateful if I can get some hints on what to do next. Thank you very much.

Following the user manual instructions, first (1 of the 2 steps) I do

[email protected]…7270…6…:~/lammps-12Dec18/src$ make lib-colvars args="-m mpi"
Installing lib colvars
Building libcolvars.a …
make[1]: Entering directory ‘/home/user/lammps-12Dec18/lib/colvars’
rm -f colvaratoms.o colvarbias_abf.o colvarbias_alb.o colvarbias.o colvarbias_histogram.o colvarbias_meta.o colvarbias_restraint.o colvarcomp_angles.o colvarcomp_coordnums.o colvarcomp.o colvarcomp_distances.o colvarcomp_protein.o colvarcomp_rotations.o colvar.o colvardeps.o colvargrid.o colvarmodule.o colvarparse.o colvarproxy.o colvarscript.o colvartypes.o colvarvalue.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o libcolvars.a
make[1]: Leaving directory ‘/home/user/lammps-12Dec18/lib/colvars’

lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const std::vectorLepton::ExpressionTreeNode&)’:
lepton/src/ExpressionTreeNode.cpp:40:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (operation->getNumArguments() != children.size())
^
lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const Lepton::ExpressionTreeNode&, const Lepton::ExpressionTreeNode&)’:
lepton/src/ExpressionTreeNode.cpp:47:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (operation->getNumArguments() != children.size())
^
lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const Lepton::ExpressionTreeNode&)’:
lepton/src/ExpressionTreeNode.cpp:53:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (operation->getNumArguments() != children.size())
^
lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*)’:
lepton/src/ExpressionTreeNode.cpp:58:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (operation->getNumArguments() != children.size())
^
lepton/src/CompiledExpression.cpp: In member function ‘void Lepton::CompiledExpression::compileExpression(const Lepton::ExpressionTreeNode&, std::vector<std::pair<Lepton::ExpressionTreeNode, int> >&)’:
lepton/src/CompiledExpression.cpp:91:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < node.getChildren().size(); i++) {
^
lepton/src/CompiledExpression.cpp:113:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < args.size(); i++)
^
lepton/src/CompiledExpression.cpp: In member function ‘double Lepton::CompiledExpression::evaluate() const’:
lepton/src/CompiledExpression.cpp:170:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < variablesToCopy.size(); i++)
^
lepton/src/CompiledExpression.cpp:175:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int step = 0; step < operation.size(); step++) {
^
lepton/src/CompiledExpression.cpp:180:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < args.size(); i++)
^
lepton/src/Parser.cpp: In static member function ‘static Lepton::ParsedExpression Lepton::Parser::parse(const string&, const std::map<std::__cxx11::basic_string, Lepton::CustomFunction*>&)’:
lepton/src/Parser.cpp:181:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos != tokens.size())
^
lepton/src/Parser.cpp:190:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos != tokens.size())
^
lepton/src/Parser.cpp: In static member function ‘static Lepton::ExpressionTreeNode Lepton::Parser::parsePrecedence(const std::vectorLepton::ParseToken&, int&, const std::map<std::__cxx11::basic_string, Lepton::CustomFunction*>&, const std::map<std::__cxx11::basic_string, Lepton::ExpressionTreeNode>&, int)’:
lepton/src/Parser.cpp:201:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos == tokens.size())
^
lepton/src/Parser.cpp:227:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen)
^
lepton/src/Parser.cpp:241:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen)
^
colvar.cpp: In member function ‘int colvar::write_acf(std::ostream&)’:
colvar.cpp:2309:10: warning: enumeration value ‘acf_notset’ not handled in switch [-Wswitch]
switch (acf_type) {
^
make[1]: Entering directory ‘/home/user/lammps-12Dec18/lib/colvars’
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvaratoms.o colvaratoms.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_abf.o colvarbias_abf.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_alb.o colvarbias_alb.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias.o colvarbias.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_histogram.o colvarbias_histogram.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_meta.o colvarbias_meta.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_restraint.o colvarbias_restraint.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_angles.o colvarcomp_angles.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_coordnums.o colvarcomp_coordnums.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp.o colvarcomp.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_distances.o colvarcomp_distances.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_protein.o colvarcomp_protein.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_rotations.o colvarcomp_rotations.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvar.o colvar.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvardeps.o colvardeps.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvargrid.o colvargrid.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarmodule.o colvarmodule.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarparse.o colvarparse.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarproxy.o colvarproxy.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarscript.o colvarscript.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvartypes.o colvartypes.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarvalue.o colvarvalue.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/CompiledExpression.o lepton/src/CompiledExpression.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ExpressionTreeNode.o lepton/src/ExpressionTreeNode.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ParsedExpression.o lepton/src/ParsedExpression.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ExpressionProgram.o lepton/src/ExpressionProgram.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/Operation.o lepton/src/Operation.cpp
mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/Parser.o lepton/src/Parser.cpp
ar -rscv libcolvars.a colvaratoms.o colvarbias_abf.o colvarbias_alb.o colvarbias.o colvarbias_histogram.o colvarbias_meta.o colvarbias_restraint.o colvarcomp_angles.o colvarcomp_coordnums.o colvarcomp.o colvarcomp_distances.o colvarcomp_protein.o colvarcomp_rotations.o colvar.o colvardeps.o colvargrid.o colvarmodule.o colvarparse.o colvarproxy.o colvarscript.o colvartypes.o colvarvalue.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o
a - colvaratoms.o
a - colvarbias_abf.o
a - colvarbias_alb.o
a - colvarbias.o
a - colvarbias_histogram.o
a - colvarbias_meta.o
a - colvarbias_restraint.o
a - colvarcomp_angles.o
a - colvarcomp_coordnums.o
a - colvarcomp.o
a - colvarcomp_distances.o
a - colvarcomp_protein.o
a - colvarcomp_rotations.o
a - colvar.o
a - colvardeps.o
a - colvargrid.o
a - colvarmodule.o
a - colvarparse.o
a - colvarproxy.o
a - colvarscript.o
a - colvartypes.o
a - colvarvalue.o
a - lepton/src/CompiledExpression.o
a - lepton/src/ExpressionTreeNode.o
a - lepton/src/ParsedExpression.o
a - lepton/src/ExpressionProgram.o
a - lepton/src/Operation.o
a - lepton/src/Parser.o
a - lepton/src/CompiledExpression.o
a - lepton/src/ExpressionTreeNode.o
a - lepton/src/ParsedExpression.o
a - lepton/src/ExpressionProgram.o
a - lepton/src/Operation.o
a - lepton/src/Parser.o
make[1]: Leaving directory ‘/home/user/lammps-12Dec18/lib/colvars’

Build was successful

After which (2 of the 2 steps), I do:

[email protected]…5446…:~/lammps-12Dec18/src$ make mpi
make[1]: Entering directory ‘/home/user/lammps-12Dec18/src’
Gathering installed package information (may take a little while)
make[1]: Leaving directory ‘/home/user/lammps-12Dec18/src’
Compiling LAMMPS for machine mpi
make[1]: Entering directory ‘/home/user/lammps-12Dec18/src/Obj_mpi’
cc -O -o fastdep.exe …/DEPEND/fastdep.c
make[1]: Leaving directory ‘/home/user/lammps-12Dec18/src/Obj_mpi’
make[1]: Entering directory ‘/home/user/lammps-12Dec18/src/Obj_mpi’
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/dihedral_nharmonic.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/ntopo_improper_all.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/npair_skip.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/math_special.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/finish.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/variable.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/image.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_dihedral_local.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/fix_ave_histo.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/fix_rigid_nvt.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/displace_atoms.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/reader_xyz.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/pair_deprecated.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/pair_morse_smooth_linear.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/angle_deprecated.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/neigh_list.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/bond_harmonic_shift.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/atom.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/nstencil_half_multi_2d_newton.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/fix_wall_harmonic.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_chunk_atom.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/npair_half_size_bin_newtoff.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/math_extra.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_ke_rigid.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/nstencil_half_bin_3d_newtoff.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/temper_npt.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/pair_buck.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/min.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/atom_vec_charge.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_deprecated.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/temper_grem.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_rdf.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/compute_chunk_spread_atom.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/npair_full_multi.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/lattice.cpp
mpicxx -g -O3 -Wno-unused-result -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -c …/write_dump.cpp
In file included from …/style_dump.h:2:0,
from …/write_dump.cpp:20:
…/dump_atom_gz.h:24:18: fatal error: zlib.h: No such file or directory
compilation terminated.
Makefile:104: recipe for target ‘write_dump.o’ failed
make[1]: *** [write_dump.o] Error 1
make[1]: Leaving directory ‘/home/user/lammps-12Dec18/src/Obj_mpi’
Makefile:176: recipe for target ‘mpi’ failed
make: *** [mpi] Error 2

Best Regards
Lunna

Dear LAMMPS Users

I tried to compile Version 12-Dec-2018 lammps including colvars packages and have encountered the following errors.
There are no such errors for at least version 16-Mar-2018; there are no such error if I directly compile mpi without build the COLVARS library in lib/colvars.
I would really grateful if I can get some hints on what to do next. Thank you very much.

this has *nothing* to do with the colvars package. the error you get
from compilation of the LAMMPS executable is due to the COMPRESS
package for which you either don't have configured it correctly in
lib/compress/Makefile.lammps, or you don't have the necessary headers
(and libraries) installed.

please note that the error originates in the file dump_atom_gz.h which
is looking for zlib.h, and that file belongs to COMPRESS, not COLVARS.

axel.

Dear Axel

Thanks a lot for the great help.

I have modified lib/compress/Makefile.lammps from its original form:

compress_SYSINC =
compress_SYSLIB = -lz
compress_SYSPATH =

to:

compress_SYSINC =
compress_SYSLIB = -lz
compress_SYSPATH = -Ldir /usr/include/zlib.h

because I think I have:

[email protected]…5446…:~$ whereis zlib
zlib: /usr/include/zlib.h /usr/share/man/man3/zlib.3.gz

And this time I repeated the same process and the compiling was successful.

Best Regards
Lunna

Sorry, but this makes no sense. These modifications are pointless and incorrect, and compilation should have worked as well with the original file.

So there must be some other reason for the error, possibly some other incorrect modifications on another file.

Axel

Dear Axel

Thanks again and very sorry for the confusion.
I corrected lib/compress/Makefile.lammps back to its original form and tried compiling again, which worked.
As you have pointed out, it must be some file that I have mistakenly and incorrectly modified. Unfortunately I did not record it down and I should definitely be much more careful next time before posting a ticket.

Best Regards
Lunna

Dear Axel

When I tried to compile the Jan LAMMPS version, I have encountered the same problem.
This time I have made sure that I have not changed any file: once lammps-4Jan19 was unzipped, I went to lammps-4Jan19/src and did:

make lib-colvars args="-m mpi"

with the following error:

Installing lib colvars
Building libcolvars.a …
make[1]: Entering directory ~/lammps-4Jan19/lib/colvars' rm -f colvaratoms.o colvarbias_abf.o colvarbias_alb.o colvarbias.o colvarbias_histogram.o colvarbias_meta.o colvarbias_restraint.o colvarcomp_angles.o colvarcomp_coordnums.o colvarcomp.o colvarcomp_distances.o colvarcomp_protein.o colvarcomp_rotations.o colvar.o colvardeps.o colvargrid.o colvarmodule.o colvarparse.o colvarproxy.o colvarscript.o colvartypes.o colvarvalue.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o libcolvars.a make[1]: Leaving directory ~/lammps-4Jan19/lib/colvars’
make[1]: Entering directory ~/lammps-4Jan19/lib/colvars' mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvaratoms.o colvaratoms.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_abf.o colvarbias_abf.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_alb.o colvarbias_alb.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias.o colvarbias.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_histogram.o colvarbias_histogram.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_meta.o colvarbias_meta.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarbias_restraint.o colvarbias_restraint.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_angles.o colvarcomp_angles.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_coordnums.o colvarcomp_coordnums.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp.o colvarcomp.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_distances.o colvarcomp_distances.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_protein.o colvarcomp_protein.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarcomp_rotations.o colvarcomp_rotations.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvar.o colvar.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvardeps.o colvardeps.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvargrid.o colvargrid.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarmodule.o colvarmodule.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarparse.o colvarparse.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarproxy.o colvarproxy.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarscript.o colvarscript.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvartypes.o colvartypes.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o colvarvalue.o colvarvalue.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/CompiledExpression.o lepton/src/CompiledExpression.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ExpressionTreeNode.o lepton/src/ExpressionTreeNode.cpp lepton/src/CompiledExpression.cpp: In member function ‘void Lepton::CompiledExpression::compileExpression(const Lepton::ExpressionTreeNode&, std::vector<std::pair<Lepton::ExpressionTreeNode, int> >&)’: lepton/src/CompiledExpression.cpp:91:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < node.getChildren().size(); i++) { ^ lepton/src/CompiledExpression.cpp:113:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 1; i < args.size(); i++) ^ lepton/src/CompiledExpression.cpp: In member function ‘double Lepton::CompiledExpression::evaluate() const’: lepton/src/CompiledExpression.cpp:170:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < variablesToCopy.size(); i++) ^ lepton/src/CompiledExpression.cpp:175:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int step = 0; step < operation.size(); step++) { ^ lepton/src/CompiledExpression.cpp:180:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int i = 0; i < args.size(); i++) ^ lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const std::vector<Lepton::ExpressionTreeNode>&)’: lepton/src/ExpressionTreeNode.cpp:40:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (operation->getNumArguments() != children.size()) ^ lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const Lepton::ExpressionTreeNode&, const Lepton::ExpressionTreeNode&)’: lepton/src/ExpressionTreeNode.cpp:47:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (operation->getNumArguments() != children.size()) ^ lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*, const Lepton::ExpressionTreeNode&)’: lepton/src/ExpressionTreeNode.cpp:53:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (operation->getNumArguments() != children.size()) ^ lepton/src/ExpressionTreeNode.cpp: In constructor ‘Lepton::ExpressionTreeNode::ExpressionTreeNode(Lepton::Operation*)’: lepton/src/ExpressionTreeNode.cpp:58:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (operation->getNumArguments() != children.size()) ^ colvar.cpp: In member function ‘int colvar::write_acf(std::ostream&)’: colvar.cpp:2309:10: warning: enumeration value ‘acf_notset’ not handled in switch [-Wswitch] switch (acf_type) { ^ mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ParsedExpression.o lepton/src/ParsedExpression.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/ExpressionProgram.o lepton/src/ExpressionProgram.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/Operation.o lepton/src/Operation.cpp mpicxx -O2 -g -Wall -fPIC -funroll-loops -Ilepton/include -DLEPTON -c -o lepton/src/Parser.o lepton/src/Parser.cpp cp Makefile.lammps.empty Makefile.lammps lepton/src/Parser.cpp: In static member function ‘static Lepton::ParsedExpression Lepton::Parser::parse(const string&, const std::map<std::basic_string<char>, Lepton::CustomFunction*>&)’: lepton/src/Parser.cpp:181:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (pos != tokens.size()) ^ lepton/src/Parser.cpp:190:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (pos != tokens.size()) ^ lepton/src/Parser.cpp: In static member function ‘static Lepton::ExpressionTreeNode Lepton::Parser::parsePrecedence(const std::vector<Lepton::ParseToken>&, int&, const std::map<std::basic_string<char>, Lepton::CustomFunction*>&, const std::map<std::basic_string<char>, Lepton::ExpressionTreeNode>&, int)’: lepton/src/Parser.cpp:201:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (pos == tokens.size()) ^ lepton/src/Parser.cpp:227:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen) ^ lepton/src/Parser.cpp:241:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen) ^ ar -rscv libcolvars.a colvaratoms.o colvarbias_abf.o colvarbias_alb.o colvarbias.o colvarbias_histogram.o colvarbias_meta.o colvarbias_restraint.o colvarcomp_angles.o colvarcomp_coordnums.o colvarcomp.o colvarcomp_distances.o colvarcomp_protein.o colvarcomp_rotations.o colvar.o colvardeps.o colvargrid.o colvarmodule.o colvarparse.o colvarproxy.o colvarscript.o colvartypes.o colvarvalue.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o lepton/src/CompiledExpression.o lepton/src/ExpressionTreeNode.o lepton/src/ParsedExpression.o lepton/src/ExpressionProgram.o lepton/src/Operation.o lepton/src/Parser.o a - colvaratoms.o a - colvarbias_abf.o a - colvarbias_alb.o a - colvarbias.o a - colvarbias_histogram.o a - colvarbias_meta.o a - colvarbias_restraint.o a - colvarcomp_angles.o a - colvarcomp_coordnums.o a - colvarcomp.o a - colvarcomp_distances.o a - colvarcomp_protein.o a - colvarcomp_rotations.o a - colvar.o a - colvardeps.o a - colvargrid.o a - colvarmodule.o a - colvarparse.o a - colvarproxy.o a - colvarscript.o a - colvartypes.o a - colvarvalue.o a - lepton/src/CompiledExpression.o a - lepton/src/ExpressionTreeNode.o a - lepton/src/ParsedExpression.o a - lepton/src/ExpressionProgram.o a - lepton/src/Operation.o a - lepton/src/Parser.o a - lepton/src/CompiledExpression.o a - lepton/src/ExpressionTreeNode.o a - lepton/src/ParsedExpression.o a - lepton/src/ExpressionProgram.o a - lepton/src/Operation.o a - lepton/src/Parser.o make[1]: Leaving directory ~/lammps-4Jan19/lib/colvars’

Build was successful

May I get some help on this? Thank you very much!

Best Regards

Lunna

Dear Axel

When I tried to compile the Jan LAMMPS version, I have encountered the same problem.
This time I have made sure that I have not changed any file: once lammps-4Jan19 was unzipped, I went to lammps-4Jan19/src and did:
make lib-colvars args="-m mpi"
with the following error:

[...]

lepton/src/Parser.cpp: In static member function ‘static Lepton::ParsedExpression Lepton::Parser::parse(const string&, const std::map<std::basic_string<char>, Lepton::CustomFunction*>&)’:
lepton/src/Parser.cpp:181:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (pos != tokens.size())
                     ^
lepton/src/Parser.cpp:190:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (pos != tokens.size())
                 ^
lepton/src/Parser.cpp: In static member function ‘static Lepton::ExpressionTreeNode Lepton::Parser::parsePrecedence(const std::vector<Lepton::ParseToken>&, int&, const std::map<std::basic_string<char>, Lepton::CustomFunction*>&, const std::map<std::basic_string<char>, Lepton::ExpressionTreeNode>&, int)’:
lepton/src/Parser.cpp:201:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (pos == tokens.size())
             ^
lepton/src/Parser.cpp:227:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen)
                 ^
lepton/src/Parser.cpp:241:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (pos == tokens.size() || tokens[pos].getType() != ParseToken::RightParen)
                 ^

[...]

make[1]: Leaving directory `~/lammps-4Jan19/lib/colvars'

Build was successful

May I get some help on this? Thank you very much!

please look at the output more carefully. there are no errors here,
only (harmless in this case) warnings, and the compilation has
completed successfully. there is nothing that needs to be done about
this. this has nothing to do with the problem you encountered before,
which i had already established, was in no way connected with colvars.

axel.