This is the mail archive of the crossgcc@sourceware.org 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]
Other format: [Raw text]

Re: [CT_NG] build fixes for glibc-2.3.6 and old systems


Heelo Yann,

sorry for the long delay. I found some time this morning for a new test and
noticed you had released 1.1.1 which includes the patch your asked me to
test.

On Sun, May 11, 2008 at 09:05:03AM +0200, Yann E. MORIN wrote:
> On Saturday 10 May 2008 15:55:54 Willy Tarreau wrote:
> > First, I noticed that some erroneous links were created early in the
> > build process due to this code :
> [--SNIP--]
> > It causes such broken links for non-existing tools, because "which" returns
> > an error message which is part of the link target :
> [--SNIP--]
> 
> I see. Could you please send me the result of:
> $ which non_existing_binary
> $ echo $?

$ which non_existing_binary
which: no non_existing_binary in (/var/flx-toolchain/i586-flx-linux/tool-i686-host-linux/usr/bin:/usr/local/qt/bin:/usr/local/linuxprinter/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/games:.:/opt/kde/bin:/usr/share/texmf/bin:/opt/mysql/bin:/opt/mysql/sbin:/opt/palinux/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin)
$ echo $?
1

I also see the same thing in build-libc-headers/config.log :

CC='which: no i586-cross-linux-gnu-gcc in (/cross/i586-gcc346-lib236/bin:/usr/src/crosstool/crosstool-ng-1.1.1/targets/i586-cross-linux-gnu/build/gcc-core-shared/bin:/usr/src/crosstool/crosstool-ng-1.1.1/targets/i586-cross-linux-gnu/build/gcc-core-static/bin:/var/flx-toolchain/i586-flx-linux/tool-i686-host-linux/usr/bin:/usr/local/qt/bin:/usr/local/linuxprinter/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/games:.:/opt/kde/bin:/usr/share/texmf/bin:/opt/mysql/bin:/opt/mysql/sbin:/opt/palinux/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin)'


> > Also, ${CT_BUILD}-gcc points to the wrong gcc (/usr/bin/gcc) instead of
> > $CT_CC_NATIVE. Mine (2.95) cannot build glibc-2.3.6 while the gcc-3.3
> > I have in CT_CC_NATIVE can.
> 
> Arggh... In fact CT_CC_NATIVE was never really tested. Sighh... :-( It was
> working once, I remember, but that must has been loooong ago... I will have to
> rework this.

seems better now in 1.1.1.

> > I noticed that binutils builds using "gcc" instead of the $CT_CC_NATIVE.
> > I did not find how to fix it in the makefile or scripts, so I temporarily
> > moved my /usr/bin/gcc symlink to gcc-3.3.
> 
> Tsss. binutils strike again! :-)

It *seems* to me that in my toolchain I don't have this problem. I'm used to
build binutils that way :

        mkdir -p $(BINUTILS_BDIR)
        (cd $(BINUTILS_BDIR) && CC=$(HOSTCC) $(BINUTILS_SDIR)/configure \
           --host=$(HOST) --target=$(TARGET) --prefix=$(TOOL_PREFIX) \
           --with-sysroot=$(SYS_ROOT) \
           --with-lib-path="$(TOOL_PREFIX)/$(TARGET)-linux/lib:$(ROOTDIR)/lib:$(ROOT_PREFIX)/lib" \
           --disable-shared --disable-locale --disable-nls \
        )

Unfortunately, I don't have the build logs anymore so I cannot check that
I don't have the same problem here.

> > When installing libc headers, the wrong compiler is used (CT_TARGET)
> > instead of CT_BUILD, resulting in the headers not being built :
> 
> No, CT_TARGET _is_ to be used! The compiler gets target-specific arguments,
> so it has to be a cross-compiler.

Yes sorry, now that you're saying it, you're right of course. In my toolchain,
I'm used to build a first-stage gcc for this purpose.

> > [ALL  ]    checking for i386-cross-linux-gnu-gcc... which: no i386-cross-linux-gnu-gcc in
> > (/cross/i386-cross-linux-gnu/bin:/usr/src/crosstool/gcc-3.4.6-glibc-2.3.6/targets/i386-cross-linux-gnu/build/gcc-core-shared/bin:
> [--SNIP--]
> 
> Could you please have a look at what is in those two directories (split on
> two lines to avoid long lines):
> /usr/src/crosstool/gcc-3.4.6-glibc-2.3.6/targets/...
> .../i386-cross-linux-gnu/build/gcc-core-shared/bin
> 
> and in:
> /usr/src/crosstool/gcc-3.4.6-glibc-2.3.6/targets/...
> .../i386-cross-linux-gnu/build/gcc-core-static/bin

yes, here they are. There's no gcc there :-(


willy@pcw:crosstool-ng-1.1.1$ ll targets/i586-cross-linux-gnu/build/gcc-core-shared/i586-cross-linux-gnu/bin/
total 0
drwxr-xr-x  2 willy users 144 May 20 06:19 ./
drwxr-xr-x  3 willy users  72 May 20 06:19 ../
lrwxrwxrwx  1 willy users  53 May 20 06:19 ar -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-ar*
lrwxrwxrwx  1 willy users  53 May 20 06:19 as -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-as*
lrwxrwxrwx  1 willy users  53 May 20 06:19 ld -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-ld*
lrwxrwxrwx  1 willy users  56 May 20 06:19 strip -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-strip*
willy@pcw:crosstool-ng-1.1.1$ ll targets/i586-cross-linux-gnu/build/gcc-core-static/i586-cross-linux-gnu/bin/
total 0
drwxr-xr-x  2 willy users 144 May 20 06:19 ./
drwxr-xr-x  3 willy users  72 May 20 06:19 ../
lrwxrwxrwx  1 willy users  53 May 20 06:19 ar -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-ar*
lrwxrwxrwx  1 willy users  53 May 20 06:19 as -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-as*
lrwxrwxrwx  1 willy users  53 May 20 06:19 ld -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-ld*
lrwxrwxrwx  1 willy users  56 May 20 06:19 strip -> /cross/i586-gcc346-lib236/bin/i586-cross-linux-gnu-strip*

It may be a makefile dependency issue, because I notice that gcc has not
been built yet before libc-headers are built. The following order is observed
in build.log :
  - tar x
  - patch
  - install kernel headers
  - build binutils
  - build libc-headers => fail

It's clear to me that a cc_core build is missing before libc-headers. I have
saved the build.log if you want it.

I tried to force the build to restart with gcc, but I got an error, maybe
I'm not using it correctly :

willy@pcw:crosstool-ng-1.1.1$ ./ct-ng cc_core_pass_1  
[INFO ]  Build started 20080520.065646
[INFO ]  Checking environment sanity
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[ERROR]  The previous build did not reach the point where it could be restarted at "cc_core_pass_1"
[00:00] / make[1]: *** [build] Error 1
make: *** [cc_core_pass_1] Error 2

> This works for you because your target is of the same kind as your build
> machine. You should have had a cross-compiler at this step... Could send
> me your full build.log (compressed)?

Yes, I'm sending it to you in a second mail in order not to pollute the list.

Regards,
Willy


--
For unsubscribe information see http://sourceware.org/lists.html#faq


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