Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#28 uclibc compile break

open
nobody
None
5
2012-10-03
2008-09-16
Claudyus
No

Hi all,
porting smallbasic to uclibc I get following error at linking stage:

cris-linux-uclibc-gcc -O3 -Os -L/home/claudyus/sdk/openwrt/trunk/staging_dir/toolchain-cris_gcc4.1.2/lib -L/home/claudyus/sdk/openwrt/trunk/staging_dir/cris/usr/lib -L/home/claudyus/sdk/openwrt/trunk/staging_dir/cris/lib -o sbasic dev_ndcfb.o dev_genfb.o device.o dev_oss.o dev_term.o g_line.o decomp.o console_main.o -lm -ldl -lpthread -lncurses -lreadline -lpcre -L../../src -lsb_common -nodefaultlibs -luClibc++ -lgcc -lc
../../src/libsb_common.a(scan.o): In function comp_save_bin': scan.c:(.text+0x1a6): undefined reference tomalloc_usable_size'
../../src/libsb_common.a(var.o): In function v_resize_array': var.c:(.text+0x10fc): undefined reference tomalloc_usable_size'
../../src/libsb_common.a(vmt.o): In function dbt_recsize': vmt.c:(.text+0xea): undefined reference tomalloc_usable_size'
../../src/libsb_common.a(vmt.o): In function dbt_read': vmt.c:(.text+0x74c): undefined reference tomalloc_usable_size'
../../src/libsb_common.a(vmt.o): In function dbt_write': vmt.c:(.text+0x840): undefined reference tomalloc_usable_size'
collect2: ld returned 1 exit status
make[5]: *** [sbasic] Error 1

As reported here:
http://groups.google.com/group/comp.os.linux.embedded/browse_thread/thread/e032b00b7f79a444
and
http://www.gnu.org/software/gnulib/manual/html_node/malloc_005fusable_005fsize.html

this function is not implement inside uclibc, should be nice handle a smallbasic version who don't use this function.

Here I found an example to override the problem simple wrapping malloc/free/realloc function http://www.uclibc.org/lists/uclibc/2008-August/019816.html

Many thanks

Discussion