Compilation error: unknown type name ‘VTermSelectionMask’
I've installed all the required things for the build, but I get the following error:
In file included from /home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.c:1:
/home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.h:103:3: error: unknown type name ‘VTermSelectionMask’
103 | VTermSelectionMask selection_mask;
| ^~~~~~~~~~~~~~~~~~
/home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.c: In function ‘Fvterm_new’:
/home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.c:1209:3: warning: implicit declaration of function ‘vterm_state_set_selection_callbacks’; did you mean ‘vterm_state_set_unrecognised_fallbacks’? [-Wimplicit-function-declaratio
]
1209 | vterm_state_set_selection_callbacks(state, &selection_callbacks, term,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| vterm_state_set_unrecognised_fallbacks
/home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.c:1209:47: error: ‘selection_callbacks’ undeclared (first use in this function)
1209 | vterm_state_set_selection_callbacks(state, &selection_callbacks, term,
| ^~~~~~~~~~~~~~~~~~~
/home/bozhidar/.emacs.d/elpa/vterm-20220827.1455/vterm-module.c:1209:47: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [CMakeFiles/vterm-module.dir/build.make:63: CMakeFiles/vterm-module.dir/vterm-module.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:104: CMakeFiles/vterm-module.dir/all] Error 2
make: *** [Makefile:84: all] Error 2```
Any pointers on how to resolve this will be appreciated!
You should upgrade your libvterm to 0.2
Someone should update the instructions here, then:
OPTIONAL: libvterm (>= 0.1). This library can be found in the official repositories of most distributions (e.g., Arch, Debian, Fedora, Gentoo, openSUSE, Ubuntu). Typical names are libvterm (Arch, Fedora, Gentoo, openSUSE), or libvterm-dev (Debian, Ubuntu). If not available, libvterm will be downloaded during the compilation process. Some distributions (e.g. Ubuntu < 20.04, Debian < 11) have versions of libvterm that are too old. If you find compilation errors related to VTERM_COLOR, you should not use your system libvterm. See FAQ for more details.
I've got Ubuntu 20.04 with libvterm-0.1.2, which should be fine according to the README.
I have this problem too on Ubuntu 18.04. It works when I set vterm to ignore system libvterm for compiling.
(setq vterm-module-cmake-args "-DUSE_SYSTEM_LIBVTERM=Off") ; note that -DUSE_SYSTEM_LIBVTERM=no will not work
this should have be fixed .