[#6519] run version on trunk head kernel built with trunk head toolchain would fail to give toolchain version

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

[#6519] run version on trunk head kernel built with trunk head toolchain would fail to give toolchain version

Submitted By: Mingquan Pan

Open Date

2011-04-02 03:30:01     Close Date

2011-04-12 04:08:12

Priority:

Medium     Assignee:

Nobody

Board:

N/A     Silicon Revision:

Resolution:

N/A     Fixed In Release:

N/A

Processor:

ALL     

Host Operating System:

toolchain rev.:

head     kernel rev.:

State:

Closed     Found In Release:

2011R1

Is this bug repeatable?:

N/A     

Summary: run version on trunk head kernel built with trunk head toolchain would fail to give toolchain version

Details:

 

run version on trunk head kernel built with trunk head toolchain would fail to give toolchain version, like:

 

root:/> version

kernel:    Linux release 2.6.38.2-ADI-2011R1-pre-svn9807, build #6 Thu Mar 31 15:44:13 GMT 2011

toolchain: bfin-uclinux-gcc release collect2: ld returned 1 exit status

user-dist: release svn-10132, build #2 Thu Mar 31 15:43:35 GMT 2011

 

root:/> cat /proc/cpuinfo

processor       : 0

vendor_id       : Analog Devices

cpu family      : 0x27bb

model name      : ADSP-BF561 600(MHz CCLK) 100(MHz SCLK) (mpu off)

stepping        : 5

cpu MHz         : 600.000/100.000

bogomips        : 1191.93

Calibration     : 595968000 loops

cache size      : 16 KB(L1 icache) 32 KB(L1 dcache) 0 KB(L2 cache)

dbank-A/B       : cache/cache

external memory : cacheable in instruction cache

external memory : cacheable (write-through) in data cache

icache setup    : 4 Sub-banks/4 Ways, 32 Lines/Way

dcache setup    : 2 Super-banks/4 Sub-banks/2 Ways, 64 Lines/Way

L2 SRAM         : 128KB

L2 SRAM         : uncacheable in instruction cache

L2 SRAM         : cacheable (write-through) in data cache

board name      : ADI BF561-EZKIT

board memory    : 65536 kB (0x  (null) -> 0x04000000)

kernel memory   : 64508 kB (0x00001000 -> 0x03f0000

0)

 

while on trunk head kernel built with svn-5013, this is ok.

 

root:/> version

kernel:    Linux release 2.6.38.2-ADI-2011R1-pre-svn9817, build #508 Sat Apr 2 14:29:49 CST 2011

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5013)

user-dist: release svn-10133, build #5619 Sat Apr 2 14:28:48 CST 2011

 

 

Follow-ups

 

--- Mike Frysinger                                           2011-04-02 03:39:48

that doesnt show the actual problem.  show the full output of doing:

make user/version_{clean,only}

 

`version` works on my system:

$ ./user/version/version

kernel:    Linux release 2.6.38.1, build #5 SMP PREEMPT Sun Mar 27 16:23:47 EDT

2011

toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.5

(ADI-trunk/git-36c2385)

user-dist: release svn-10034, build #332 Sat Apr 2 03:37:37 EDT 2011

 

--- Mingquan Pan                                             2011-04-08 01:39:20

I see this issue only on the machine testing for bf561. and doing as you

instruct, get:

 

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> make

user/version_{clean,only}

make[1]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

make -C version clean; rm -f version/.sgbuilt_user; true

make[2]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

rm -f version *.elf *.gdb *.o

make[2]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

make[1]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

make[1]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

touch version/.sgbuilt_user && make -C version -j4

make[2]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf561-0.5 -DEMBED -D__uClinux__

-I/home/test/work/cruise/checkouts/uclinux-dist  -mcpu=bf561-0.5  -c -o

version.o version.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf561-0.5 -DEMBED -D__uClinux__

-I/home/test/work/cruise/checkouts/uclinux-dist  -mcpu=bf561-0.5  -c -o stamp.o

stamp.c

bfin-uclinux-gcc  -Wl,-elf2flt    -mcpu=bf561-0.5 -o version version.o

make[2]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

make[1]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> ls

user/version/

compile.h  id.h  id.mk  Makefile  stamp.c  stamp.h  stamp.o  version  version.c

version.gdb  version.h  version.o

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> rcp

user/version/version root@10.100.4.50:/

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> which

bfin-uclinux-gcc

/home/test/work/cruise/temp/bfin-uclinux/bin/bfin-uclinux-gcc

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist>

/home/test/work/cruise/temp/bfin-uclinux/bin/bfin-uclinux-gcc -v

Using built-in specs.

Target: bfin-uclinux

Configured with: /home/test/work/cruise/checkouts/toolchain/gcc-4.3/configure

--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=bfin-uclinux

--prefix=/home/test/work/cruise/temp/bfin-uclinux --disable-libstdcxx-pch

--with-sysroot=/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime

--enable-threads=posix --enable-clocale=generic --disable-symvers

--disable-libssp --disable-libffi --disable-libgcj

--enable-version-specific-runtime-libs --enable-__cxa_atexit

--with-bugurl=URL:http://blackfin.uclinux.org/gf/project/toolchain/tracker

--with-pkgversion=ADI-trunk/svn-5258

Thread model: posix

gcc version 4.3.5 (ADI-trunk/svn-5258)

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> cd user/

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist/user> svn info

Path: .

URL: svn://10.99.29.20/uclinux-dist/trunk/user

Repository Root: svn://10.99.29.20/uclinux-dist

Repository UUID: 3e2a5524-39e8-4cb9-84a9-c49da69cba3a

Revision: 10139

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 10139

Last Changed Date: 2011-04-07 00:34:59 +0000 (Thu, 07 Apr 2011)

 

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist/user> cd

../../toolchain/

test@43-bf561-toolchain:~/work/cruise/checkouts/toolchain> svn info

Path: .

URL: svn://10.99.29.20/toolchain/trunk

Repository Root: svn://10.99.29.20/toolchain

Repository UUID: 2adf4935-75e9-4407-93b2-34b21a1880a4

Revision: 5374

Node Kind: directory

Schedule: normal

Last Changed Author: grace

Last Changed Rev: 5374

Last Changed Date: 2011-04-07 08:37:00 +0000 (Thu, 07 Apr 2011)

 

 

test@43-bf561-toolchain:~/work/cruise/checkouts/toolchain/gcc-4.3> svn info

Path: .

URL: svn://10.99.29.20/toolchain/trunk/gcc-4.3

Repository Root: svn://10.99.29.20/toolchain

Repository UUID: 2adf4935-75e9-4407-93b2-34b21a1880a4

Revision: 5374

Node Kind: directory

Schedule: normal

Last Changed Author: vapier

Last Changed Rev: 5258

Last Changed Date: 2011-02-17 17:54:37 +0000 (Thu, 17 Feb 2011)

 

On host still get:

 

root:/> /bin/version

kernel:    Linux release 2.6.38.2-ADI-2011R1-pre-svn9822, build #36 Fri Apr 8

13:46:39 GMT 2011

toolchain: bfin-uclinux-gcc release collect2: ld returned 1 exit status

user-dist: release svn-10139, build #9 Fri Apr 8 13:45:58 GMT 2011

root:/> ./usr/

bin/    coreb/  sbin/

root:/> ls

bin      etc      init     mnt      root     sys      usr      version

dev      home     lib      proc     sbin     tmp      var

root:/> /version

kernel:    Linux release 2.6.38.2-ADI-2011R1-pre-svn9822, build #36 Fri Apr 8

13:46:39 GMT 2011

toolchain: bfin-uclinux-gcc release collect2: ld returned 1 exit status

user-dist: release svn-10139, build #10 Fri Apr 8 13:48:39 GMT 2011

 

The kernel config file for this uImage is attached.

 

--- Mike Frysinger                                           2011-04-08 01:49:17

i'd have someone local look at that machine since it is only happening on that

 

the output comes from:

  $(CC) -v 2>&1 | tail -1

so i dont see why that would invoke the linker

 

--- Mingquan Pan                                             2011-04-11 01:16:23

I make the version on that machine again and see something error in the building

which is print as the $CC run.

 

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist> make

user/version_{clean,only}

make[1]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

make -C version clean; rm -f version/.sgbuilt_user; true

make[2]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

rm -f version *.elf *.gdb *.o

make[2]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

make[1]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

make[1]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

touch version/.sgbuilt_user && make -C version -j4

make[2]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o:

In function `__start':

/home/test/work/cruise/checkouts/toolchain/uClibc/libc/sysdeps/linux/bfin/crt1.S:145:

undefined reference to `_main'

/home/test/work/cruise/checkouts/toolchain/uClibc/libc/sysdeps/linux/bfin/crt1.S:146:

undefined reference to `_main'

collect2: ld returned 1 exit status

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf561-0.5 -DEMBED -D__uClinux__

-I/home/test/work/cruise/checkouts/uclinux-dist  -mcpu=bf561-0.5  -c -o

version.o version.c

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf561-0.5 -DEMBED -D__uClinux__

-I/home/test/work/cruise/checkouts/uclinux-dist  -mcpu=bf561-0.5  -c -o stamp.o

stamp.c

bfin-uclinux-gcc  -Wl,-elf2flt    -mcpu=bf561-0.5 -o version version.o

make[2]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user/version'

make[1]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/user'

 

 

from the user/version/compile.h, see:

 

#define TOOLCHAIN_VERSION "#8 Mon Apr 11 13:21:27 GMT 2011"

#define TOOLCHAIN_COMPILE_TIME "13:21:27"

#define TOOLCHAIN_COMPILE_BY "test"

#define TOOLCHAIN_COMPILE_HOST "43-bf561-toolchain"

#define TOOLCHAIN_COMPILE_DOMAIN "analog.com"

#define TOOLCHAIN_COMPILER "Using built-in specs. Target: bfin-uclinux

Configured with: /home/test/work/cruise/checkouts/toolchain/gcc-4.3/configure

--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=bfin-uclinux

--prefix=/home/test/work/cruise/temp/bfin-uclinux --disable-libstdcxx-pch

--with-sysroot=/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime

--enable-threads=posix --enable-clocale=generic --disable-symvers

--disable-libssp --disable-libffi --disable-libgcj

--enable-version-specific-runtime-libs --enable-__cxa_atexit

--with-bugurl=URL:http://blackfin.uclinux.org/gf/project/toolchain/tracker

--with-pkgversion=ADI-trunk/svn-5258 Thread model: posix gcc version 4.3.5

(ADI-trunk/svn-5258)

COMPILER_PATH=/home/test/work/cruise/temp/bfin-uclinux/libexec/gcc/bfin-uclinux/4.3.5/:/home/test/work/cruise/temp/bfin-uclinux/libexec/gcc/bfin-uclinux/4.3.5/:/home/test/work/cruise/temp/bfin-uclinux/libexec/gcc/bfin-uclinux/:/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/:/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/:/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/../../../../bfin-uclinux/bin/

LIBRARY_PATH=/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/:/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/../../../../bfin-uclinux/lib/:/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/lib/:/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/

COLLECT_GCC_OPTIONS='-v' '-mlinux'

/home/test/work/cruise/temp/bfin-uclinux/libexec/gcc/bfin-uclinux/4.3.5/collect2

--sysroot=/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime

--eh-frame-hdr -elf2flt

/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o

/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crti.o

/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/crtbegin.o

/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/crtlibid.o

-L/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5

-L/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/../../../../bfin-uclinux/lib

-L/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/lib

-L/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib

-rpath-link /home/test/work/cruise/checkouts/uclinux-dist/staging/usr/local/lib

-lgcc -lc -lgcc

/home/test/work/cruise/temp/bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/crtend.o

/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crtn.o

/home/test/work/cruise/temp/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In

function `__start':

/home/test/work/cruise/checkouts/toolchain/uClibc/libc/sysdeps/linux/bfin/crt1.S:145:

undefined reference to `_main'

/home/test/work/cruise/checkouts/toolchain/uClibc/libc/sysdeps/linux/bfin/crt1.S:146:

undefined reference to `_main' collect2: ld returned 1 exit status"

#33

#define TOOLCHAIN_FILENAME "bfin-uclinux-gcc"

 

--- Mingquan Pan                                             2011-04-11 04:56:57

I change to use another toolchain with the same uclinux-dist and the same

config, this issue remains. It looks it introduced by some build error and it

adds to gcc version info. Once I change to the default config and do make clean

in uclinux-dist, it comes back to ok.

 

--- Mike Frysinger                                           2011-04-11 22:35:45

obviously that TOOLCHAIN_COMPILER is wrong.  the linker shouldnt be invoked, nor

should the output be all there.  that's the point of the `tail -1` part ... only

the last line is shown.

 

can you run the command in question by hand and show the result ?

bfin-uclinux-gcc -v 2>&1 | tail -1

 

--- Mingquan Pan                                             2011-04-11 22:50:30

Simply running this command, the output is right.

 

test@43-bf561-toolchain:~/work/cruise/checkouts/uclinux-dist>

bfin-uclinux-gcc -v 2>&1 | tail -1

gcc version 4.3.5 (ADI-trunk/svn-5258)

 

It looks this error generated during the building and is added to the gcc

version command.

 

--- Mike Frysinger                                           2011-04-11 23:00:51

yeah, so i guess find someone local to poke the machine

 

--- Mingquan Pan                                             2011-04-12 04:08:12

It turns out to be a test script issue. On that machine the liblzo is somehow

been unselected which makes the version building have that error. I will take

care of that. So close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

app_config.561    application/octet-stream    51346    Mingquan Pan

kernel_config.561    application/octet-stream    26741    Mingquan Pan

Outcomes