2010-07-28 06:21:53     e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

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

2010-07-28 06:21:53     e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Shyam sundar (INDIA)

Message: 91811   

 

Hello world,

 

The following is the error, which i get when i give the make command

 

Can anybody help me?

 

make[6]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs/build-e2fsprogs-1.41.4/intl'

make[6]: Nothing to be done for `all'.

make[6]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs/build-e2fsprogs-1.41.4/intl'

making install in e2fsck

make[6]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs/build-e2fsprogs-1.41.4/e2fsck'

    LD e2fsck

util.o: In function `init_resource_track':

../../e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

util.o: In function `print_resource_track':

../../e2fsprogs-1.41.4/e2fsck/util.c:340: undefined reference to `_sbrk'

collect2: ld returned 1 exit status

make[6]: *** [e2fsck] Error 1

make[6]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs/build-e2fsprogs-1.41.4/e2fsck'

make[5]: *** [install-progs-recursive] Error 1

make[5]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs/build-e2fsprogs-1.41.4'

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

make[4]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user/e2fsprogs'

make[3]: *** [e2fsprogs] Error 2

make[3]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user'

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

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/user'

make[1]: *** [subdirs] Error 1

make[1]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist'

make: *** [single] Error 2

 

 

I am using Ubuntu 10.04

 

The following are the set of tool chains,I used

 

blackfin-toolchain-09r1.1-2.i386.tar.bz2

 

blackfin-toolchain-uclibc-full-09r1-10.i386.tar.bz2

 

blackfin-toolchain-elf-gcc-4.1-09r1.1-2.i386.tar.bz2

 

I had extracted the toolchain in the above order.

 

I have downloaded the following uclinux distribution package

 

uClinux-dist-2009R1.1-RC4.tar.bz2

 

 

 

 

 

When i used the following toolchain and uclinux distribution package,I didnt encounter with any error

 

blackfin-toolchain-08r1-8.i386.rpm

 

blackfin-toolchain-uclibc-full-08r1-8.i386.rpm

 

blackfin-toolchain-elf-gcc-4.1-08r1.5-14.i386.rpm

 

uClinux-dist-2008R1.5-RC3-NEW.tar.bz2

QuoteReplyEditDelete

 

 

2010-07-28 08:19:55     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Shyam sundar (INDIA)

Message: 91813   

 

Hello world,

 

I was able to solve the above problem.

 

which -a bfin-linux-uclibc-gcc

when i gave the above command, i got the response as

/opt/uClinux/bfin-linux-uclibc/bin//bfin-linux-uclibc-gcc

I had used the above path for uClinux-dist-2008R1.5-RC3.

 

For uClinux-dist-2009R1.1-RC4 I had set the following path as the environment

variable path

/home/tcoe/Desktop/uclinux_2009/opt/uClinux/bfin-linux-uclibc/bin//bfin-linux-uclibc-gcc When I changed the path in .bashrc file,I didnt restart the system and hence had got the error

 

But now i am getting the following error, can aomeone please help me out??

 

make[2]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/dmalloc'

romfs-inst.sh /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/bin/dmalloc /bin

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/dmalloc'

make[2]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/e2fsprogs-libs'

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libblkid.so.1 /lib/libblkid.so.1

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libcom_err.so.2 /lib/libcom_err.so.2

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libss.so.2 /lib/libss.so.2

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libuuid.so.1 /lib/libuuid.so.1

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/e2fsprogs-libs'

make[2]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libg'

make[2]: Nothing to be done for `romfs'.

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libg'

make[2]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libjpeg'

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF libjpeg.so /usr/lib/libjpeg.so.62

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libjpeg'

make[2]: Entering directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libtool'

romfs-inst.sh -d -e CONFIG_FMT_USE_FDPIC_ELF /home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libltdl.so.3 /usr/lib/libltdl.so.3

cp: cannot stat `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/staging/usr/lib/libltdl.so.3': No such file or directory

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

make[2]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib/libtool'

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

make[1]: Leaving directory `/home/tcoe/Desktop/uclinux_2009/uClinux-dist/lib'

make: *** [romfs.subdirs] Error 1

QuoteReplyEditDelete

 

 

2010-07-28 11:16:27     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Mike Frysinger (UNITED STATES)

Message: 91816   

 

you probably need to `make clean` since you tried building with the wrong toolchain

QuoteReplyEditDelete

 

 

2010-07-29 00:03:44     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Shyam sundar (INDIA)

Message: 91833   

 

Hi Mike,

 

I had tried make clean and then make , but I do get the same error.

 

Do you mean to say

 

blackfin-toolchain-09r1.1-2.i386.tar.bz2

 

blackfin-toolchain-uclibc-full-09r1-10.i386.tar.bz2

 

blackfin-toolchain-elf-gcc-4.1-09r1.1-2.i386.tar.bz2

 

and

 

uClinux-dist-2009R1.1-RC4.tar.bz2

 

are not compatible?

 

I am new to the linux world, not able to figure out what is going wrong!!

QuoteReplyEditDelete

 

 

2010-07-29 00:24:34     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Mike Frysinger (UNITED STATES)

Message: 91834   

 

i did not imply any such thing.  your own posts indicated you compiled things with an old toolchain (2008R1.5).

 

edit the lib/libtool/Makefile and change the .so.3 to .so.7

QuoteReplyEditDelete

 

 

2010-07-29 08:22:54     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Shyam sundar (INDIA)

Message: 91871   

 

Thanks Mike !! That solution worked!!

 

I am eager to know why it failed and how your solution worked !!

QuoteReplyEditDelete

 

 

2010-07-29 11:18:44     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Mike Frysinger (UNITED STATES)

Message: 91873   

 

newer libtool has a different SONAME, so the path needed updating

QuoteReplyEditDelete

 

 

2010-08-02 02:53:55     Re: e2fsprogs-1.41.4/e2fsck/util.c:280: undefined reference to `_sbrk'

Shyam sundar (INDIA)

Message: 92002   

 

Oh !! Ok

 

Thanks Mike!

 

Thread can be closed !!

Attachments

    Outcomes