Re: USE_IMAKE on X11_TYPE=native

Thomas Klausner <[email protected]>
Newsgroups gmane.os.netbsd.devel.packages
Message-ID <[email protected]>
On Thu, Feb 12, 2026 at 12:11:59PM +0100, Takahiro Kambe wrote:
> ===> Configuring for jmk-fonts-3.0nb4
> => Checking for portability problems in extracted files
> imake -DUseInstalled -I/usr/X11R7/lib/X11/config
> Imakefile.c:15:2: fatal error: Imake.tmpl: No such file or directory
> compilation terminated.
> /usr/X11R7/bin/imake: Exit code 1.
>   Stop.
> *** Error code 1
> 
> 
> But, disabling use of cwappers makes it success.
> 
> % USE_CWRAPPERS=no make configure
> => Bootstrap dependency digest>=20211023: found digest-20220214
> WARNING: [license.mk] Every package should define a LICENSE.
> => Checksum BLAKE2s OK for jmk-x11-fonts-3.0.tar.gz
> => Checksum SHA512 OK for jmk-x11-fonts-3.0.tar.gz
> ...
> ===> Configuring for jmk-fonts-3.0nb4
> => Checking for portability problems in extracted files
> imake -DUseInstalled -I/usr/X11R7/lib/X11/config
> make Makefiles
> make includes
> make depend

mk/cwrappers.mk has

.if defined(USE_IMAKE) || !empty(USE_TOOLS:Mimake)
CWRAPPERS_TRANSFORM.imake+=     I:${PREFIX}/lib/X11/config:${PREFIX}/lib/X11/config
CWRAPPERS_APPEND.imake+=        ${IMAKEOPTS}
.endif

If I understand this correctly, a previous I: transform forbids any
include directories from passing through, and this allows
${PREFIX}/lib/X11/config to be found by the compiler.

You could try if adding this solves it:

CWRAPPERS_TRANSFORM.imake+=     I:${X11BASE}/lib/X11/config:${X11BASE}/lib/X11/config

(but that is not the commit version of the fix, just for testing).


Also, in mk/buildlink3/bsd.buildlink3.mk there is

# Transform references to ${X11BASE} into ${BUILDLINK_X11_DIR}.
# (do so before transforming references to ${LOCALBASE} unless the
# ${X11BASE} path is contained in ${LOCALBASE}'s path)
#
.if defined(USE_X11) && empty(LOCALBASE:M${X11BASE}*) && ${X11_TYPE} != "modular"
_BLNK_TRANSFORM+=       I:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
_BLNK_TRANSFORM+=       L:${X11BASE}:${_BLNK_MANGLE_DIR.${BUILDLINK_X11_DIR}}
_CWRAPPERS_TRANSFORM+=       I:${X11BASE}:${BUILDLINK_X11_DIR}
_CWRAPPERS_TRANSFORM+=       L:${X11BASE}:${BUILDLINK_X11_DIR}
.endif

I think adding imake to the tools doesn't set USE_X11, so adding an
imake check here would be something else to try.
 Thomas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.