installation of spu-media lib

"A collection of spu programs to accelerate media related applications for the CellBE ( PS3 ) platform" - unsolo

Moderator: unsolo

Post Reply
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

installation of spu-media lib

Post by mickfromperth »

OK. Just to be clear: when I install linux on my ps3, I still require the "ps3toolchain" to be installed before I can compile spu-medialib?

I get the impression from ooPo's comments on this page: http://forums.ps2dev.org/viewtopic.php?t=8494&start=90

that if your running on a ps3 already you already have the correct environment??

I can't install either the toolchain or spu-medialib and I'm wondering which one I need to tackle..

Mick
panu
Posts: 7
Joined: Tue Nov 20, 2007 4:37 am

Post by panu »

Spu-medialib requires compiler for spu and without it you cant make the library. If you have spe-elf-gcc or spu-gcc you should have the correct environment doing the compilation otherwise you have to install toolchain.

What kind of problem you are having with spu-medialib?
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

Post by mickfromperth »

Ok. Combiled and installed libps3fb from svn.

Then, following the instrcutions on this page:
http://wiki.ps2dev.org/ps3:spu-medialib:install

I get to this step:
spu-medialib #./configure --prefix /usr

And here is the output..
---
mick@mick-desktop:~/build/spu-medialib$ ./configure --prefix /usr
...
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSPE2... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libspu-medialib.pc
config.status: executing depfiles commands
=== configuring in spu (/home/mick/build/spu-medialib/spu)
configure: running /bin/bash ./configure '--prefix=/usr' --cache-file=/dev/null --srcdir=.
checking for spu-elf-gcc... spu-elf-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
configure: error: ./configure failed for spu
mick@mick-desktop:~/build/spu-medialib$

I *think* I created the error by hacking together my own pkg-confg file for libspe2. Ubuntu's libspe2-dev doesn't come with a libspe2.pc file.. So I copied another similar file..

---
mick@mick-desktop:~/build/spu-medialib$ cat /usr/lib/pkgconfig/libspe2.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=${prefix}/include

Name: libspe2
Description: libspe2
Version: 2.2.0
Libs: -L${libdir}
Cflags: -I${includedir}
---

I've checked the directories stuff is accurate but I *really* have no idea about the Libs & Cflags settings.. Withouth the pc file I get..

---
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSPE2... configure: error: Package requirements (libspe2 >= 2.2.0) were not met:

No package 'libspe2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBSPE2_CFLAGS
and LIBSPE2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
---

Please help! ;-)
RobertW
Posts: 3
Joined: Sun Nov 11, 2007 6:58 am

Post by RobertW »

well I have seen this one.. :-) Looked over it as well the first time.

---
checking for LIBSPE2... configure: error: Package requirements (libspe2 >= 2.2.0) were not met:
---

check your libspe2 version. It needs 2.2.0 you probably have libspe 1.8 or something like that and it needs 2.2.0 or higher.
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

Post by mickfromperth »

Thanks but no thats not it...

---
mick@mick-desktop:~/build/spu-medialib$ ls -lah /usr/lib/libspe2.so
lrwxrwxrwx 1 root root 12 2007-11-20 20:36 /usr/lib/libspe2.so -> libspe2.so.2
mick@mick-desktop:~/build/spu-medialib$ ls -lah /usr/lib/libspe2.so.2
lrwxrwxrwx 1 root root 16 2007-11-20 20:36 /usr/lib/libspe2.so.2 -> libspe2.so.2.2.0
mick@mick-desktop:~/build/spu-medialib$ ls -lah /usr/lib/libspe2.so.2.2.0
-rw-r--r-- 1 root root 93K 2007-09-29 15:50 /usr/lib/libspe2.so.2.2.0
---

The reason that fails, is because there is no libspe2.pc so package config is failing to give any useful feedback. Maybe if someone could post the contents of there libspe2.pc file? I'm running ubunutu but I know that doens't have the pc file..

Mick
RobertW
Posts: 3
Joined: Sun Nov 11, 2007 6:58 am

Post by RobertW »

It should detect it without pc file. Check /etc/ldconfig.conf first if /usr/lib is included and do a ldconfig and try again.

