[#7101] Toolchain build fails while building uClibc

Document created by Aaronwu Employee on Oct 17, 2013
Version 1Show Document
  • View in full screen mode

[#7101] Toolchain build fails while building uClibc

Submitted By: Timur Aydin

Open Date

2012-05-07 08:26:38     Close Date

2012-05-10 10:12:06

Priority:

Medium     Assignee:

Nobody

Board:

N/A     Silicon Revision:

Resolution:

Upstream     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

Gentoo Linux (~x86 testing)

toolchain rev.:

2011R1     kernel rev.:

2011R1

State:

Closed     Found In Release:

N/A

Is this bug repeatable?:

N/A     

Summary: Toolchain build fails while building uClibc

Details:

 

Doing a clean build of the 2011R1 toolchain fails while building uClibc. Here is the terminal output:

 

*** bfin-uclinux: binutils: configuring (2.21)              07 May 2012 15:39:08

*** bfin-uclinux: binutils: building                        07 May 2012 15:39:09

*** bfin-uclinux: gdb: configuring (2.17)                   07 May 2012 15:39:34

*** bfin-uclinux: gdb: building                             07 May 2012 15:39:35

*** bfin-uclinux: binutils: installing                      07 May 2012 15:40:28

*** bfin-uclinux: gdb: installing                           07 May 2012 15:40:32

*** bfin-uclinux: elf2flt: configuring                      07 May 2012 15:40:40

*** bfin-uclinux: elf2flt: building                         07 May 2012 15:40:41

*** bfin-uclinux: elf2flt: installing                       07 May 2012 15:40:42

*** bfin-uclinux: linux-headers: configuring (3.0.8)        07 May 2012 15:40:42

*** bfin-uclinux: linux-headers: installing                 07 May 2012 15:40:44

*** bfin-uclinux: uClibc: installing headers (0.9.29)       07 May 2012 15:40:44

*** bfin-uclinux: gcc: linking external packages            07 May 2012 15:40:45

*** bfin-uclinux: gcc: linking gmp (4.3.2)                  07 May 2012 15:40:45

*** bfin-uclinux: gcc: linking mpfr (2.4.2)                 07 May 2012 15:40:45

*** bfin-uclinux: gcc: linking mpc (0.9)                    07 May 2012 15:40:45

*** bfin-uclinux: gcc: configuring (4.3.5/bare)             07 May 2012 15:40:45

*** bfin-uclinux: gcc: building                             07 May 2012 15:40:47

*** bfin-uclinux: gcc: installing                           07 May 2012 15:42:13

*** bfin-uclinux: uClibc: checking CFLAGS -g -O2            07 May 2012 15:42:15

*** bfin-uclinux: uClibc: configuring for .                 07 May 2012 15:42:15

*** bfin-uclinux: uClibc: cleaning                          07 May 2012 15:42:15

 

Backtrace:  (most recent call is first)

   #0: File: funcs.sh               Line:  168   Function: die_with_log

       Args:

   #1: File: BuildToolChain         Line: 1181   Function: run_cmd

       Args: 'make' 'V=1' 'distclean'

   #2: File: BuildToolChain         Line: 1336   Function: build_uclibc_core

       Args: 'bfin-uclinux' '/home/ta/uclinux_2011R1/toolchain/bfin-uclinux/runtime' '.config-used-for_.' '' '.'

   #3: File: BuildToolChain         Line: 1616   Function: build_uclibc

       Args: 'uclinux' '/home/ta/uclinux_2011R1/toolchain/bfin-uclinux/runtime' '/home/ta/uclinux_2011R1/toolchain'

 

Please report an error to http://blackfin.uclinux.org/gf/project/toolchain

Build error at Mon May  7 15:42:16 EEST 2012

  occurred 3m8s into script

When reporting issue, we may ask for /home/ta/uclinux_2011R1/tcbuild/logs/config.logs.tbz2

Since the build was done in parallel, I'm not sure where the error

happened.  The best thing to do is re-run the BuildToolChain script

with the '-j 1' option.  The full log can be found here:

/home/ta/uclinux_2011R1/tcbuild/logs/log

 

Follow-ups

 

--- Timur Aydin                                              2012-05-07 09:25:44

Here is the tail of the build log:

 

#

# configuration written to .config

#

###

cp .config .config-used-for_.

 

###

touch .config

 

###

bfin-uclinux: uClibc: cleaning

 

###

make V=1 distclean

 

rm -f -r lib include/bits

rm -f ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \

    libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \

    libutil/*.a lib/*.a \

    include/fpu_control.h include/dl-osinfo.h include/hp-timing.h

make objclean-y headers_clean-y

rm -f ./libcrypt/*.{o,os,oS,a}

rm -f ./libintl/*.{o,os,a}

rm -f ./libm/{,*/,*/*/}*.{o,os,oS,a}

rm -f ./libnsl/*.{o,os,a}

rm -f ./libresolv/*.{o,os,a}

rm -f ./libutil/*.{o,os,oS,a}

rm -f ./libpthread/linuxthreads.old/*.{o,os,oS,a}

rm -f ./libpthread/linuxthreads.old_db/*.{o,os,oS,a}

rm -f ./librt/*.{o,os,a}

rm -f ./ldso/ldso/*.{o,os,oS,a} ./ldso/ldso/*/*.{o,os,oS}

rm -f ./ldso/libdl/*.{o,os,a,oS}

rm -f ./extra/locale/gen_collate ./extra/locale/gen_wc8bit

./extra/locale/gen_wctype ./extra/locale/locale_data.c

./extra/locale/{*.{o,os,txt},gen_locale,gen_ldc}

rm -f ./libc/sysdeps/linux/bfin/*.{o,os} ./lib/crti.o ./lib/crtn.o

./lib/crt1.o

rm -f ./libc/sysdeps/linux/common/*.{o,os,oS}

rm -f

./extra/locale/{uClibc_locale_data,lt_defines,c8tables,wctables,locale_tables,locale_collate}.h

rm -f ./libc/misc/assert/*.{o,os}

rm -f ./libc/misc/ctype/*.{o,os}

rm -f ./libc/misc/dirent/*.{o,os}

rm -f ./libc/misc/error/*.{o,os}

rm -f ./libc/misc/file/*.{o,os,oS}

rm -f ./extra/locale/{lmmtolso,gen_mmap,locale.mmap}

rm -f ./libc/misc/fnmatch/*.{o,os}

rm -f ./libc/misc/ftw/*.{o,os}

rm -f ./libc/misc/glob/*.{o,os}

rm -f ./libc/misc/gnu/*.{o,os}

rm -f ./libc/misc/internals/*.{o,os,oS}

rm -f ./libc/misc/locale/*.{o,os}

rm -f ./libc/misc/mntent/*.{o,os}

rm -f ./libc/misc/regex/*.{o,os}

rm -f ./libc/misc/search/*.{o,os}

rm -f ./libc/misc/statfs/*.{o,os,oS}

rm -f ./libc/misc/syslog/*.{o,os}

rm -f ./libc/misc/sysvipc/*.{o,os}

rm -f ./libc/misc/time/*.{o,os}

rm -f ./libc/misc/ttyent/*.{o,os}

rm -f ./libc/misc/utmp/*.{o,os}

rm -f ./libc/misc/wchar/*.{o,os}

rm -f ./libc/misc/wctype/*.{o,os}

rm -f ./libc/misc/wordexp/*.{o,os}

rm -f ./libc/pwd_grp/*.{o,os}

rm -f ./libc/stdio/*.{o,os,oS}

rm -f ./libc/string/{,*/}*.{o,os}

rm -f ./libc/termios/*.{o,os}

rm -f ./libc/inet/rpc/*.{o,os,oS}

rm -f ./libc/inet/*.{o,os}

rm -f ./libc/signal/*.{o,os}

rm -f ./libc/stdlib/malloc/*.{o,os}

rm -f ./libc/stdlib/malloc-simple/*.{o,os}

rm -f ./libc/stdlib/malloc-standard/*.{o,os}

rm -f ./libc/stdlib/*.{o,os,oS}

rm -f ./libc/unistd/*.{o,os}

rm -f ./libc/*.{o,os,oS,a}

rm -f ./include/pthread.h ./include/semaphore.h \

    ./include/bits/pthreadtypes.h

rm -f ./include/thread_db.h

rm -f ./include/bfin_fixed_code.h ./include/bfin_l1layout.h

./include/bfin_sram.h

make -s -C test clean

make -C utils utils_clean

rm -f ../utils/{ldconfig,ldd,readelf,iconv,locale,*.host}

rm -f ./extra/scripts/unifdef

find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec rm

-f {} \;

rm -f .config .config.old .config.cmd

make -C extra/config distclean

make[1]: *** ../../.config: Is a directory.  Stop.

make: *** [distclean] Error 2

 

Backtrace:  (most recent call is first)

   #0: File: funcs.sh               Line:  168   Function: die_with_log

       Args:

   #1: File: BuildToolChain         Line: 1181   Function: run_cmd

       Args: 'make' 'V=1' 'distclean'

   #2: File: BuildToolChain         Line: 1336   Function: build_uclibc_core

       Args: 'bfin-uclinux'

'/home/ta/uclinux_2011R1/toolchain/bfin-uclinux/runtime' '.config-used-for_.' ''

'.'

   #3: File: BuildToolChain         Line: 1616   Function: build_uclibc

       Args: 'uclinux' '/home/ta/uclinux_2011R1/toolchain/bfin-uclinux/runtime'

'/home/ta/uclinux_2011R1/toolchain'

 

 

--- Timur Aydin                                              2012-05-07 09:29:23

I have debugged the problem and it seems it happens as follows:

 

In the BuildToolChain script, the build_uclibc_core() function has the

following line:

 

    # workaround make behavior which causes it to search system paths

    # for a .config file.  Such as /usr/include/../../.config.

    run_cmd touch .config

 

In this line, an empty .config file is placed underneath the uClibc folder.

According to the command, this is a workaround for a particular make behaviour.

But later in the same function, when the following statement executes:

 

    echo_date "${target}: uClibc: cleaning"

    run_cmd $MAKE $ARGS distclean

 

The .config file is deleted in one of the distclean rules. Once this file is

gone, the distclean operation fails down the road with the above error message.

 

--- Timur Aydin                                              2012-05-07 09:31:46

The following patch, which basically preserves the .config file during

distclean, allows the build to complete, but it probably isn't the desired fix:

 

diff --git a/uClibc/Makefile.in b/uClibc/Makefile.in

index 331c9d4..01fa6ce 100644

--- a/uClibc/Makefile.in

+++ b/uClibc/Makefile.in

@@ -445,7 +445,7 @@ clean:

 

distclean: clean

        -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \)

-exec $(RM) {} \;

-       $(RM) .config .config.old .config.cmd

+       $(RM) .config.old .config.cmd

        $(MAKE) -C extra/config distclean

 

dist release:

 

--- Stuart Henderson                                         2012-05-07 09:52:32

I believe this is a known problem with uClibc/make.  The workaround they added

to uClibc doesn't appear to be working, and i'm not convinced it's the right way

to workaround it anyway.

There's a bit more context here:

http://blackfin.uclinux.org/gf/project/toolchain/forum/?_forum_action=ForumMessageBrowse&thread_id=44870&action=ForumBrowse

 

basically, i believe you have a .config dir somewhere it shouldn't be.

possibly two below the uClibc directory or in your root dir?  if you move it,

everything should work.

 

--- Timur Aydin                                              2012-05-07 10:30:40

Stuart, there is a .config subdirectory under /

 

I don't know who put it there, but there is a trolltech named file there, so it

must be QT that put it there

 

--- Timur Aydin                                              2012-05-07 10:33:05

I also have a ~/.config file (under the home folder). Would this cause the

problem as well?

 

--- Stuart Henderson                                         2012-05-07 10:49:58

I don't think so, however it's worth remembering in case moving the .config dir

in root doesn't resolve the problem.

 

--- Stuart Henderson                                         2012-05-10 11:10:57

Closing this off, since it's an upstream uclibc/make issue.

 

--- Mike Frysinger                                           2013-01-26 18:27:24

FYI fixed upstream:

http://git.uclibc.org/uClibc/commit/?id=0c3eb2da578bc7ba2e74d240e3249dce62ec725e

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes