[#5194] some library packages always attempt to build shared libraries

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

[#5194] some library packages always attempt to build shared libraries

Submitted By: Vivi Li

Open Date

2009-06-02 07:10:34     Close Date

2009-09-28 00:16:41

Priority:

Medium     Assignee:

Yi Li

Status:

Closed     Fixed In Release:

N/A

Found In Release:

2009R1-RC6     Release:

Category:

Make Errors     Board:

N/A

Processor:

ALL     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Fixed

Uboot version or rev.:

    Toolchain version or rev.:

gcc4.1-09r1_rc6

App binary format:

N/A     

Summary: some library packages always attempt to build shared libraries

Details:

 

Build some libs will fail with crt1.o error.

 

The problem happens for lib bitvector with flat format. FDPIC is ok.

--

[ ! -d "bitvector" ] || ( touch bitvector/.sgbuilt_lib &&

make -C bitvector ) || exit $?

make[3]: Entering directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/bitvector'

bfin-uclinux-gcc -pipe -Wall -g -O2      -mcpu=bf537-0.2 -DEMBED -D__uClinux__

-I/home/test/work/cruise/checkouts/uclinux-dist  -mcpu=bf537-0.2  -c -o

BitVector.o BitVector.c

BitVector.c: In function ‘BitVector_from_Enum’:

BitVector.c:2136: warning: ‘index’ may be used uninitialized in

this function

bfin-uclinux-gcc -shared -Wl,-soname,libbitvector.so -o libbitvector.so

BitVector.o -lc

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x36): undefined reference to `_main'

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make[3]: *** [libbitvector.so] Error 1

make[3]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/bitvector'

--

 

The same problem happens for libldap in flat format.

--

/bin/sh

/home/test/work/cruise/checkouts/uclinux-dist/lib/libldap/builddir/libtool

--mode=link bfin-uclinux-gcc -pipe  -g -O2      -mcpu=bf537-0.2  -lc

-version-info 2:122:0 -rpath /lib -o liblber.la assert.lo decode.lo encode.lo

io.lo bprint.lo debug.lo memory.lo options.lo sockbuf.lo stdio.lo version.lo

rm -fr .libs/liblber.la .libs/liblber.* .libs/liblber.*

bfin-uclinux-gcc -shared  assert.lo decode.lo encode.lo io.lo bprint.lo

debug.lo memory.lo options.lo sockbuf.lo stdio.lo version.lo  -lc  -Wl,-soname

-Wl,liblber.so.2 -o .libs/liblber.so.2.0.122

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x36): undefined reference to `_main'

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make[6]: *** [liblber.la] Error 1

make[6]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/libldap/builddir/libraries/liblber'

--

 

The same problem happens for libnl in flat format. FDPIC is OK.

--

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include/stddef.h:414:1:

warning: this is the location of the previous definition

  LD libnl.so.1.1

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x36): undefined reference to `_main'

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make[6]: *** [libnl.so.1.1] Error 1

make[5]: *** [all] Error 2

make[4]: *** [all] Error 2

make[4]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/libnl'

--

 

The same problem happens for pcre in flat format.

--

/bin/sh ./libtool --mode=link bfin-uclinux-gcc -pipe  -g -O2      -mcpu=bf537-0.2 -I. -I.. -rpath /lib -version-info \

                '0:1:0' -o libpcre.la maketables.lo get.lo study.lo pcre.lo

bfin-uclinux-gcc -shared  .libs/maketables.o .libs/get.o .libs/study.o .libs/pcre.o   -mcpu=bf537-0.2 -Wl,-soname -Wl,libpcre.so.0 -o .libs/libpcre.so.0.0.1

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function `__start':

(.text+0x36): undefined reference to `_main'

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function `__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make[4]: *** [libpcre.la] Error 1

make[4]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/lib/pcre/builddir'

--

 

Follow-ups

 

--- Vivi Li                                                  2009-06-04 06:59:09

lib bitvector also has such fail in shared-flat format.

 