If that doesn't work.

Code: Select all

localhost pkgconfig # cat libspe2.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: libspe2
Description: A wrapper library to adapt the JSRE SPU usage model to SPUFS
Version: 2.2.80
Requires:
Conflicts:
Libs: -L${libdir} -lspe2 -lrt -lpthread
Cflags: -I${includedir}
you probably should change the version
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

Post by mickfromperth »

Thanks. I upgraded to 2.2.80. it looks like my first workaround to the libspe2 issue was good enough. As now, with the latest libspe2, I get the same error as before..

---
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSPE2... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libspu-medialib.pc
config.status: executing depfiles commands
=== configuring in spu (/home/mick/build/spu-medialib/spu)
configure: running /bin/bash ./configure '--prefix=/usr' --cache-file=/dev/null --srcdir=.
checking for spu-elf-gcc... spu-elf-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
configure: error: ./configure failed for spu
mick@mick-desktop:~/build/spu-medialib$
---

I understand the error now, it saying i don't have a c compiler. But, I do (I don't know what I have though.. maybe there is a version error??)

i know, because I just compiled mplayer; and I compiled libps3fb before I started this one.. Here is the similar configure output from libps3fb..

---
mick@mick-desktop:~/build/libps3fb$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
...
---

Any tips on what to try next??

Mick
panu
Posts: 7
Joined: Tue Nov 20, 2007 4:37 am

Post by panu »

Have you tried --host instead of --build like the configure is suggesting?
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

Post by mickfromperth »

Hi panu,

No. I hadn't. I don't have a developer background and to be honest I'm not really sure what that output ("--build vs --host") refered to.

I have now tried to use --host but not knowing how it's used I may be braking it more... I've tried both host=ppc and --host=powerepc and the ./confifure seems to be "heaps" better.. But make now fails.

