tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: editors/emacs29 and gcc14-libjit default option breakage



On Tue, Apr 29, 2025 at 12:21:07AM +0200, Dr. Thomas Orgis wrote:
> Reading a bit on the gcc wiki about this jit thing, I figured out that
> apart from the question which version of libgccjit would fit my
> toolchain, I need such to successfully run the conftest:
> 
> LIBRARY_PATH=/sw/compiler/gcc-13.2.0/lib:/sw/compiler/gcc-13.2.0/lib/gcc/x86_64-pc-linux-gnu/13.2.0:$LIBRARY_PATH ./conftest

To me this looks like a problem in your toolchain. If these files are
needed for libgccjit, aren't they needed for other stuff as well? If
so, shouldn't these paths be in the system-wide ld.so.conf file?

I don't know enough about how they work on Linux though.

> I need LIBRARY_PATH set to locate all internal gcc libraries,
> including crtbeginS.o. I don't need that for any other ordinary build.
> This jit thing is special sauce. The toolchain knows where these files
> are (though RPATH is a different matter, hence PASSHRU_RPATHDIRS is
> needed).

Or perhaps add them in the gccjit package build, if it's really only
needed there.

> I see  two issues. Wait, no: three issues.
> 
> 1. Isn't gccjit something too esoteric to suggest as default for a text
>    editor (at least emacs is in that category, not OS or IDE;-)?

It works fine for me on NetBSD, and is a noticable speedup.  You can
disable it on Linux, but of course I'd prefer if it was fixed there
instead.

> 2. How can one just assume that gcc14-libjit will match the compiler in
>    use? How many platforms have gcc14 in base? The emacs package should
>    then depend on a specific gcc from pkgsrc, shouldn't it? Is
>    gccXX-libjit independent of the base gcc? We got multiple versions
>    of it for a reason, I guess.

It doesn't seem to matter - on my NetBSD system, the base system has
gcc12, and the emacs package uses libgcc14-jit without problems.

> 3. Does this work for anyone, actually? Using system gcc? Using pkgsrc
>    gcc? How?

On NetBSD, yes, from pkgsrc as-is without any changes.

> I'm trying a build with gcc13-libjit instead now. It's the first time I
> deal with this at all. It also failed  due to incomplete LIBRARY_PATH
> setting. I am not sure who would be responsible to set it. Not sure if
> I should include the internal gcc directories in LIBRARY_PATH globally.
> I will probably just disable the option for my builds, anyway, but for
> pkgsrc hygiene, I'd like to have this discussed. 

I guess the libgcc*jit packages need changes for Linux (and perhaps
other operating systems) and I had hoped that people more versed in
their operating systems would take care of that.
 Thomas


Home | Main Index | Thread Index | Old Index