From owner-freebsd-questions@FreeBSD.ORG Wed Jul 30 04:07:51 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 568BD1065675 for ; Wed, 30 Jul 2008 04:07:51 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1B88FC1D for ; Wed, 30 Jul 2008 04:07:50 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.2) with ESMTP id m6U47nEi043829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 29 Jul 2008 23:07:49 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.2/Submit) id m6U47mlr043827; Tue, 29 Jul 2008 23:07:48 -0500 (CDT) (envelope-from dan) Date: Tue, 29 Jul 2008 23:07:48 -0500 From: Dan Nelson To: Wyatt Neal Message-ID: <20080730040748.GD38660@dan.emsphone.com> References: <437096a00807291747k4f524f78h148ecd88704060ad@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437096a00807291747k4f524f78h148ecd88704060ad@mail.gmail.com> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: difficulty building a cross-compiler with a fresh install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2008 04:07:51 -0000 In the last episode (Jul 29), Wyatt Neal said: > i've been running with a freebsd 6.1 system for a few days and i'm > having some oddities when trying to build a cross compiler on the > system. > > the first issue that shows is: > > In file included from archive.c:132: > sysdep.h:173:21: libintl.h: No such file or directory > > this comes from the libintl.h being located in /usr/local/include > instead of /usr/include. a simple modification to the CFLAGS as so: > > export CFLAGS="-I /usr/local/include" > > has resolved binutils building correctly. a build of gcc shows the > same issue; however, gcc fails to build with the following error: > > gcc -c -I /usr/local/include -DIN_GCC -DCROSS_COMPILE -W -Wall > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic > -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I. -I./. -I./../include > ./config/i386/i386.c -o i386.o > ./config/i386/i386.c:1033: error: `ix86_svr3_asm_out_constructor' undeclared here (not in a function) > ./config/i386/i386.c:1033: error: initializer element is not constant > ./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out.constructor') > ./config/i386/i386.c:1033: error: initializer element is not constant > ./config/i386/i386.c:1033: error: (near initialization for `targetm.asm_out') > ./config/i386/i386.c:1033: error: initializer element is not constant > ./config/i386/i386.c:1033: error: (near initialization for `targetm.sched') > ./config/i386/i386.c:1033: error: initializer element is not constant > ./config/i386/i386.c:1033: error: (near initialization for `targetm.calls') > ./config/i386/i386.c: In function `ix86_file_end': > ./config/i386/i386.c:4839: warning: implicit declaration of function `ASM_DECLARE_FUNCTION_NAME' > gmake[1]: *** [i386.o] Error 1 > > both binutils and gcc are being built from the source from > ftp.gnu.org following along with > http://docs.freebsd.org/info/gcc/gcc.info.Cross-Compiler.html > > i've not encountered this error before on the various linux systems > so i'm assuming it's something that i'm doing with being new to > freebsd. i've been able to compile the above code on my ubuntu system > without issue as well so i'm fairly certain it's something i'm > screwing up on freebsd. > > bintuils 2.18 config string: > ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local > > gcc 3.4.4 config string: > ./configure --target=i386v --program-prefix=i386v- --prefix=/usr/local > --program-suffix="" > > thoughts? Take a look at the devel/cross-binutils and devel/cross-gcc ports. The cross-gcc port is at 4.2.3, so you may have to just copy what it does and build gcc-3.4.4 manually. -- Dan Nelson dnelson@allantgroup.com