From owner-freebsd-amd64@FreeBSD.ORG Thu Mar 31 13:20:53 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA17616A4CE; Thu, 31 Mar 2005 13:20:53 +0000 (GMT) Received: from neon.webfusion.co.uk (neon.webfusion.co.uk [212.67.202.39]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFA3643D31; Thu, 31 Mar 2005 13:20:52 +0000 (GMT) (envelope-from michael.hopkins@hopkins-research.com) Received: from 83-216-132-201.markch725.adsl.metronet.co.uk ([83.216.132.201] helo=[192.168.0.5]) by neon.webfusion.co.uk with asmtp (Exim 3.36 #1) id 1DGzbP-0008GR-00; Thu, 31 Mar 2005 14:20:51 +0100 User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Thu, 31 Mar 2005 14:20:50 +0100 From: Michael Hopkins To: "freebsd-amd64@freebsd.org" , Message-ID: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Subject: Installing GCC tools for linux cross-compile on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 13:20:53 -0000 Hi all I have been installing a few Linux environments from the ports in the last few days to try and establish a cross-compiler for 32-bit Linux on amd64. I have established that the Redhat 8, SUSE 9.2 and Debian Woody ports install OK. I've been told that Slackware 10 can also be installed manually (see my other post for more details on all of the above). The next step is to get a working set of gcc tools. Unfortunately, the linux_devtools port is broken and so is the gentoo port which I believe would bootstrap itself and then install everything (including gcc tools, I assume) from source. Gentoo was also my preference because portage would seem to be the most port-like way of system maintenance. With the above working Linux environments I seem to have the following options for installing the gcc toolset. 1) binary RPMs 2) tarballs 3) apt-get/dpkg/dselect Although the first two are a bit of a fiddle to carry out that is not a real problem. I have done (1) for the SUSE port, but when I use gcc I get this: cc: installation problem, cannot exec `cc1': No such file or directory make: *** [LD_search.o] Error 1 Checking cc -v gives: Using built-in specs. Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.4 (pre 3.3.5 20040809) So I guess it is looking in all the wrong places for it's libraries. I have tried to alleviate that in the makefile C flags with: CC = /compat/linux/usr/bin/cc -B/usr/compat/linux/usr -B/usr/compat/linux/usr/local -B/usr/compat/linux/lib -B/usr/compat/linux/usr/lib -I/usr/compat/linux/usr/include/g++ But it doesn't change anything. I haven't tried (2) because I couldn't successfully install slackware yet. I'm not clear whether the problem of hard-coded directories mentioned above would be alleviated or not. Maybe someone has already produced a tarball or RPM which contains the gcc tools set up correctly for /compat/linux/? I like (3) - which is probably the default method in Debian - because it is automatic and would handle dependencies, but I am worried that the automatic tools could install stuff all over my / directory rather than inside /compat/linux/ where I want it all to stay. Also not sure whether they would/should store their databases inside /compat/linux or on /. Any thoughts or tips that lead to a safe and effective solution for this much appreciated and a great help to the software development community on FreeBSD who want to target Linux. If I can get it working and learn enough about port makefiles then I could try to automate it and make it available. TIA Michael _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/ _/ _/_/_/ Hopkins Research Ltd _/ _/ _/ _/ _/_/_/_/ _/_/_/ http://www.hopkins-research.com/ _/ _/ _/ _/ _/ _/ _/ _/ 'touch the future' _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/