From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Baron Subject: cross-compiling difficulty with on-the-fly gen/build/use paradigm Date: Fri, 17 Aug 2012 20:19:48 +0000 (UTC) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.21]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7HKt9K8030825 for ; Fri, 17 Aug 2012 16:55:09 -0400 Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7HKt7EH021937 for ; Fri, 17 Aug 2012 16:55:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T2TZP-00088G-K3 for linux-audit@redhat.com; Fri, 17 Aug 2012 22:55:03 +0200 Received: from c-76-25-88-54.hsd1.co.comcast.net ([76.25.88.54]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Aug 2012 22:55:03 +0200 Received: from john.baron by c-76-25-88-54.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 17 Aug 2012 22:55:03 +0200 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com I'm having a problem trying to cross-compile audit. The problem is that gen_actiontabs_h is built using the cross-compiler (for ARM), and then it's asked to run on the host (x86_64). [I've seen some discussion of cross- compiling, but this issue hasn't been brought up, AFAICT] make all-recursive make[1]: Entering directory `/src/blah-blah/external-3rdparty/audit' Making all in lib make[2]: Entering directory `/src/blah-blah/external-3rdparty/audit/lib' arm_v5t_le-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -I../auparse -I/include - I/include -L/lib -fPIC -DPIC -D_GNU_SOURCE '-DTABLE_H="actiontab.h"' -g -O2 -MT gen_actiontabs_h-gen_tables.o -MD -MP -MF .deps/gen_actiontabs_h-gen_tables.Tpo -c -o gen_actiontabs_h-gen_tables.o `test -f 'gen_tables.c' || echo './'`gen_tables.c mv -f .deps/gen_actiontabs_h-gen_tables.Tpo .deps/gen_actiontabs_h-gen_tables.Po /bin/sh ../libtool --tag=CC --mode=link arm_v5t_le-gcc -fPIC -DPIC - D_GNU_SOURCE '-DTABLE_H="actiontab.h"' -g -O2 -L/lib -L/lib -o gen_actiontabs_h gen_actiontabs_h-gen_tables.o libtool: link: arm_v5t_le-gcc -fPIC -DPIC -D_GNU_SOURCE - DTABLE_H=\"actiontab.h\" -g -O2 -o gen_actiontabs_h gen_actiontabs_h- gen_tables.o -L/lib ./gen_actiontabs_h --lowercase --i2s --s2i action > actiontabs.h /bin/sh: ./gen_actiontabs_h: cannot execute binary file make[2]: *** [actiontabs.h] Error 126 make[2]: Leaving directory `/src/blah-blah/external-3rdparty/audit/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/src/blah-blah/external-3rdparty/audit' make: *** [all] Error 2 Is there a simple way around this? A complex way, perhaps? Extra points for simple! Thanks - John