Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2012 20:46:08 +0000
From:      Chris Rees <crees@FreeBSD.org>
To:        Alexander Yerenkow <yerenkow@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Ports cross-compiling
Message-ID:  <CADLo83-yx8vQy=-V6Q8TjcEo=LCn_533vqrNnTjafUgraF72XQ@mail.gmail.com>
In-Reply-To: <CAPJF9wmWSWgWmpa5wbqHv%2BLhp8WRCg2yBV0x5vP9Lr9OA9cz7A@mail.gmail.com>
References:  <CAPJF9wmWSWgWmpa5wbqHv%2BLhp8WRCg2yBV0x5vP9Lr9OA9cz7A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5 September 2012 07:40, Alexander Yerenkow <yerenkow@gmail.com> wrote:
> Hello all.
> I'm currently trying to make poudriere cross compile some ports for arm
> arch.
> I'm using such command (as example):
>
> env TARGET=arm TARGET_ARCH=armv6 TARGET_CPUARCH=armv6
> PATH=/usr/obj/arm.armv6/usr/src/tmp/usr/bin:${PATH} CONFIGURE_HOST=amd64
> STRIP_CMD=true make PKGNAMESUFFIX=-arm WRKDIRPREFIX=/tmp WITHOUT_CHECKS=yes
> LOCALBASE=/usr/localarm6 -C /usr/ports/A/B package
>
> I have problem:
> 1. When I run this command from chrooted env, all builds fine; configure
> script make check if we cross-compiling, somehow it gets "no" and all goes
> well.
> 2. When this command run by poudriere in jail, all fails as here:
>
> checking whether we are cross compiling... configure: error: in
> `/tmp/usr/ports/devel/pcre/work/pcre-8.31':
> configure: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details
> ===> Script "configure" failed unexpectedly.
>
>
> So, I'd like to propose small changes to ports/Mk/bsd.port.mk
>
> SET_LATE_CONFIGURE_ARGS= \
>
> .....
> if [ ! -z "${CONFIGURE_HOST}" ]; then \
> _LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --host=${CONFIGURE_HOST}" ; \
> fi ; \
> .....
>
>
> And after this, builds going just fine (of course for ports that can be
> cross-built).
>
> Is it possible to accept this? Seems to me non-destructive patch.

Hi Alexander,

Sorry for the late reply.  You're definitely better off discussing
this on ports@-- there has been some work done on cross-building
ports, but it's fairly early days yet; the only real cross that can be
done with much degree of success is i386 on amd64 currently.

Your patch doesn't look destructive, but it could be better integrated
with TARGET_ARCH setting.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-yx8vQy=-V6Q8TjcEo=LCn_533vqrNnTjafUgraF72XQ>