Re: git: dc67e7d3009d - main - lang/gcc11: Fix conflict on libgccjit.h and libgccjig++.h

From: Lorenzo Salvadore <developer_at_lorenzosalvadore.it>
Date: Fri, 04 Nov 2022 21:33:32 UTC
------- Original Message -------
On Friday, November 4th, 2022 at 4:40 PM, Lorenzo Salvadore <developer@lorenzosalvadore.it> wrote:


> 
> 
> ------- Original Message -------
> On Friday, November 4th, 2022 at 3:03 AM, Yasuhiro Kimura yasu@FreeBSD.org wrote:
> 
> 
> 
> > From: Lorenzo Salvadore salvadore@FreeBSD.org
> > 
> > Subject: git: dc67e7d3009d - main - lang/gcc11: Fix conflict on libgccjit.h and libgccjig++.h
> > Date: Thu, 3 Nov 2022 12:29:50 GMT
> > 
> > > The branch main has been updated by salvadore:
> > > 
> > > URL: https://cgit.FreeBSD.org/ports/commit/?id=dc67e7d3009de2b78d96136c8ad09cf186e553df
> > > 
> > > commit dc67e7d3009de2b78d96136c8ad09cf186e553df
> > > Author: Lorenzo Salvadore salvadore@FreeBSD.org
> > > AuthorDate: 2022-11-02 22:24:57 +0000
> > > Commit: Lorenzo Salvadore salvadore@FreeBSD.org
> > > CommitDate: 2022-11-03 12:29:06 +0000
> > > 
> > > lang/gcc11: Fix conflict on libgccjit.h and libgccjig++.h
> > > 
> > > GCC 11, GCC 12 and GCC 13 install libgccjit.h and libgccjit++.h in the
> > > same directory.
> > > 
> > > Fix conflict for GCC 11, which is GCC_DEFAULT, by installing those files
> > > in a directory specific to GCC 11.
> > > 
> > > PR: 257060
> > > Reported by: Ting-Wei Lan lantw44@gmail.com
> > > Reviewed by: gerald, dim
> > > Differential Revision: https://reviews.freebsd.org/D37242
> > > See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101491
> > 
> > After this commit build of editors/emacs-devel fails as configure
> > script fails to detect libgccjit.h as following.
> > 
> > ----------------------------------------------------------------------
> > checking for dlopen... (cached) yes
> > checking for dladdr... yes
> > checking for dlfunc... yes
> > checking for gcc_jit_context_acquire in -lgccjit... yes
> > checking for libgccjit.h... no
> > configure: error: ELisp native compiler was requested, but libgccjit header files were
> > not found.
> > Please try installing libgccjit-dev or a similar package.
> > If you are sure you want Emacs be compiled without ELisp native compiler,
> > pass the --without-native-compilation option to configure.
> > ===> Script "configure" failed unexpectedly.
> > 
> > Please report the problem to emacs@FreeBSD.org [maintainer] and attach the
> > "/wrkdirs/usr/ports/editors/emacs-devel/work-nox/emacs-a691e811/config.log"
> > including the output of the failure of your make command. Also, it might be
> > a good idea to provide an overview of all packages installed on your system
> > (e.g. a /usr/local/sbin/pkg-static info -g -Ea).
> > *** Error code 1
> > 
> > Stop.
> > make: stopped in /usr/ports/editors/emacs-devel
> > ----------------------------------------------------------------------
> > 
> > According to the output of `pkg info -l gcc11-11.3.0_3` on
> > 13.1-RELEASE amd64, both libgccjit.h and libgccjit++.h are installed
> > in /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd13.1/include. But
> > should they be installed in
> > /usr/local/lib/gcc11/gcc/x86_64-portbld-freebsd13.1/11.3.0/include?
> 
> 
> I have fixed the patch, but emacs still fails to find the header, so
> instead of committing the fix I have put it in Phabricator for review
> and improvements:
> 
> https://reviews.freebsd.org/D37266
> 
> As I suggest in the review, it might be better to change the emacs port
> so that they search the header in the right directory, but if this is
> not possible we can search for a better solution (or revert the
> commit that broke emacs, if finding such a solution takes too much
> time).
> 
> Cheers,
> 
> Lorenzo Salvadore

Fixing the commit does not seem to be a straight forward task, so I have
reverted it for now:

https://cgit.freebsd.org/ports/commit/?id=9f0cd13014d0962aedfa016c86a5af07ca3ba814

Cheers,

Lorenzo Salvadore