Building with current toolchain
Added by Poseidon Pontomedon over 1 year ago
I've been trying to build showtime for the ps3 for a few days now, seems i can't manage to do it..
my environment:
poseidon@ps3-builder:~$ uname -a Linux ps3-builder 2.6.32-35-generic #78-Ubuntu SMP Tue Oct 11 16:11:24 UTC 2011 x86_64 GNU/Linux poseidon@ps3-builder:~$ echo $PS3DEV /usr/local/ps3dev poseidon@ps3-builder:~$ echo $PSL1GHT /usr/local/ps3dev poseidon@ps3-builder:~$ echo $PS3INSTALL /home/poseidon/Documents poseidon@ps3-builder:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ps3dev/bin:/usr/local/ps3dev/ppu/bin:/usr/local/ps3dev/spu/bin
i use the latest ps3toolchain and psl1ght versions from git, installed according to their readme files.
I had to change a few things in configure.ps3 (a few paths) and the main Makefile (removed -Werror, because there are a few set-but-not-used variables):
/home/poseidon/Documents/showtime/ext/trex/trex.c:271:7: warning: variable 'op' set but not used [-Wunused-but-set-variable] /home/poseidon/Documents/showtime/src/audio/ps3/ps3_audio.c:151:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable] /home/poseidon/Documents/showtime/src/audio/ps3/ps3_audio.c:200:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable] /home/poseidon/Documents/showtime/src/media.c:689:16: warning: variable 'ad' set but not used [-Wunused-but-set-variable] /home/poseidon/Documents/showtime/src/media.c:689:7: warning: variable 'vd' set but not used [-Wunused-but-set-variable]
Here are the changes i made:
diff --git a/Makefile b/Makefile
index 2a9836c..dbb0d26 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ BUILDDIR = build.${BUILD}
include ${BUILDDIR}/config.mak
-CFLAGS = -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
+CFLAGS = -Wall -Wwrite-strings -Wno-deprecated-declarations
CFLAGS += -Wmissing-prototypes -Iext/dvd ${OPTFLAGS}
diff --git a/configure.ps3 b/configure.ps3
index 7b7cd5d..ad98413 100755
--- a/configure.ps3
+++ b/configure.ps3
@@ -18,13 +18,13 @@ CONFIGURE_POSTFIX="ps3"
source support/configure.inc
GLW_DEFAULT_THEME="mono"
-TOOLCHAIN="${PS3DEV}/host/ppu/bin/ppu-"
+TOOLCHAIN="${PS3DEV}/ppu/bin/ppu-"
enable psl1ght
enable embedded_resources
-LIBAV_CFLAGS="-mminimal-toc -B${PSL1GHT}/target/lib -B${PS3DEV}/host/ppu/lib -I${PS3DEV}/host/ppu/include -include ${TOPDIR}/support/nostrictansi.h"
+LIBAV_CFLAGS="-mminimal-toc -B${PSL1GHT}/target/lib -B${PS3DEV}/portlibs/ppu/lib -I${PS3DEV}/portlibs/ppu/include -include ${TOPDIR}/support/nostrictansi.h"
-LIBAV_ARCH_FLAGS="--cross-prefix=${PS3DEV}/host/ppu/bin/ppu- --enable-cross-compile --arch=powerpc64 --cpu=cell --target-os=none"
+LIBAV_ARCH_FLAGS="--cross-prefix=${PS3DEV}/ppu/bin/ppu- --enable-cross-compile --arch=powerpc64 --cpu=cell --target-os=none"
show_help(){
common_help
@@ -70,8 +70,8 @@ STRIP=${TOOLCHAIN}strip
CFLAGS_cfg += -mminimal-toc -DWORDS_BIGENDIAN
CFLAGS_cfg += -DPATH_MAX=512 -DPS3
CFLAGS_cfg += -I${PSL1GHT}/target/include
-CFLAGS_cfg += -I${PS3DEV}/host/ppu/include
-CFLAGS_cfg += -I${PS3DEV}/host/ppu/include/freetype2
+CFLAGS_cfg += -I${PS3DEV}/portlibs/ppu/include
+CFLAGS_cfg += -I${PS3DEV}/portlibs/ppu/include/freetype2
BUNDLES+=src/ui/glw/rsx
SQLITE_PLATFORM_DEFINES += -DSQLITE_OS_OTHER=1
EOF
@@ -81,7 +81,7 @@ EOF
#
cat >> ${CONFIG_MAK} <<EOF
LDFLAGS_cfg += -lvdec -lrtc
-LDFLAGS_cfg += -B${PSL1GHT}/target/lib -B${PS3DEV}/host/ppu/lib
+LDFLAGS_cfg += -B${PSL1GHT}/target/lib -B${PS3DEV}/portlibs/ppu/lib
LDFLAGS_cfg += -lgcm_sys -laudio -lreality -lsysutil -lio -lnet -lnetctl -lsysmodule
LDFLAGS_cfg += -lfreetype
LDFLAGS_cfg += ${PS3DEV}/host/ppu/ppu/lib/lv2-psl1ght.o -lpsl1ght -llv2
make errors out with:
build.ps3/src/video/ps3_vdec.o:(.toc1+0xe0): undefined reference to `opd64_start' build.ps3/src/video/ps3_vdec.o:(.toc1+0xe8): undefined reference to `opd32_start' /usr/local/ps3dev/target/lib/libsysutil.a(sysutil.o):(.toc+0x0): undefined reference to `opd64_start' /usr/local/ps3dev/target/lib/libsysutil.a(sysutil.o):(.toc+0x8): undefined reference to `opd32_start' /usr/local/ps3dev/target/lib/libpsl1ght.a(thread.o):(.toc+0x0): undefined reference to `opd64_start' /usr/local/ps3dev/target/lib/libpsl1ght.a(thread.o):(.toc+0x8): undefined reference to `opd32_start' /usr/local/ps3dev/ppu/lib/librt.a(sbrk.o): In function `.sbrk_init': sbrk.c:(.text.startup.sbrk_init+0x14): undefined reference to `.sysSpinlockInitialize' /usr/local/ps3dev/ppu/lib/librt.a(sbrk.o): In function `.sbrk_deinit': sbrk.c:(.text.sbrk_deinit+0x34): undefined reference to `.sysMMapperUnmapMemory' sbrk.c:(.text.sbrk_deinit+0x40): undefined reference to `.sysMMapperFreeMemory' /usr/local/ps3dev/ppu/lib/librt.a(sbrk.o): In function `.__librt_sbrk_r': sbrk.c:(.text.__librt_sbrk_r+0x3c): undefined reference to `.sysSpinlockLock' sbrk.c:(.text.__librt_sbrk_r+0x88): undefined reference to `.sysMMapperAllocateMemory' sbrk.c:(.text.__librt_sbrk_r+0x128): undefined reference to `.sysSpinlockUnlock' sbrk.c:(.text.__librt_sbrk_r+0x17c): undefined reference to `.sysSpinlockUnlock' sbrk.c:(.text.__librt_sbrk_r+0x1ec): undefined reference to `.sysMMapperUnmapMemory' sbrk.c:(.text.__librt_sbrk_r+0x204): undefined reference to `.sysMMapperFreeMemory' sbrk.c:(.text.__librt_sbrk_r+0x298): undefined reference to `.sysSpinlockUnlock' /usr/local/ps3dev/ppu/lib/librt.a(heap.o): In function `.heapInit': heap.c:(.text.heapInit+0xbc): undefined reference to `.sysSpinlockInitialize' /usr/local/ps3dev/ppu/lib/librt.a(heap.o): In function `.heapAllocate': heap.c:(.text.heapAllocate+0x7c): undefined reference to `.sysSpinlockLock' heap.c:(.text.heapAllocate+0xc4): undefined reference to `.sysSpinlockUnlock' heap.c:(.text.heapAllocate+0x13c): undefined reference to `.sysSpinlockUnlock' /usr/local/ps3dev/ppu/lib/librt.a(heap.o): In function `.heapAllocateAligned': heap.c:(.text.heapAllocateAligned+0xa0): undefined reference to `.sysSpinlockLock' heap.c:(.text.heapAllocateAligned+0x164): undefined reference to `.sysSpinlockUnlock' /usr/local/ps3dev/ppu/lib/librt.a(heap.o): In function `.heapFree': heap.c:(.text.heapFree+0x5c): undefined reference to `.sysSpinlockLock' heap.c:(.text.heapFree+0x14c): undefined reference to `.sysSpinlockUnlock' heap.c:(.text.heapFree+0x164): undefined reference to `.sysSpinlockUnlock' collect2: ld returned 1 exit status make: *** [build.ps3/showtime] Error 1
I guess the fact that i had to change those paths means that the configure.ps3 was written for an older version of the ps3toolchain and/or psl1ght.
Any hints how to fix this?
Replies (10)
RE: Building with current toolchain
-
Added by Poseidon Pontomedon over 1 year ago
FYI, I fixed it. The problem was that i tried to use this ps3toolchain: https://github.com/ps3dev/ps3toolchain with this PSL1GHT: https://github.com/andoma/PSL1GHT. I only saw later that Andreas Öman has his own ps3toolchain fork (https://github.com/andoma/ps3toolchain).
That ps3toolchain didn't compile, however (failed at compiling zlib, didn't investigate any further), so i just used the toolchain provided here: http://psychocoder.de/building-showtime-with-psl1ght-v1/ in combination with Andreas Ömans PS1LIGHT.
Now I'm finally able to build showtime (without any modifications to the Makefile or configure.ps3).
I'll try to compile the current https://github.com/andoma/ps3toolchain again tomorrow, maybe i can find out what's wrong with the libraries.
RE: Building with current toolchain
-
Added by Ca Ra over 1 year ago
Could you post the link to a working guide on how to install the above that works?
I've been using http://psl1ght.net/wiki/TutorialInstall:CygWin
In theory, switching repositories in the above should work.
It's the paths that screw things up.
Changes to the above to make showtime compile would be great.
Thanks in advance.
RE: Building with current toolchain
-
Added by Poseidon Pontomedon over 1 year ago
I can only post a tutorial how to do it in a VirtualBox Ubuntu 10.04, i didn't try it with cygwin.
- install VirtualBox: https://www.virtualbox.org/
- download Ubuntu 10.4 64 bit: http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=lt
- create a new virtual machine - Linux - Ubuntu 64 bit
- 1024 MB RAM
- 20GB hdd
- install Ubuntu
- After installing, open a terminal on the virtual machine and type.
sudo bash apt-get update apt-get upgrade echo 'export PS3DEV=/usr/local/ps3dev' >> /etc/bash.bashrc echo 'export PSL1GHT=$PS3DEV/psl1ght' >> /etc/bash.bashrc echo 'export PS3INSTALL=~/Documents' >> /etc/bash.bashrc echo 'export PATH=$PATH:$PS3DEV/bin' >> /etc/bash.bashrc echo 'export PATH=$PATH:$PS3DEV/host/ppu/bin' >> /etc/bash.bashrc echo 'export PATH=$PATH:$PS3DEV/host/spu/bin' >> /etc/bash.bashrc echo 'export PATH=$PATH:$PSL1GHT/host/bin' >> /etc/bash.bashrc apt-get install autoconf automake bison flex gcc libelf-dev make \ texinfo libncurses5-dev patch python subversion wget zlib1g-dev \ libtool python-dev bzip2 libgmp3-dev pkg-config libssl-dev g++ \ autoconf2.13 autoconf-archive gnu-standars autoconf-doc gettext \ bison-doc gcc-4.1-locales build-essential g++-multilib g++-4.1-multilib \ gcc-4.1-doc g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg gcc-4.1-multilib \ libmudflap0-dev libgmp3-doc libmpfr-dev libtool-doc libstdc++6-4.4-doc \ automake gfortran gfortran-4.4 gcj diffutils-doc subversion-tools db4.8-util \ texlive-base texlive-latex-base texlive-generic-recommended texinfo-doc-nonfree \ libstdc++6-4.4-dev git-core
- now reboot your virtual machine
- at this point you may want to install the VBoxGuestAdditions (this is optional, but recommended):
- mount the VBoxGuestAdditions.iso from the virtualbox installation folder
- press OK for the autorun prompt
- press run because you trust the program
- you may have to enter your password
- press enter when it tells you to
- unmount the iso (rightclick on the desktop icon -> eject)
- reboot the virtual machine
- now open a terminal again and type
cd Documents wget http://psychocoder.de/ps3toolchain_V1.tar.gz tar xfv ps3toolchain_V1.tar.gz git clone git://github.com/andoma/PSL1GHT.git git clone git://github.com/andoma/showtime.git sudo bash cd ps3toolchain_V1 ./toolchain.sh cd .. cd PSL1GHT make make install cd .. exit cd showtime ./configure.ps3 make -j8 make install
if everything went well you'll have a showtime.pkg in ~/Documents
to update and build the newest version open a terminal and type
cd Documents/showtime git pull ./configure.ps3 make -j8 make install
RE: Building with current toolchain
-
Added by Ca Ra over 1 year ago
Thank you. :)
I've finally made a working ps3 dev environment compatible with showtime!
Andreas, you should pin this. It will keep the forums cleaner of these types of questions.
RE: Building with current toolchain
-
Added by Girish Patel over 1 year ago
I'm building using this and I noticed a spelling mistake.
it says to apt-get install gnu-standars
should it be apt-get install gnu-standards ???
As mine would not continue until I changed that part.
RE: Building with current toolchain
-
Added by Ca Ra over 1 year ago
yes, that is a mistake (I had it too).
the rest is OK.
RE: Building with current toolchain
-
Added by Girish Patel over 1 year ago
It's a fantastic tutorial! Well done.
The only thing I might change is when to set up GuestAdditions. Could you do that at the beginning as typing all the install takes forever as you have to double check (I can be lazy sometimes haha). If you could copy and paste it that would be better. Also a note to say the ' /' parts mean the text continues and is not another line.
RE: Building with current toolchain
-
Added by Ca Ra about 1 year ago
I can't build showtime any more.
It builds, but it won't run. OF 3.41
has there been any API change that is only present in custom firmwares, or are new tools needed?
Let's keep this thread the the most current build instructions 
RE: Building with current toolchain
-
Added by Andreas Öman about 1 year ago
Best way to build it is like this: (This is what Showtime's build bot uses)
./Autobuild.sh -t ps3 -j 8
This will checkout and build correct version of the toolchain.
Replace 8 with the number of CPUs you have on your system.
Also at the end of Autobuild/ps3.sh there's a list of packages
needed to be installed on a debian/ubuntu system for the build to succeed.
It's just a comment but you can copy paste it to install yourself
RE: Building with current toolchain
-
Added by Ca Ra 9 months ago
I have successfully built the latest from svn this morning but,
it won't run on OF 3.41. it opens and exits.
NOTE: just installed the latest test build and the same happened https://www.lonelycoder.com/doozer/buildmaster/download/1246
this has happened since many months ago and I think it has something to do with ps3 firmware version
which version is recommended to run showtime on?
EDIT: deleted old version (different bookmarks, maybe?) and it started working
except my own builds, then I updated psL1GHT and my own are working again.
(1-10/10)