From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kai Ruottu To: Michael2.Roth@RSD.rohde-schwarz.com Cc: crossgcc@sourceware.cygnus.com Subject: Re: cross-gcc problem when building libraries for pc-linux Date: Mon, 18 Dec 2000 10:33:00 -0000 Message-id: <3A3BAA2F.D05760B9@luukku.com> References: X-SW-Source: 2000-12/msg00072.html Michael2.Roth@RSD.rohde-schwarz.com wrote: > > perhaps someone can comment on my problem building a cross-GCC: > > I'm trying to make a cygwin hosted GCC generating pc-linux target code (I used > --target=i686-pc-linux-gnu). Building the binutils works fine, the gcc-core > also. Trying the full gcc package results in the following error message > > /usr/local/src/gcc-2.95.2/libiberty/strerror.c:461: conflicting types for > `sys_errlist' > /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/../../../../i686-pc-linux-gnu/include/stdio.h:557: As you can see, the search paths go through the /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/ and as already told by Nathan Knuth, pre-creating this directory is an essential thing for any target stuff to be found... A bug seen with all the sources having the 'relative search path' patches installed, like the Cygwin/Mingw ones. BTW, using the '--with-headers=...' while configuring as the workaround is overkill... I have many times claimed on this list that the plain vanilla gcc-2.95.2 sources use the relative paths, but this seems to be pure bullshit... So it was a surprise for me to look at the Mumit Khan's gcc-2.95.2-1 Win32-patches again when trying to check whether the RedHat EDK sources have them already installed... > previous declaration of `sys_errlist' > make[1]: *** [strerror.o] Error 1 > make: *** [all-target-libiberty] Error 2 The target-stuff checking during configure failed because the stuff was not found... Linux headers and libs have the 'sys_errlist', but when not finding it, the obvious thing is to assume that it doesn't exist... But when building the Makefile has those '-I'-things which make the headers to be found, and the clash happens... > Well, if I ignore these (or similar) messages, install the compiler and then > take the libraries from the target system for linking, everything is working. > However, I would like to know why I cannot build these libraries locally. > Obviously, I took the wrong header files from the target system - but which ones > are correct? The target Linux runs egcs-2.91.66, and I simply took the header > files from /usr/include - perhaps I was wrong? You did the right things but the gcc-2.95.2 sources have bugs and a workaround like using the 'make installdirs' or manually creating the '$prefix/lib/gcc-lib/$target/2.95.2' is needed. I would assume the Cross-GCC FAQ mentioning this issue with gcc-2.95.2, but perhaps it doesn't... Then there are the Cygwin 'gcc-2.95.2-[1234]' sources, which may have some bugs fixed or not... The '-v' (during the build) and '-print-search-dirs' (stand-alone) options used with the resulted 'xgcc' should tell what will be found and where... Cheers, Kai ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com