From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1REiPF-0004Cr-Rg for garchives@archives.gentoo.org; Fri, 14 Oct 2011 14:06:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B15821C064; Fri, 14 Oct 2011 14:06:20 +0000 (UTC) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by pigeon.gentoo.org (Postfix) with SMTP id 8D54521C028 for ; Fri, 14 Oct 2011 14:04:45 +0000 (UTC) Received: (qmail invoked by alias); 14 Oct 2011 14:04:44 -0000 Received: from g231014246.adsl.alicedsl.de (EHLO toxic.dbnet) [92.231.14.246] by mail.gmx.net (mp048) with SMTP; 14 Oct 2011 16:04:44 +0200 X-Authenticated: #351132 X-Provags-ID: V01U2FsdGVkX19NrvBKi4RNAmlW38xMvWsXFzTFxmlTMHcSmP/8TP AUA8j+f6oK8dkQ Date: Fri, 14 Oct 2011 16:04:37 +0200 From: Jonas de Buhr To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] How to cross compile Perl for ARM? Message-ID: <20111014160437.2371802c@toxic.dbnet> In-Reply-To: References: X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Archives-Salt: X-Archives-Hash: cb03c45a47ca232b25de77e3386e0f3b hi peter! Am Fri, 14 Oct 2011 13:14:51 +0200 schrieb czernitko : > Hello! > I started playing a little bit with cross compilation for ARM > architecture. Using crossdev I created a toolchain for > arm-none-linux-gnueabi tuple. Now I'd like to emerge some more > packages, but perl constantly refuses to emerge and it is needed by > many packages. For example when running > > # arm-none-linux-gnueabi-emerge -av1 perl > > [ebuild N ] dev-lang/perl-5.12.4-r1 > to /usr/arm-none-linux-gnueabi/ USE="berkdb gdbm -build -debug -doc > -ithreads" 0 kB [ebuild N ] app-admin/perl-cleaner-2.10 > to /usr/arm-none-linux-gnueabi/ 0 kB > > it fails right in configure phase. > Relevant logs are attached, except for configure log which I couldn't > find. > > When I've read through > /usr/arm-none-linux-gnueabi/tmp/portage/dev-lang/perl-5.12.4-r1/work/perl-5.12.4/Cross/README > which is aimed to give more instructions for cross compiling, > I've found out that I should run "make patch && make" from Cross > directory. Unfortunately, I've got no clue how to combine that with > the whole emerge process? there is probably a better way to do this, but it should be possible to make a local overlay and modify the ebuild's src_compile to do emake in the Cross directory. http://devmanual.gentoo.org/ebuild-writing/index.html > I know I could compile it by hand, but then > portage would not know that perl is already installed and it would > try to install it anyway... there are some ways around that, but its still ugly. a lot of the things you are finding out now might be *very* interesting to me in a few months, i am also planning a small project that might include cross compiling to arm. are you documenting your progress somewhere? can you please point me to the documents that helped you put together the cross compilation toolchain? from looking at build.log: > Checking your choice of C compiler and flags for coherency... > I've tried to compile and run the following simple program: > > #include > int main() { printf("Ok\n"); return(0); } > > I used the command: > > arm-none-linux-gnueabi-gcc -o try -O2 -pipe > -fomit-frame-pointer -I/usr/arm-none-linux-gnueabi/usr/include/ > -I/usr/arm-none-linux-gnueabi/include/ -DOVR_DBL_DIG=14 > -L/usr/arm-none-linux-gnueabi/lib > -L/usr/arm-none-linux-gnueabi/usr/lib -L/usr/local/lib try.c -lnsl > -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat ./try > > and I got the following output: > > /bin/sh: ./try: cannot execute binary file > The program compiled OK, but exited with status 126. that actually sounds like it successfully cross-compiled try.c, but *of course* it does not run on your host platform! that check is probably omitted in Cross/Makefile which might why they are telling you to run that one. > > Any help would be highly appreciated! > Peter