VTK package source files seem to have had syntax errors introduced?

I am using LAMMPS (29 Sep 2021) from github. I am having difficulty with compiling the VTK package. I have the vtk 7.1 libraries installed and have copied the Makefile.lammps.ubuntu.18.04_vtk7 to Makefile.lammps in the /lib/vtk directory. Also, I did the make yes-vtk.

The issue seems to be what appears to be a bunch of syntax errors in the dump_vtk.cpp file (full output below). I would, in particular point out the error indicating a missing semi-colon at the end of line 786 that does appear to be missing:
…/dump_vtk.cpp:786:72: error: expected ‘;’ before ‘double’
786 | iwhich = atom->find_custom(id_custom[field2index[i]],flag,cols)
| ^
| ;
787 | double **darray = atom->darray[iwhich];
There are a bunch of other errors (see output below). I was wondering if somehow an incomplete/out-of-date version of the vtk package got into the files when the USER-VTK to VTK change happened? This error appears to be present in the current stable and devel branch on github.

full output:

mpic++ -g -O3 -std=c++11 -DLAMMPS_GZIP -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_FFMPEG -DLMP_MPIIO -I/usr/include/vtk-7.1 -c …/dump_vtk.cpp
…/dump_vtk.cpp: In member function ‘virtual void LAMMPS_NS::DumpVTK::init_style()’:
…/dump_vtk.cpp:242:46: error: ‘flag_custom’ was not declared in this scope
242 | icustom = atom->find_custom(id_custom[i],flag_custom[i]);
| ^~~~~~~~~~~
…/dump_vtk.cpp: In member function ‘virtual int LAMMPS_NS::DumpVTK::count()’:
…/dump_vtk.cpp:755:43: error: ‘IVEC’ was not declared in this scope
755 | } else if (thresh_array[ithresh] == IVEC) {
| ^~~~
…/dump_vtk.cpp:757:9: error: expected initializer before ‘i’
757 | i = ATTRIBUTES + nfield + ithresh;
| ^
…/dump_vtk.cpp:758:67: error: ‘cols’ was not declared in this scope; did you mean ‘cosl’?
758 | iwhich = atom->find_custom(id_custom[field2index[i]],flag,cols);
| ^~~~
| cosl
…/dump_vtk.cpp:765:43: error: ‘DVEC’ was not declared in this scope
765 | } else if (thresh_array[ithresh] == DVEC) {
| ^~~~
…/dump_vtk.cpp:772:43: error: ‘IARRAY’ was not declared in this scope
772 | } else if (thresh_array[ithresh] == IARRAY) {
| ^~~~~~
…/dump_vtk.cpp:783:43: error: ‘DARRAY’ was not declared in this scope
783 | } else if (thresh_array[ithresh] == DARRAY) {
| ^~~~~~
…/dump_vtk.cpp:786:72: error: expected ‘;’ before ‘double’
786 | iwhich = atom->find_custom(id_custom[field2index[i]],flag,cols)
| ^
| ;
787 | double **darray = atom->darray[iwhich];
| ~~~~~~
…/dump_vtk.cpp:788:16: error: ‘darray’ was not declared in this scope; did you mean ‘myarrays’?
788 | ptr = &darray[0][argindex[i]-1];
| ^~~~~~
| myarrays
…/dump_vtk.cpp: In member function ‘int LAMMPS_NS::DumpVTK::parse_fields(int, char**)’:
…/dump_vtk.cpp:1759:30: error: ‘DVEC’ is not a member of ‘LAMMPS_NS::ArgInfo’
1759 | |ArgInfo::DVEC|ArgInfo::IVEC);
| ^~~~
…/dump_vtk.cpp:1759:44: error: ‘IVEC’ is not a member of ‘LAMMPS_NS::ArgInfo’
1759 | |ArgInfo::DVEC|ArgInfo::IVEC);
| ^~~~
…/dump_vtk.cpp:1838:50: error: no matching function for call to ‘LAMMPS_NS::atom::find_custom(const char*, int&)’
1838 | n = atom->find_custom(argi.get_name(),tmp);
| ^
In file included from …/dump_vtk.cpp:29:
…/atom.h:339:7: note: candidate: ‘int LAMMPS_NS::atom::find_custom(const char*, int&, int&)’
339 | int find_custom(const char *, int &, int &);
| ^~~~~~~~~~~
…/atom.h:339:7: note: candidate expects 3 arguments, 2 provided
…/dump_vtk.cpp:1856:50: error: no matching function for call to ‘LAMMPS_NS::atom::find_custom(const char*, int&)’
1856 | n = atom->find_custom(argi.get_name(),tmp);
| ^
In file included from …/dump_vtk.cpp:29:
…/atom.h:339:7: note: candidate: ‘int LAMMPS_NS::atom::find_custom(const char*, int&, int&)’
339 | int find_custom(const char *, int &, int &);
| ^~~~~~~~~~~
…/atom.h:339:7: note: candidate expects 3 arguments, 2 provided
…/dump_vtk.cpp:1870:21: error: ‘IARRAY’ is not a member of ‘LAMMPS_NS::ArgInfo’
1870 | case ArgInfo::IARRAY:
| ^~~~~~
…/dump_vtk.cpp:1875:21: error: ‘DARRAY’ is not a member of ‘LAMMPS_NS::ArgInfo’
1875 | case ArgInfo::DARRAY:
| ^~~~~~
…/dump_vtk.cpp: In member function ‘int LAMMPS_NS::DumpVTK::add_custom(const char*, int)’:
…/dump_vtk.cpp:2026:21: error: ‘flag_custom’ was not declared in this scope
2026 | && (flag == flag_custom[icustom])) break;
| ^~~~~~~~~~~
…/dump_vtk.cpp:2031:3: error: ‘flag_custom’ was not declared in this scope
2031 | flag_custom = (int *)
| ^~~~~~~~~~~
…/dump_vtk.cpp: In member function ‘void LAMMPS_NS::DumpVTK::pack_custom(int)’:
…/dump_vtk.cpp:2394:7: error: ‘flag_custom’ was not declared in this scope
2394 | if (flag_custom[index] == 0) { // integer
| ^~~~~~~~~~~
…/dump_vtk.cpp:2396:52: error: no matching function for call to ‘LAMMPS_NS::atom::find_custom(char*&, int&)’
2396 | iwhich = atom->find_custom(id_custom[index],tmp);
| ^
In file included from …/dump_vtk.cpp:29:
…/atom.h:339:7: note: candidate: ‘int LAMMPS_NS::atom::find_custom(const char*, int&, int&)’
339 | int find_custom(const char *, int &, int &);
| ^~~~~~~~~~~
…/atom.h:339:7: note: candidate expects 3 arguments, 2 provided
…/dump_vtk.cpp:2405:52: error: no matching function for call to ‘LAMMPS_NS::atom::find_custom(char*&, int&)’
2405 | iwhich = atom->find_custom(id_custom[index],tmp);
| ^
In file included from …/dump_vtk.cpp:29:
…/atom.h:339:7: note: candidate: ‘int LAMMPS_NS::atom::find_custom(const char*, int&, int&)’
339 | int find_custom(const char *, int &, int &);
| ^~~~~~~~~~~
…/atom.h:339:7: note: candidate expects 3 arguments, 2 provided
make[1]: *** [Makefile:113: dump_vtk.o] Error 1

This issue is unrelated to the renaming of the packages.
Instead it is an indication that the package has been only partially ported to the changes in this pull request:

@CDenniston

Fixes for the VTK package are now available in this commit Collected small changes and bugfixes by akohlmey · Pull Request #2998 · lammps/lammps · GitHub
and will be merged into the ‘develop’ branch soon and then included in the next patch release.

A patch file for the stable release with collected bugfixes including these new fixes is available at Release Stable release 29 September 2021 · lammps/lammps · GitHub
This patch file is being updated as bugs or compilation issues are discovered and fixed or worked around.