NetBSD-Users archive

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

Re: Emacs 31.0.91's `configure' does not find libgccjit on NetBSD 11



    Date:        Mon, 15 Jun 2026 04:39:21 +0000
    From:        Van Ly <van.ly%SDF.ORG@localhost>
    Message-ID:  <dcso6hczabq.fsf%SDF.ORG@localhost>

This question really should be asked on one of the pkgsrc lists, rather
than netbsd-users I believe.

  | configure is run as follows.  And, NetBSD 11.0_RC4 is the os.

First notice that from your message:

  |   /usr/pkg/gcc14/lib/libgccjit.so

is where the library lives on netbsd (that's where pkgsrc installs it),

Then with:

  |   /local/u/v/src/emacs-31.0.90/configure --srcdir=/local/u/v/src/emacs-31.0.90 --localstatedir=/var --disable-autodepend --with-native-compilation --without-ns --without-xaw3d --x-includes=/usr/X11R7/include --x-libraries=/usr/X11R7/lib --with-x-toolkit=athena --prefix=/usr/pkg --build=x86_64--netbsd --host=x86_64--netbsd --infodir=/usr/pkg/info --mandir=/usr/pkg/man --enable-option-checking=yes 'CFLAGS=-O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libxml2 -I/usr/X11R7/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/ImageMagick-7 -I/usr/pkg/gcc14/include' 'CPPFLAGS=-DTERMINFO -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/libxml2 -I/usr/X11R7/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/ImageMagick-7 -I/usr/pkg/gcc14/include' 'LDFLAGS=-Wl,-R/usr/pkg/gcc14/lib -Wl,-zrelro -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib'

Let's format that so it can be read -- I won't bother sticking a \ at
the end of each line that needs it, imagine it:

	/local/u/v/src/emacs-31.0.90/configure
		--srcdir=/local/u/v/src/emacs-31.0.90
		--localstatedir=/var
		--disable-autodepend
		--with-native-compilation
		--without-ns
		--without-xaw3d
		--x-includes=/usr/X11R7/include
		--x-libraries=/usr/X11R7/lib
		--with-x-toolkit=athena
		--prefix=/usr/pkg
		--build=x86_64--netbsd
		--host=x86_64--netbsd
		--infodir=/usr/pkg/info
		--mandir=/usr/pkg/man
		--enable-option-checking=yes
		'CFLAGS=-O2 -I/usr/pkg/include
			-I/usr/include
			-I/usr/pkg/include/freetype2
			-I/usr/pkg/include/libxml2
			-I/usr/X11R7/include
			-I/usr/pkg/include/glib-2.0
			-I/usr/pkg/include/gio-unix-2.0
			-I/usr/pkg/lib/glib-2.0/include
			-I/usr/pkg/include/harfbuzz
			-I/usr/pkg/include/ImageMagick-7
			-I/usr/pkg/gcc14/include'

OK, /usr/pkg/gcc14/include is in the include list, so
the needed include files can be found.

		'CPPFLAGS=-DTERMINFO
			-I/usr/pkg/include
			-I/usr/include
			-I/usr/pkg/include/freetype2
			-I/usr/pkg/include/libxml2
			-I/usr/X11R7/include
			-I/usr/pkg/include/glib-2.0
			-I/usr/pkg/include/gio-unix-2.0
			-I/usr/pkg/lib/glib-2.0/include
			-I/usr/pkg/include/harfbuzz
			-I/usr/pkg/include/ImageMagick-7
			-I/usr/pkg/gcc14/include'

Also in CPPFLAGS though why it would need to be in both I'm
not sure (but not immediately relevant)

		'LDFLAGS=-Wl,-R/usr/pkg/gcc14/lib
			-Wl,-zrelro
			-L/usr/pkg/lib
			-L/usr/lib
			-Wl,-R/usr/lib
			-Wl,-R/usr/pkg/lib
			-L/usr/X11R7/lib
			-Wl,-R/usr/X11R7/lib'

And there is the problem.   The first line there sets the run time
path (where an executing binary will look for the library at run
time), but nowhere is the linker told to look anywhere in
/usr/pkg/gcc14/lib when it is linking the application.

On some systems, one implies the other, on NetBSD it does not, as
doing that makes cross building much harder.

Hence, library not found.

This is why this is a pkgsrc issue - something needs to cause
a "-L/usr/pkg/gcc14/lib" term to be added in there, but I have
no idea what is supposed to make that happen - maybe upstream
(so a patch might ne needed) maybe the libgccjit package is
broken, its buildlink should be doing that, and isn't, or maybe
this is something you're supposed to do when making the pkgsrc
package for the new version.

I have no idea, ask on a pkgsrc list.   It has nothing at all to
do with netbsd-11 (as distinct from any other version)

kre


Home | Main Index | Thread Index | Old Index