X-Spam-Check-By: sourceware.org Message-ID: <1d9535c10612130050i44eb070cl9f93599769b1be75@mail.gmail.com> Date: Wed, 13 Dec 2006 09:50:56 +0100 From: "Domen Vrankar" To: cygwin AT cygwin DOT com Subject: Re: building a cross compiler for linux In-Reply-To: <457EA95C.7010509@aoainc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1d9535c10612120154jc775b1ajbc818c41d7f0ab5d AT mail DOT gmail DOT com> <457EA95C DOT 7010509 AT aoainc DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2006/12/12, Vin Shelton : > Hi Domen, > > Domen Vrankar wrote: > > I'm using this tutorila: http://x.cygwin.com/docs/cg/prog-build-cross.html > > for building a cygwin cross compiler for linux. > > > > I built binutils sucessfully but when trying to build gcc I get: > > > > configure: error: cannot run C compiled programs. > > If you meant to cross compile, use `--host'. > > See `config.log' for more details. > > > > This happens even though I use --host=i686-pc-linux. > > > > Has annyone an idea why this is happening? > > > > I'm using Debian etch, server with two 32 bit pentium processors > > > > I would strongly recommend the use of crosstool for this. See > http://www.kegel.com/crosstool/ for details. > > Here is some advice from > http://www.kegel.com/crosstool/crosstool-0.42/doc/crosstool-howto.html: > > Crosstool, and probably gcc and glibc's configure scripts, assume that > directory names do not contain any spaces. This is often violated on > Windows. Please take care to not use directory names with spaces in them > when running crosstool. It might work, but if it doesn't, you've been > warned. (Same goes for Mac OS X.) > > crosstool creates some really deeply nested directories while building, so > filenames are quite long. This has two consequences: > > First, on some versions of Windows, filenames (including directory) can't be > longer than 240 chars. To avoid exceeding this limit, don't run crosstool in > a directory with a long name. > > Second, the maximum length of commandlines is extremely short. Since > crosstool uses commandlines that include multiple filenames, they can exceed > the limit very quickly. You can avoid this problem by using the "mount" > command's options. e.g. mount /bin and /usr/bin with -X or "-o cygexec" (see > the cygwin faq, and/or mount the crosstool directory with "-o managed" (see > the cygwin doc for "mount"). > > > It's easy to run afoul of either of these two. > > HTH, > Vin Shelton I think I wrote what I want to do the wrong way. I want to build a cross compiler on linux that would output Cygwin executables ( Linux host -> Cygwin target). I tryed crosstool and while building on linux with script demo-cygwin.sh I get: i686-pc-cygwin-ranlib libmingwex.a make[3]: Leaving directory `/storage/domenv/crosstool/crosstool-0.42/build/i686-pc-cygwin/gcc-3.3.2-/build-cygwin/i686-pc-cygwin/winsup/mingw/mingwex' i686-pc-cygwin-dlltool --as i686-pc-cygwin-as --output-def mingwthrd.def mthr.o mthr_init.o i686-pc-cygwin-gcc -Wl,--base-file=mingwthrd.base -B./ -mdll -mno-cygwin -Wl,--image-base,0x6FBC0000 -Wl,--entry,_DllMainCRTStartup AT 12 mthr.o mthr_init.o -Lmingwex \ -o mingwthrd_dummy.exe /storage/domenv/crosstool-cygwin/gcc-3.3.2-/i686-pc-cygwin/lib/gcc-lib/i686-pc-cygwin/3.3.2/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32 collect2: ld returned 1 exit status make[2]: *** [mingwthrd.def] Error 1 make[2]: Leaving directory `/storage/domenv/crosstool/crosstool-0.42/build/i686-pc-cygwin/gcc-3.3.2-/build-cygwin/i686-pc-cygwin/winsup/mingw' make[1]: *** [mingw] Error 1 make[1]: Leaving directory `/storage/domenv/crosstool/crosstool-0.42/build/i686-pc-cygwin/gcc-3.3.2-/build-cygwin/i686-pc-cygwin/winsup' make: *** [all-target-winsup] Error 2 I downloaded w32api-3.8-1-src.tar.bz2 package but now I don't know what to do with it. Anny suggestions? r. Domen -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/