From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Yegor Yefremov <yegorslists@googlemail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3] package/ncftp: fix cross compilation detection
Date: Mon, 19 Oct 2026 18:57:12 +0200 [thread overview]
Message-ID: <atZL4w36kHKu8Y47@windsurf> (raw)
In-Reply-To: <20261019141801.1653017-1-yegorslists@gmail.com>
On Mon, Oct 19, 2026 at 04:18:01PM +0200, Yegor Yefremov via buildroot wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> ncftp still ships a configure script generated with autoconf 2.13, which
> determines whether it is cross compiling by simply trying to run a
> trivial program built with $CC, instead of looking at --host/--build.
> That heuristic breaks when the build machine is able to execute the
> binaries produced by the cross compiler, which is typically the case
> when building for x86/x86-64 on an x86-64 machine:
>
> checking whether the C compiler (...) is a cross-compiler... no
>
> configure then takes the AC_TRY_RUN path for the remaining tests. Those
> tests link against the target libraries but are executed on the build
> machine, so they fail as soon as more than the bare C library is
> involved. The most visible victim is the curses detection, which links
> the test program against the target libncurses and then runs it:
>
> checking for curses library headers... checking for ncurses.h... yes
> checking for curses.h... yes
> checking for curses library... no
>
> With no curses library, ncftpbookmarks is silently dropped from the
> build and installation later fails with:
>
> install: cannot stat '.../build/ncftp-3.3.0/bin/ncftpbookmarks': No such file or directory
>
> Other checks are mis-detected the same way, e.g. the 64-bit integral
> type checks, which end up breaking the build itself:
>
> checking how to scan a 64-bit integral type... cannot scan
> io_get.c:763:96: error: expected ')' before 'PRINTF_LONG_LONG'
>
> So add a patch making the generated configure script follow what
> autoconf has been doing since 2.50, and consider the build cross
> compilation as soon as --host is given and differs from --build,
> regardless of whether the produced binaries happen to be runnable.
>
> Regenerating configure instead is not an option: the macros in
> autoconf_local/aclocal.m4 rely on autoconf 2.13 internals (AC_LANG used
> as a value, AC_FD_CC, __oline__, ...) and upstream generates configure
> with a patched autoconf 2.13 (see autoconf_local/acgeneral-2.13.m4.patch
> and acspecific-2.13.m4.patch). A modern autoconf fails with:
>
> configure.in:53: error: AC_LANG: unknown language:
>
> This regression was introduced by commit
> f8bc27111531e9607f79121414f61c0c2d5f83c0 ("package/ncftp: bump to
> version 3.2.9"). Before it, a pre-configure hook regenerated configure
> with autoconf precisely because the bundled script "doesn't detect
> cross-compilation correctly". With 3.2.9 that regeneration started to
> fail, so the hook was dropped, which brought the broken detection back.
> That commit left the host-autoconf dependency behind though, so drop it
> now.
>
> The issue is present since 2025.05, and in 2025.02.x since 2025.02.1,
> where the 3.2.9 bump was backported as commit
> 6b0e4d82c31ee04e8a6abb48323252a7cd97c177.
>
> Fixes:
> https://autobuild.buildroot.org/results/ab25f98d7ab8b397e2aa4f87af9cf1d814f3d6cc/
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-10-19 16:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 11:47 [Buildroot] [PATCH] package/ncftp: fix cross compilation detection Yegor Yefremov via buildroot
2026-10-10 17:42 ` Thomas Petazzoni via buildroot
2026-10-18 20:56 ` Thomas Petazzoni via buildroot
2026-10-19 6:01 ` Yegor Yefremov
2026-10-19 6:00 ` [Buildroot] [PATCH v2] " Yegor Yefremov via buildroot
2026-10-19 13:48 ` Thomas Petazzoni via buildroot
2026-10-19 14:18 ` [Buildroot] [PATCH v3] " Yegor Yefremov via buildroot
2026-10-19 16:57 ` Thomas Petazzoni via buildroot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=atZL4w36kHKu8Y47@windsurf \
--to=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yegorslists@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.