tech-pkg archive

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

Re: cross/cross-libtool-base dependency fails when cross-compiling



(Apologies for delay, have been busy at EuroBSDcon!)

> Date: Thu, 14 Sep 2023 13:30:13 -0600
> From: Brook Milligan <brook%nmsu.edu@localhost>
> 
> I am trying to cross-compile the databases/sqlite3 package, which depends on cross/cross-libtool-base.  Trying to build the cross-libtool-base dependency fails with the following:
> 
> checking for armv7--netbsdelf-eabihf-gcc... armv7--netbsdelf-eabihf-gcc
> checking whether the C compiler works... no
> configure: error: in `/pkgsrc/pkgsrc-2023Q2/cross/cross-libtool-base/work/libtool-2.4.7':
> configure: error: C compiler cannot create executables
> See `config.log' for more details
> 
> The cross-libtool-base config.log file (attached) indicates that the compiler in use (armv7--netbsdelf-eabihf-gcc) does not recognized the -m64 option, so the test fails.
> 
> The -m64 option originates in mk/compiler/gcc.mk.  The patch below removes it from the command line and cross-libtool-base builds fine (as does sqlite3).

Can you share your mk.conf?

I suspect the issue is that you're setting ABI=64 unconditionally in
your mk.conf, and that is bleeding into the cross-build settings.

With the patches I'm sitting on (to be committed soon after 2023Q3 is
branched, or at least posted here for preliminary review if they're
not quite ready yet), it'll be easier to separate parameters like that
in native/cross packages.  But for now, if you have any ABI setting in
mk.conf, you'll need to make it conditional on ${USE_CROSS_COMPILE:tl}
== "yes"/"no".


Home | Main Index | Thread Index | Old Index