This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cross-gcc problem when building libraries for pc-linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]