--- Yi Li                                                    2009-06-05 05:44:44

Cannot reproduce pcre:

 

Here is what I got:

 

/bin/bash ./libtool --tag=CC   --mode=link bfin-uclinux-gcc  -pipe -Wall -g -O2

     -mcpu=bf537-0.2 -version-info 0:1:0 -Wl,-elf2flt    -mcpu=bf537-0.2 -o

libpcre.la -rpath /usr/lib pcre_compile.lo pcre_config.lo pcre_dfa_exec.lo

pcre_exec.lo pcre_fullinfo.lo pcre_get.lo pcre_globals.lo pcre_info.lo

pcre_maketables.lo pcre_newline.lo pcre_ord2utf8.lo pcre_refcount.lo

pcre_study.lo pcre_tables.lo pcre_try_flipped.lo pcre_ucd.lo pcre_valid_utf8.lo

pcre_version.lo pcre_xclass.lo pcre_chartables.lo

mkdir .libs

bfin-uclinux-ar cru .libs/libpcre.a  pcre_compile.o pcre_config.o

pcre_dfa_exec.o pcre_exec.o pcre_fullinfo.o pcre_get.o pcre_globals.o

pcre_info.o pcre_maketables.o pcre_newline.o pcre_ord2utf8.o pcre_refcount.o

pcre_study.o pcre_tables.o pcre_try_flipped.o pcre_ucd.o pcre_valid_utf8.o

pcre_version.o pcre_xclass.o pcre_chartables.o

bfin-uclinux-ranlib .libs/libpcre.a

 

 

Fixed the others.

 

--- Yi Li                                                    2009-06-05 05:57:47

For pcre, svn trunk is updated to newer version and build well for FLAT. So

update the branch with newer version of pere too.

 

--- Vivi Li                                                  2009-08-20 05:31:19

libnl still fails to build for flat format.

 

--

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/include/stddef.h:414:1:

warning: this is the location of the previous definition

  LD libnl.so.1.1

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x36): undefined reference to `_main'

/opt/uClinux/bfin-uclinux/bfin-uclinux/runtime/usr/lib/crt1.o: In function

`__start':

(.text+0x3a): undefined reference to `_main'

collect2: ld returned 1 exit status

make[5]: *** [libnl.so.1.1] Error 1

--

 

--- Vivi Li                                                  2009-08-20 06:05:42

When I build pcre, if zlib is not selected in advance, it will fail to build

pcre. It lacks the dependency of pcre on zlib.

 

--

bfin-uclinux-gcc -pipe -Wall -g -O2 -mcpu=bf533-0.3 -Wl,-elf2flt

-mcpu=bf533-0.3 -o pcregrep pcregrep.o  ./.libs/libpcreposix.a

/home/test/work/cruise/checkouts/uclinux-dist/lib/pcre/build-pcre-7.9/.libs/libpcre.a

-lz

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/../../../../bfin-uclinux/bin/ld.real:

cannot find -lz

collect2: ld returned 1 exit status

make[3]: *** [pcregrep] Error 1

make[3]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/pcre/build-pcre-7.9'

make[2]: *** [all] Error 2

make[2]: Leaving directory

`/home/test/work/cruise/checkouts/uclinux-dist/lib/pcre'

make[1]: *** [pcre_only] Error 2

make[1]: Leaving directory `/home/test/work/cruise/checkouts/uclinux-dist/lib'

make: *** [lib/pcre_only] Error 2

--

 

--- Vivi Li                                                  2009-08-20 06:16:30

Summary for above libs after verify:

lib bitvector is ok;

lib ldap needs uclibc full version for locale lib and it can be built now;

lib pcre has dependency problem with zlib;

nllib still has the bug of crt1.o, needs to fix.

 

--- Yi Li                                                    2009-08-21 00:39:31

Fixed above lib pcre and libnl issue.

 

--- Vivi Li                                                  2009-09-28 00:16:41

OK on both branch and trunk. Close it.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes