Hello All,

I have installed the last stable scratchbox on Debian system. It can build
BusyBox 1.1.1.

However, When I use it to build MPlayer-1.0pre7, It fails in the link
process. It seems that the uclibc does not include
sinf cosf functions. I have perofmred a test.c:

#include <math.h>
#include <stdlib.h>

int main()
{
       float f = 3.14;
       f = sinf(f);
       printf("Start %s f=%f\n", __FUNCTION__, f);
       return 0;
}

gcc test1.c -lm
/var/tmp/ccA383gk.o(.text+0x1c): In function `main':
test1.c: undefined reference to `sinf'
collect2: ld returned 1 exit status

It seems that the
scratchbox-toolchain-arm-gcc3.4-uclibc0.9.27_1.0.3_i386.deb does not
contians the sinf cosf function,

How to resolve this problem? I have to make a toolchain by myself?

Thank you!

Tyler Li

Below is the gcc version information:

gcc -v
Reading specs from
/scratchbox/compilers/arm-linux-gcc3.4.cs-uclibc0.9.27/lib/gcc/arm-linux-uclibc/3.4.2/specs
Reading specs from
/scratchbox/compilers/arm-linux-gcc3.4.cs-uclibc0.9.27/gcc.specs
rename spec cpp to old_cpp
Configured with:
../../work/gcc-2004-q3d/configure --target=arm-linux-uclibc 
--host=i686-pc-linux-gnu
--build=i686-pc-linux-gnu 
--prefix=/scratchbox/compilers/arm-linux-gcc3.4.cs-uclibc0.9.27
--enable-languages=c,c++ --program-prefix=arm-linux-uclibc- --enable-shared
--enable-static 
--with-sysroot=/scratchbox/compilers/arm-linux-gcc3.4.cs-uclibc0.9.27
--with-local-prefix=/scratchbox/compilers/arm-linux-gcc3.4.cs-uclibc0.9.27
--enable-symvers=gnu --with-gnu-ld
Thread model: posix
gcc version 3.4.2 (release) (CodeSourcery ARM Q3D 2004)


Below is the MPlayer build error message:

cc -I../libvo -I../../libvo  -O4    -ffast-math -fomit-frame-pointer 
-D_REENTRANT
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I.            -o mplayer
mplayer.o mp_msg.o cpudetect.o codec-cfg.o spudec.o playtree.o
playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o
m_config.o m_option.o parser-cfg.o m_struct.o edl.o unrarlib.o mixer.o
parser-mpcmd.o subopt-helper.o libvo/libvo.a libao2/libao2.a
libmpcodecs/libmpcodecs.a   libaf/libaf.a libmpdemux/libmpdemux.a
input/libinput.a postproc/libswscale.a
osdep/libosdep.a -Llibmpdvdkit2 -lmpdvdkit libavcodec/libavcodec.a
libavformat/libavformat.a                 -ltermcap  -lnsl
libfaad2/libfaad2.a  mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a
tremor/libvorbisidec.a   -lnsl                  -lpthread -ldl    -lm
libaf/libaf.a(af_tools.o)(.text+0x2d8): In function `af_softclip':
af_tools.c: undefined reference to `sinf'
libavcodec/libavcodec.a(ac3enc.o)(.text+0xa10): In function
`AC3_encode_init':
ac3enc.c: undefined reference to `cosf'
libavcodec/libavcodec.a(ac3enc.o)(.text+0xa5c):ac3enc.c: undefined reference
to `sinf'
libavcodec/libavcodec.a(ac3enc.o)(.text+0xb30):ac3enc.c: undefined reference
to `cosf'
libavcodec/libavcodec.a(ac3enc.o)(.text+0xb80):ac3enc.c: undefined reference
to `sinf'
libavcodec/libavcodec.a(mdct.o)(.text+0xe8): In function `ff_mdct_init':
mdct.c: undefined reference to `cosf'
libavcodec/libavcodec.a(mdct.o)(.text+0x104):mdct.c: undefined reference to
`sinf'
libavcodec/libavcodec.a(fft.o)(.text+0x9c): In function `ff_fft_init':
fft.c: undefined reference to `cosf'
libfaad2/libfaad2.a(cfft.o)(.text+0x3158): In function `cffti':
cfft.c: undefined reference to `cosf'
libfaad2/libfaad2.a(cfft.o)(.text+0x317c):cfft.c: undefined reference to
`sinf'
libfaad2/libfaad2.a(sbr_fbt.o)(.text+0x368): In function
`master_frequency_table':
sbr_fbt.c: undefined reference to `logf'
libfaad2/libfaad2.a(sbr_fbt.o)(.text+0x4dc):sbr_fbt.c: undefined reference
to `logf'
libfaad2/libfaad2.a(sbr_fbt.o)(.text+0x7fc): In function
`derived_frequency_table':
sbr_fbt.c: undefined reference to `logf'
collect2: ld returned 1 exit status
make: *** [mplayer] Error 1



_______________________________________________
Scratchbox-users mailing list
[email protected]
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to