emacs-module.h may be present in several installed versions. Looks like we should install symlink in /usr/include as well. app-emacs/vterm uses a bundled emacs-module.h It better use the system-provided one. It's difficult or impossible to do it reliably in the absence of the symlink. Reproducible: Always I'll attach the patch. In it, I imitate what's written in other eselect-emacs functions but I'm not familiar with the intricacies of eselect so the patch is provided in the hope that it would be useful but the hope is only so strong. This is not a git-formatted patch; I don't observe a live ebuild and the location of the repository is unclear.
Created attachment 728652 [details, diff] (draft) Add symlink to /usr/include
This is a valid issue. The problem is that the upstream emacs-libvterm package has no support for using the system header. The #include statement uses double quotes, and there's no cmake support to specify an include path. We could of course remove the bundled header and specify the path manually, but that feels a little hackish. Maybe one should instead talk to upstream to have proper support for it added? (Then again, they may tell us that nothing is currently broken.)
I think symlink won't hurt anyway, right? Re: vterm, I just patch the #include lines in my ebuild replacing it with <emacs/emacs-module.h>. If emacs-module.h is there on other distros, I'd expect upstream to agree to fix this. I'll ping them.
https://gitweb.gentoo.org/proj/emacs-tools.git/commit/?h=eselect-emacs&id=db0e1f18245abd3288fa76135fc048ec1f495aa4 commit db0e1f18245abd3288fa76135fc048ec1f495aa4 Author: Ulrich Müller <ulm@gentoo.org> Date: Sat Jul 31 19:34:07 2021 +0200 Set symbolic links to C header files * emacs.eselect (set_header_symlinks): New function, set symbolic links to C header files. Bug 805491. (set_symlinks): Call it. (remove_symlinks): Remove symlinks to header files. (HEADERLIST): New variable. Bug: https://bugs.gentoo.org/805491 Reported-by: akater <nuclearspace@gmail.com> Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Please test. app-eselect/eselect-emacs-9999-r2 in emacs overlay.
I'll check the new eselect-emacs release tomorrow. Alas, vterm upstream bundles emacs-module.h because users aren't expected to have header files on their systems at all. This will likely be the case with other module-reliant packages, it seems. However, header patches are common in Gentoo, certainly so in my experience with non-glibc profiles, so I don't find it hackish.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75af653f0b7692860439a9c9bbbebec43705480d commit 75af653f0b7692860439a9c9bbbebec43705480d Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2021-08-02 08:05:01 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2021-08-02 08:06:26 +0000 app-eselect/eselect-emacs: Version bump to 1.19 Bug: https://bugs.gentoo.org/805491 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-eselect/eselect-emacs/Manifest | 1 + .../eselect-emacs/eselect-emacs-1.19.ebuild | 35 ++++++++++++++++++++++ 2 files changed, 36 insertions(+)
(In reply to Ulrich Müller from comment #5) > Please test. app-eselect/eselect-emacs-9999-r2 in emacs overlay. Test with eselect-emacs-1.19 instead (in gentoo tree), it should add the symlink in /usr/include automatically, without the need to execute eselect emacs manually.
The package only arrived today. I tested 25 → 26 → 27 → 28 → 25, that's exhaustive. Works correctly. But I wonder why you didn't symlink the whole directory.
(In reply to akater from comment #9) Thanks for testing. Closing then. > But I wonder why you didn't symlink the whole directory. Emacs' Makefile.in has this: install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA} umask 022 && $(MKDIR_P) "$(DESTDIR)$(includedir)" $(INSTALL_DATA) src/emacs-module.h "$(DESTDIR)$(includedir)/emacs-module.h" includedir is "${prefix}/include" which means the file is installed directly in /usr/include. Programs will expect it there, not in /usr/include/emacs.