https://wiki.archlinux.org/api.php?action=feedcontributions&user=Tgc&feedformat=atomArchWiki - User contributions [en]2024-03-28T16:17:37ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Installing_Cell_Broadband_Engine_SDK&diff=41634Installing Cell Broadband Engine SDK2008-05-20T16:04:21Z<p>Tgc: </p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
The CBE SDK installation only supports the Fedora 7 or RHEL linux distributions. I managed to install it on my archlinux system with the help of [http://forums.gentoo.org/viewtopic-t-685982.html a post in the gentoo forum], and doing some trial/error.<br />
<br />
<br />
=Required Packages=<br />
<br />
All of the following required packages are provided by the pacman databases and the versions should be recent enough.<br />
<br />
Core repository:<br />
*gcc 4.x<br />
*glibc 2.4<br />
*perl 5.x<br />
*freeglut<br />
*gawk<br />
*bison<br />
*flex<br />
Extra repository:<br />
*rpmextract<br />
<br />
To make sure all of these are installed:<br />
# pacman -S gcc glibc perl freeglut gawk bison flex rpmextract<br />
<br />
<br />
The simulator requires tk and tcl in pre-8.5 versions, and compiled without thread support.<br />
<br />
====tcl/tk-8.4.x without threads====<br />
There are problems running the simulator when pthreads are enabled, so we need to build tcl/tk without threads. To do this, we create another dir in the /var/abs/local and make a new PKGBUILD.<br />
# mkdir /var/abs/local/tcl<br />
# cd /var/abs/local/tcl<br />
# nano -w PKGBUILD<br />
<br />
The PKGBUILD file (just the enable-threads in the ./configure should be eliminated from the original PKGBUILD file you can retrieve from ABS):<br />
<br />
# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $<br />
# Maintainer: dorphell <dorphell@archlinux.org><br />
# Committer: Judd Vinet <jvinet@zeroflux.org><br />
pkgname=tcl<br />
pkgver=8.4.19<br />
pkgrel=1<br />
pkgdesc="The Tcl scripting language"<br />
arch=('i686' 'x86_64')<br />
license=('custom')<br />
depends=(glibc)<br />
source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz)<br />
url="http://tcl.sourceforge.net/"<br />
md5sums=('ade2c033a7b545ee108f3fdfeb629fcf')<br />
<br />
build() {<br />
cd ${startdir}/src/tcl${pkgver}/unix<br />
if [ "$CARCH" = "x86_64" ]; then<br />
./configure --prefix=/usr --disable-threads --enable-64bit<br />
else ./configure --prefix=/usr --disable-threads --disable-64bit<br />
fi<br />
make || return 1<br />
make INSTALL_ROOT=${startdir}/pkg install install-private-headers<br />
ln -sf tclsh8.5 ${startdir}/pkg/usr/bin/tclsh<br />
# install license<br />
install -Dm644 ../license.terms $startdir/pkg/usr/share/licenses/$pkgname/LICENSE<br />
<br />
<br />
# remove buildroot traces / fixes #3602<br />
sed -i \<br />
-e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L/usr/lib," \<br />
-e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='/usr/include'," \<br />
-e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib," \<br />
-e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='/usr/lib," \<br />
-e "s,^TCL_LIB_FILE='libtcl8.5..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl8.5\$\{TCL_DBGX\}.so\"," \<br />
-e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:/usr/lib'," \<br />
-e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:/usr/lib'," \<br />
$startdir/pkg/usr/lib/tclConfig.sh<br />
}<br />
<br />
Make the non-threaded package and install it:<br />
# makepkg<br />
# pacman -U tcl-8.4.19-1.pkg.tar.gz<br />
If newer versions of tcl/tk become available, the non-threaded version will be overriden by the default threaded version. The new version and PKGBUILD from ABS can be adapted and installed in the same way or updates could be stopped by adding<br />
'IgnorePkg = tcl tk'<br />
to your /etc/pacman.conf file.<br />
<br />
<br />
=Installation=<br />
===Get ISOs and build the SDK===<br />
You'll have to download the two 3.0 SDK ISOs for Fedora 7 manually from [http://www.ibm.com/developerworks/power/cell/pkgdownloads.html?S_TACT=105AGX16&S_CMP=LP IBMs website, which requires free registration. Place them in a build folder, and get the [http://aur.archlinux.org/packages.php?ID=17060 cellsdk build files from the AUR], and place them in the same folder. Now the SDK is ready to be build, but you will have to do it as root because the PKGBUILD uses mount of loop-devices to extract packages from the ISOs. Build the SDK by running:<br />
sudo makepkg --asroot<br />
<br />
Now a cellsdk-3.0-1-x86_64.pkg.tar.gz should be ready for installation! Just run<br />
sudo pacman -A cellsdk-3.0-1-x86_64.pkg.tar.gz<br />
and now the SDK is installed and ready for use.<br />
<br />
=Running the Simulator=<br />
Go to /opt/ibm/systemsim-cell/run/cell/linux directory and type sudo ../run_gui.<br />
You can run without root by changing the owner and group.<br />
sudo chown -R /opt/ibm/systemsim-cell<br />
sudo chgrp -R /opt/ibm/systemsim-cell <br />
<br />
<br />
cd /opt/ibm/systemsim-cell/run/cell/linux<br />
../run_gui<br />
<br />
If it gives you some segmentation fault, that means you've forgotten to install the tcl/tk without pthread versions.<br />
<br />
=Problems=<br />
===Eclipse===<br />
The SDK contains plugins for Eclipse, but unfortunately they do not work for the Eclipse version currently in the archlinux repositories, so unless you install an older version of Eclipse, the plugins cannot be used. Instead consider using makefiles! There are some simple examples in the SDK which can be build on.<br />
<br />
===Other...===<br />
Since the PKGBUILD does not run the official install script there is bound to be something not setup completely correct... Place a comment on the [http://aur.archlinux.org/packages.php?ID=17060 cellsdk AUR page].</div>Tgchttps://wiki.archlinux.org/index.php?title=Installing_Cell_Broadband_Engine_SDK&diff=41633Installing Cell Broadband Engine SDK2008-05-20T15:55:46Z<p>Tgc: </p>
<hr />
<div>[[Category:Emulators (English)]]<br />
[[Category:HOWTOs (English)]]<br />
<br />
The CBE SDK installation only supports the Fedora 7 or RHEL linux distributions. I managed to install it on my archlinux system with the help of [http://forums.gentoo.org/viewtopic-t-685982.html a post in the gentoo forum], and doing some trial/error.<br />
<br />
<br />
=Required Packages=<br />
<br />
All of the following required packages are provided by the pacman databases and the versions should be recent enough.<br />
<br />
Core repository:<br />
*gcc 4.x<br />
*glibc 2.4<br />
*perl 5.x<br />
*freeglut<br />
*gawk<br />
*bison<br />
*flex<br />
Extra repository:<br />
*rpmextract<br />
<br />
To make sure all of these are installed:<br />
# pacman -S gcc glibc perl freeglut gawk bison flex rpmextract<br />
<br />
<br />
The simulator requires tk and tcl in pre-8.5 versions, and compiled without thread support.<br />
<br />
====tcl/tk-8.4.x without threads====<br />
There are problems running the simulator when pthreads are enabled, so we need to build tcl/tk without threads. To do this, we create another dir in the /var/abs/local and make a new PKGBUILD.<br />
# mkdir /var/abs/local/tcl<br />
# cd /var/abs/local/tcl<br />
# nano -w PKGBUILD<br />
<br />
The PKGBUILD file (just the enable-threads in the ./configure should be eliminated from the original PKGBUILD file you can retrieve from ABS):<br />
<br />
# $Id: PKGBUILD 356 2008-04-18 22:56:27Z aaron $<br />
# Maintainer: dorphell <dorphell@archlinux.org><br />
# Committer: Judd Vinet <jvinet@zeroflux.org><br />
pkgname=tcl<br />
pkgver=8.4.19<br />
pkgrel=1<br />
pkgdesc="The Tcl scripting language"<br />
arch=('i686' 'x86_64')<br />
license=('custom')<br />
depends=(glibc)<br />
source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz)<br />
url="http://tcl.sourceforge.net/"<br />
md5sums=('ade2c033a7b545ee108f3fdfeb629fcf')<br />
<br />
build() {<br />
cd ${startdir}/src/tcl${pkgver}/unix<br />
if [ "$CARCH" = "x86_64" ]; then<br />
./configure --prefix=/usr --disable-threads --enable-64bit<br />
else ./configure --prefix=/usr --disable-threads --disable-64bit<br />
fi<br />
make || return 1<br />
make INSTALL_ROOT=${startdir}/pkg install install-private-headers<br />
ln -sf tclsh8.5 ${startdir}/pkg/usr/bin/tclsh<br />
# install license<br />
install -Dm644 ../license.terms $startdir/pkg/usr/share/licenses/$pkgname/LICENSE<br />
<br />
<br />
# remove buildroot traces / fixes #3602<br />
sed -i \<br />
-e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L/usr/lib," \<br />
-e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='/usr/include'," \<br />
-e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib," \<br />
-e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='/usr/lib," \<br />
-e "s,^TCL_LIB_FILE='libtcl8.5..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl8.5\$\{TCL_DBGX\}.so\"," \<br />
-e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:/usr/lib'," \<br />
-e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:/usr/lib'," \<br />
$startdir/pkg/usr/lib/tclConfig.sh<br />
}<br />
<br />
Make the non-threaded package and install it:<br />
# makepkg<br />
# pacman -U tcl-8.4.19-1.pkg.tar.gz<br />
If newer versions of tcl/tk become available, the non-threaded version will be overriden by the default threaded version. The new version and PKGBUILD from ABS can be adapted and installed in the same way or updates could be stopped by adding<br />
'IgnorePkg = tcl tk'<br />
to your /etc/pacman.conf file.<br />
<br />
<br />
=Installation=<br />
===Get ISOs and build the SDK===<br />
You'll have to download the two 3.0 SDK ISOs for Fedora 7 manually from [http://www.ibm.com/developerworks/power/cell/pkgdownloads.html?S_TACT=105AGX16&S_CMP=LP IBMs website, which requires free registration. Place them in a build folder, and get the [http://aur.archlinux.org/packages.php?ID=17060 cellsdk build files from the AUR], and place them in the same folder. Now the SDK is ready to be build, but you will have to do it as root because the PKGBUILD uses mount of loop-devices to extract packages from the ISOs.<br />
makepkg --asroot<br />
<br />
Now a cellsdk-3.0-1-x86_64.pkg.tar.gz should be ready for installation! Just run<br />
pacman -A cellsdk-3.0-1-x86_64.pkg.tar.gz<br />
and now the SDK is installed and ready for use.<br />
<br />
=Running the Simulator=<br />
Go to /opt/IBM/systemsim-cell/run/cell/linux directory and type sudo ../run_gui.<br />
You can run without root by changing the owner and group.<br />
sudo chown -R /opt/ibm/systemsim-cell<br />
sudo chgrp -R /opt/ibm/systemsim-cell <br />
<br />
<br />
cd /opt/ibm/systemsim-cell/run/cell/linux<br />
../run_gui<br />
<br />
If it gives you some segmentation fault, that means you've forgotten to install the tcl/tk without pthread versions.</div>Tgc