Date: Thu, 31 Mar 2005 09:11:04 -0800 From: Astrodog <astrodog@gmail.com> To: Michael Hopkins <michael.hopkins@hopkins-research.com> Cc: freebsd-amd64@freebsd.org Subject: Re: Installing GCC tools for linux cross-compile on amd64 Message-ID: <2fd864e0503310911663c460b@mail.gmail.com> In-Reply-To: <BE71B7C2.36B88%michael.hopkins@hopkins-research.com> References: <BE71B7C2.36B88%michael.hopkins@hopkins-research.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 31 Mar 2005 14:20:50 +0100, Michael Hopkins <michael.hopkins@hopkins-research.com> wrote: > > > 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 I suspect an RPM gcc install would work, just make sure you use the RPM with the /compat/linux RPM. If it just can't find the cc1 thing, you may try symlinking in compat linux cc -> cc1. I'll see if I can get anything done on this today, I have 2 AMD64 machines I'd kinda like to be able to compile Linux32 on. I also want to test cross-compiling FreeBSD IA32 ports to i386 from AMD64, I'll let you know how that goes as well. (Sending to freebsd-amd64 only, since this seems to be a very specific issue.)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2fd864e0503310911663c460b>