[Cbe-oss-dev] MARS build help request...

Yuji Mano Yuji.Mano at am.sony.com
Fri Aug 15 04:58:50 EST 2008


Neil Costigan wrote:
> Hi All
> 
> New to the list and I have some build problem with MARS.
> More correctly. MARS builds but the test and sample suite build fails.
> 
> I can make and install the lib  (involved one file copy of xlc's 
> ppu_intrinics.h to a visible include directory)
> 
> however when I build the test suite I get link errors...
> 
> [root at localhost queue_test_1]# make
> spu-gcc -Wall -O3 -funroll-loops -o mpu_task.o mpu_task.c -lmars -Wl,-N 
> -Wl,-gc-sections -Wl,--section-start,.init=0x10000 
> -Wl,--entry,mars_entry -Wl,-u,mars_entry
> ppu-embedspu  -Wall -O3 -funroll-loops task_spe_prog mpu_task.o mpu_task.eo
> ppu-gcc  -Wall -O3 -funroll-loops -c -o host.o host.c
> ppu-gcc  -Wall -O3 -funroll-loops -o queue_test_1 mpu_task.eo host.o 
> -lspe2 -lmars
> /usr/lib/gcc/ppu/4.1.1/../../../../lib64/libmars.so: undefined reference 
> to `__lwsync'
> /usr/lib/gcc/ppu/4.1.1/../../../../lib64/libmars.so: undefined reference 
> to `__isync'
> /usr/lib/gcc/ppu/4.1.1/../../../../lib64/libmars.so: undefined reference 
> to `__stwcx'
> /usr/lib/gcc/ppu/4.1.1/../../../../lib64/libmars.so: undefined reference 
> to `__lwarx'
> 
> I'm building on
> linux 2.6.25-rc4
> This is Fedora core 7 on a PS3 with latest Cell SDK and a hand rolled
> kernel.
> 
> MARS src is from the ftp
> ftp://ftp.infradead.org/pub/Sony-PS3/mars
> 
> Anyone any idea of where I am going wrong ?

Where did you install the MARS libraries?
Did you follow the README section "Building Source"?
If not try doing exactly what it says to do:

32-bit host
---------------------
[mars-lib]$ ./configure --host=ppu --libdir="/usr/lib"
[mars-lib]$ make HOST_FLAGS=-m32

64-bit host
---------------------
[mars-lib]$ ./configure --host=ppu --libdir="/usr/lib64"
[mars-lib]$ make HOST_FLAGS=-m64

then make install (probably need to be root)

I know someone else has mentioned problems trying to build the test and
sample sources when installing MARS to a non-standard path.
Eventually this should all be cleaned up.

But the instructions above should work for you.

Regards,
Yuji




More information about the cbe-oss-dev mailing list