Appolgies upfront.. bere here is the [long] ./configure output (incase it's relavent...

---
mick@mick-desktop:~/build/spu-medialib$ ./configure --prefix /usr --host=powerpc
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for powerpc-strip... no
checking for strip... strip
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... powerpc-unknown-none
checking for style of include used by make... GNU
checking for powerpc-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... unknown
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 98304
checking command to parse nm output from gcc object... ok
checking for objdir... .libs
checking for powerpc-ar... no
checking for ar... ar
checking for powerpc-ranlib... no
checking for ranlib... ranlib
checking for powerpc-strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for ANSI C header files... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for gettimeofday... yes
checking for sqrt... no
checking for powerpc-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSPE2... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libspu-medialib.pc
config.status: executing depfiles commands
=== configuring in spu (/home/mick/build/spu-medialib/spu)
configure: running /bin/bash ./configure '--prefix=/usr' '--host=powerpc' 'host_alias=powerpc' --cache-file=/dev/null --srcdir=.
configure: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used.
checking for powerpc-spu-elf-gcc... no
checking for spu-elf-gcc... spu-elf-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether spu-elf-gcc accepts -g... yes
checking for spu-elf-gcc option to accept ISO C89... none needed
checking build system type... powerpc64-unknown-linux-gnu
checking host system type... spu-unknown-elf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by spu-elf-gcc... /usr/spu/bin/ld
checking if the linker (/usr/spu/bin/ld) is GNU ld... yes
checking for /usr/spu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking whether ln -s works... yes
checking how to recognize dependent libraries... unknown
checking how to run the C preprocessor... spu-elf-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
checking the maximum length of command line arguments... 98304
checking command to parse nm output from spu-elf-gcc object... ok
checking for objdir... .libs
checking for powerpc-ar... no
checking for ar... ar
configure: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org.
checking for powerpc-ranlib... no
checking for ranlib... ranlib
checking for powerpc-strip... no
checking for strip... strip
checking if spu-elf-gcc supports -fno-rtti -fno-exceptions... no
checking for spu-elf-gcc option to produce PIC... -fPIC
checking if spu-elf-gcc PIC flag -fPIC works... yes
checking if spu-elf-gcc static flag -static works... yes
checking if spu-elf-gcc supports -c -o file.o... yes
checking whether the spu-elf-gcc linker (/usr/spu/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... no
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for powerpc-strip... strip
checking dependency style of spu-elf-gcc... gcc3
checking dependency style of ... none
checking for powerpc-embedspu... no
checking for embedspu... /usr/bin/embedspu
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: executing depfiles commands

---

And here is the make output (as you can see; no where near compile.. I think this boils down to ubuntu's missing *.pc file again.. As be the following unrelated posts with similar errors...


---

http://www.gimptalk.com/forum/topic.php?t=25965&start=1
http://lists.ximian.com/pipermail/gtk-s ... 06756.html
---
mick@mick-desktop:~/build/spu-medialib$ make
Making all in src
make[1]: Entering directory `/home/mick/build/spu-medialib/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"spu-medialib\" -DPACKAGE_TARNAME=\"spu-medialib\" -DPACKAGE_VERSION=\"0.1.0\" -DPACKAGE_STRING=\"spu-medialib\ 0.1.0\" -DPACKAGE_BUGREPORT=\"somewhere\" -DPACKAGE=\"spu-medialib\" -DVERSION=\"0.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_MALLOC_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GETTIMEOFDAY=1 -I. -I../include -g -O2 -I/usr/local/include -MT draw_rect.lo -MD -MP -MF .deps/draw_rect.Tpo -c -o draw_rect.lo draw_rect.c
gcc -DPACKAGE_NAME=\"spu-medialib\" -DPACKAGE_TARNAME=\"spu-medialib\" -DPACKAGE_VERSION=\"0.1.0\" "-DPACKAGE_STRING=\"spu-medialib 0.1.0\"" -DPACKAGE_BUGREPORT=\"somewhere\" -DPACKAGE=\"spu-medialib\" -DVERSION=\"0.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_MALLOC_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GETTIMEOFDAY=1 -I. -I../include -g -O2 -I/usr/local/include -MT draw_rect.lo -MD -MP -MF .deps/draw_rect.Tpo -c draw_rect.c -o draw_rect.o
In file included from draw_rect.c:48:
draw_rect.h:60: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.h:60: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.h:64: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.c:119: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.c:119: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.c: In function 'prepare_solid':
draw_rect.c:127: error: 'planemask' undeclared (first use in this function)
draw_rect.c:127: error: (Each undeclared identifier is reported only once
draw_rect.c:127: error: for each function it appears in.)
draw_rect.c:128: error: 'Fg' undeclared (first use in this function)
draw_rect.c: At top level:
draw_rect.c:145: error: expected declaration specifiers or '...' before 'Spu_Pixel'
draw_rect.c: In function 'prepare_copy':
draw_rect.c:155: error: 'planemask' undeclared (first use in this function)
draw_rect.c:224:2: warning: no newline at end of file
make[1]: *** [draw_rect.lo] Error 1
make[1]: Leaving directory `/home/mick/build/spu-medialib/src'
make: *** [all-recursive] Error 1
---

Agh! Thanks all for your help I will be very happy if I can get past this error..

BTW: yes; I have tried to use the ubuntu *.debs from this page:
---
http://linux.yes.nu/PS3Ubuntu/?Page=c3VtbWFyeTAz
---
but I get no video output... I'm now really lost :-)....

Mick
panu
Posts: 7
Joined: Tue Nov 20, 2007 4:37 am

Post by panu »

Hmm.. Not sure if this is due the include problem, but you could try to change
one include line in draw_rect.c and draw_rect.h. In those files there are probably lines stating

Code: Select all

#include <spu-medialib/data_2d.h>
Try to change them to

Code: Select all

#include "data_2d.h"
mickfromperth
Posts: 12
Joined: Thu Nov 22, 2007 12:37 am

installation of spu-media lib [solved]

Post by mickfromperth »

Cheers for that. Make and make install now work. now on the plyaing with something which uses it ;-).

mick
unsolo
Posts: 155
Joined: Mon Apr 16, 2007 2:39 am
Location: OSLO Norway

Post by unsolo »

We are still experiencing some problems with mplayer shutdown but once these are resolved we wil try to get a "newer" rev out of the lib as well fixing these issues.
Don't do it alone.
Post Reply