From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Cross-compilation from armhf to mips64el Date: Tue, 06 Oct 2015 21:45:35 +0200 Message-ID: <87pp0rbx28.fsf@gnu.org> References: <20151005190838.GA5006@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjYBB-0000Jp-Hz for guix-devel@gnu.org; Tue, 06 Oct 2015 15:45:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjYB8-00025A-Kp for guix-devel@gnu.org; Tue, 06 Oct 2015 15:45:41 -0400 In-Reply-To: <20151005190838.GA5006@debian> (Andreas Enge's message of "Mon, 5 Oct 2015 21:08:38 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andreas Enge Cc: guix-devel@gnu.org Andreas Enge skribis: > currently, we get lots of failed jobs for armhf coming from cross-compila= tion, > such as > http://hydra.gnu.org/job/gnu/master/mips64el-linux-gnu.grep-2.21.armhf= -linux The problem in question is this: --8<---------------cut here---------------start------------->8--- gcc -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include /tmp/nix-bui= ld-glibc-cross-mips64el-linux-gnu-2.22.drv-0/build/config.h rpc_main.c \ -o /tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.22.drv-0/build/sunrpc/c= ross-rpc_main.o -MMD -MP -MF /tmp/nix-build-glibc-cross-mips64el-linux-gnu-= 2.22.drv-0/build/sunrpc/cross-rpc_main.o.dt -MT /tmp/nix-build-glibc-cross-= mips64el-linux-gnu-2.22.drv-0/build/sunrpc/cross-rpc_main.o -c In file included from /gnu/store/j3rpssxbamdarpqxsljxi9r28hl3zhzm-glibc-2.2= 2/include/signal.h:326:0, from /gnu/store/j3rpssxbamdarpqxsljxi9r28hl3zhzm-glibc-2.2= 2/include/sys/param.h:28, from rpc_main.c:45: /gnu/store/j3rpssxbamdarpqxsljxi9r28hl3zhzm-glibc-2.22/include/sys/ucontext= .h:107:16: error: field ?uc_mcontext? has incomplete type mcontext_t uc_mcontext; ^ Makefile:165: recipe for target '/tmp/nix-build-glibc-cross-mips64el-linux-= gnu-2.22.drv-0/build/sunrpc/cross-rpc_main.o' failed --8<---------------cut here---------------end--------------->8--- Before disabling cross-builds from armhf to mips64el like you suggest, we should check whether the problem is on our side or note. Here this is a cross-build of libc where we=E2=80=99re building a cross-rpc= gen. The cross-rpcgen is natively compiled, so GCC must have the native (arm) kernel and libc headers in CPATH, not the mips headers. I checked /gnu/store/j3rpssxbamdarpqxsljxi9r28hl3zhzm-glibc-2.22/include/sys/ucontext= .h and I confirm that it=E2=80=99s an ARM header. Long story short: everything is alright. :-) > I would think that the problem comes from build-aux/hydra/guix.scm, in th= is > function: > (define (from-32-to-64? target) > ;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack > ;; prevents known-to-fail cross-builds from i686-linux or armhf-lin= ux to > ;; mips64el-linux-gnuabi64. > (and (or (string-prefix? "i686-" system) > (string-prefix? "armhf-" system)) > (string-suffix? "64" target))) > since target seems to be mips64el-linux-gnu and not mips64el-linux-gnuabi= 64. > Then I would replace "string-suffix?" by "string-contains". Or should we define a black list of pairs? Ludo=E2=80=99.