This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: Building linux cross cygwin with net release source?


On Fri, 14 Apr 2000, Mumit Khan wrote:

> DJ Delorie <dj@delorie.com> writes:
> > 
> > > that file in the new net release. What src tar file do I
> > > need to grab and build?
> > 
> > You need cygwin, to get newlib, winsup, etc.  Or just install the
> > cygwin binary package somewhere; it has all the headers and libraries.
> > 
> > You'll next need binutils and gcc, as usual.
> > 
> > Plus, there's a howto online, but you may need to adjust it
> > for the updated sources:
> > 
> > http://www.delorie.com/howto/cygwin/cygwin-cross-howto.html
> 
> Thanks for pointing this out! This of course becomes much simpler
> now that we have a reasonable set of easily available sources
> with upcoming net release. I'll update the docs as soon as the
> release is out.
> 
> Regards,
> Mumit


Following DJ's advice, I grabbed the cygwin usr/i686-pc-cygwin/include
from my cygwin distro and put them in the install dir (the --prefix
option).

Now I am able to get a little farther in the gcc cross build process.
It hums along until in i586-cygwin32/libiberty and i586-cygwin32/libio.
Here is the important output written when I run the make command in
the root of the gcc cross build directory. (comments make by me
are inside of the !!!!! .... !!!!! blocks)



...
/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-I/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/include
-DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  libgcc1-test.o -o
libgcc1-test \
  -nostartfiles -nostdlib `/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-I/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/include
--print-libgcc-file-name`
make[1]: Leaving directory
`/abomination/figment/mdejong/cygwin/build/Xcygwin/gcc/gcc'
Configuring in i586-cygwin32/libiberty
loading cache ./config.cache
checking host system type... i586-pc-cygwin32
checking build system type... i686-pc-linux-gnu
checking for i586-cygwin32-ar... i586-cygwin32-ar
checking for i586-cygwin32-ranlib... i586-cygwin32-ranlib
checking for gcc... /home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
checking whether we are using GNU C... yes
checking whether /home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... /usr/bin/install -c
xhost-mkfrag is unchanged
checking how to run the C preprocessor... /lib/cpp
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking whether the C compiler
(/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot
create executables.


!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Note how the reconfigure fails inside i586-cygwin32/libiberty, the
i586-cygwin32/libiberty/config.log file has a bunch of errors saying
"cant find assert.h" and then it pukes out without creating a
Makefile and with this error:

configure:1749: checking whether the C compiler
(/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-g -O2 ) works
configure:1765: /home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-o conftest -g -O2   conftest.c  1>&5
/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/ld:
cannot open crt0.o: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:

#line 1760 "configure"
#include "confdefs.h"

main(){return(0);}


It seems fairly clear that I am doing something wrong, but
what? The autoconf stuff seems to offer less than useful
help in finding out what the problem is. The gcc make
commands also seems to keep running even if a reconf that
it kicked off fails.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


make[1]: Entering directory
`/abomination/figment/mdejong/cygwin/build/Xcygwin/gcc/i586-cygwin32/libio'
rootme=`pwd`/ ; export rootme; \
CC="/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-I. -I/home/mdejong/cygwin/src/gcc-2.95.2/libio
-I/home/mdejong/cygwin/src/gcc-2.95.2/libio/../winsup/include"; export CC;
\
CXX="/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-I. -I/home/mdejong/cygwin/src/gcc-2.95.2/libio
-I/home/mdejong/cygwin/src/gcc-2.95.2/libio/../winsup/include -nostdinc++
-nostdinc++ -g -O2"; export CXX; \
CONFIG_NM="i586-cygwin32-nm"; export CONFIG_NM; \
/bin/sh /home/mdejong/cygwin/src/gcc-2.95.2/libio/gen-params
LIB_VERSION=2.8.0  >tmp-params.h
dummy.c:1: sys/types.h: No such file or directory
dummy.c:8: stdio.h: No such file or directory
dummy.c:9: time.h: No such file or directory
dummy.c:10: signal.h: No such file or directory
In file included from
/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/include/syslimits.h:7,
                 from
/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/include/limits.h:11,
                 from dummy.c:12:
/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/include/limits.h:117: No
include path in which to find limits.h
gen-params: could not invoke
/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/xgcc
-B/home/mdejong/cygwin/build/Xcygwin/gcc/gcc/
-B/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/bin/
-I. -I/home/mdejong/cygwin/src/gcc-2.95.2/libio
-I/home/mdejong/cygwin/src/gcc-2.95.2/libio/../winsup/include -E on
dummy.c
make[1]: *** [_G_config.h] Error 1
make[1]: Leaving directory
`/abomination/figment/mdejong/cygwin/build/Xcygwin/gcc/i586-cygwin32/libio'
make: *** [all-target-libio] Error 2



!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Note here how the CC="..." line does not add any kind a
-I/abomination/figment/mdejong/cygwin/install/Xcygwin/i586-cygwin32/include
line. If I go into the Makefile and add this -I flag by hand
the dummy.c program will compile. This is odd because the
above example that launched ./config.status in the
i586-cygwin32/libiberty build directory did pass this
-I option. Am I just doing something really stupid
here or is something wrong with the cross build scripts?

And another thing, why do I need to go and add the
/abomination/figment/mdejong/cygwin/install/Xcygwin/bin directory
to my PATH by hand before cross compiling gcc? Why don't
the cross build scripts just look for the cross binutil
programs in ${prefix}/bin? If the cross bin util programs
are not found in ${prefix}/bin and they can not be found
anywhere else on the path, an error should be generated
by configure. Currently, gcc's configure does neither
of these checks so you do not see an error until much later
while running the make.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

thanks
Mo DeJong
Red Hat Inc.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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