Building KDE 4.1.3 on OpenSolaris

OpenSolaris got improved a lot lately, it's no longer ignoring other people's partitions and it smoothly added Windows to grub menu at installation. Hope Linux and others will get same kind reception soon. 2008.11RC2 has almost all I need, but what is missing is a decent Desktop Environment - KDE. KD3 packages can be downloaded from Blastwave, I believe, but since this is already a dead project, it's not worth even trying. To get KDE4 one has to do some compiling, but once you know what to do, it's fairly simple:

Compiler:

This is the sorest spot. Gcc or Sun Studio Express (which are in the OpenSoraris repositories) lead to bizarre errors, largely ignored by the kde-solaris people, as they use Sun Studio 12. If you want to stay with the wolves, you have to howl with them .... so, SS12 must be found. To make it a bit more difficult, all the latest patches have to be applied to it. My lazy man's solution was to install Solaris 10 10/08 in VirtualBox. Inside Solaris 10 I then installed Sun Studio 12 (be sure to choose "Download Package Installer", so that it can be easily patched later).

Patching the compiler:

Menu - Applications - Utilities - Update Manager To use it a login and password is needed - recycle the registration for Solaris 10 or SS12 download. Then press Check for Updates and go for a short walk. Then select the updates, press Install Updates and go for a longer walk. (to be sure that I did not miss anything I updated everything, so I had to go for a walk twice)
(it's quite funny(or sad, depends on your POV) that the Update Manager's registration window is too big to fit a 1024x768 screen :-) It can be however workarounded by moving the bottom panel to the left edge of the screen)

As soon as everything was done, I tarbzipped the whole /opt/SUNWspro directory, moved it to OpenSolaris and unpacked again.


The below steps are in more or less detail given at the KDE on Solaris page, which should be always quite up-to-date.

First the Common Build Environment has to be downloaded. It's a set of tools used for building GNOME and similar goliaths:

cd ~ ; mkdir CBE1.7 ; cd CBE1.7
wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-x86.tar.bz2
tar xjf desktop-cbe-1.7.0-rc1-x86.tar.bz2
desktop-cbe-1.7.0-rc1/cbe-install
Default answers should suffice to all questions.

After this some packages have to be installed in order to enable the compilation, otherwise cryptic errors creep out:

pkg install SUNWarc (due to -xc99=lib support)
pkg install SUNWj6dev (for FOSSberkeley-db)
pkg install SUNWgnome-common-devel (for pkg-config)
pkg install SUNWcups (I simply failed to compile FOSScups)
pkg install SUNWmercurial (to download the sources)
pkg install SUNWperl-xml-parser (for FOSSsharedmimeinfo)

To compile FOSSnas a workaround for a bug is needed:

/usr/sfw/bin/wget http://xorg.freedesktop.org/archive/individual/util/xorg-cf-files-1.0.2.tar.bz2
/usr/bin/bunzip2 -cd xorg-cf-files-1.0.2.tar.bz2 | tar -xvf -
cd xorg-cf-files-1.0.2
pfexec cp X11.rules /usr/X11/lib/X11/config/
pfexec cp X11.tmpl /usr/X11/lib/X11/config/
pfexec cp xorg.cf /usr/X11/lib/X11/config/
pfexec cp xorgsite.def /usr/X11/lib/X11/config/
pfexec cp xorgversion.def /usr/X11/lib/X11/config/
pfexec cp xf86.rules /usr/X11/lib/X11/config/
pfexec cp xfree86.cf /usr/X11/lib/X11/config/
pfexec touch /usr/X11/lib/X11/config/date.def
pfexec touch /usr/X11/lib/X11/config/host.def
pfexec cp Imake.tmpl /usr/X11/lib/X11/config/ 

A PC with 1.5GB RAM and 512 MB swap got out of memory on some of the packages, so more swap was needed. As swapping into file is not supported on zfs, I had to increase the swap space:

swap -d /dev/zvol/dsk/rpool/swap
zfs set volsize=2G rpool/swap
swap -a /dev/zvol/dsk/rpool/swap
(original guide here)

Downoading KDE4 spec files:

cd ~ ; mkdir KDE4.X.x ; cd KDE4.X.x/
hg clone https://solaris.bionicmutton.org/hg/kde4-specs-dev
cd kde4-specs-dev/specs
And compiling:
. /opt/dtbld/bin/env.sh 
make

To add KDE into the gdm menu:

The file /usr/share/xsessions/kde.desktop must be created, with the below content:
[Desktop Entry]
Encoding=UTF-8
Name=KDE
Comment[en]=This session logs you into KDE
Exec=/opt/kde-4.1/bin/startkde
Icon=
Type=Application
KDE 4.1.3@OpenSolaris

I also met the below problems, hope they'll be fixed soon:

FOSSlibcdiowo and FOSSlibcdio fail, there's " ube: error: Illegal option to UBE: zla " in the log. A solution is to manually modify the file configure.sh in ~/packages/SOURCES/Solaris-LIBCDIOWO-0.78.2.tar.gz and ~/packages/SOURCES/Solaris-LIBCDIO-0.78.2.tar.gz and remove the unsupported option zla (zero length arrays):

--- Solaris.orig/configure.sh	2008-11-29 10:41:16.819618183 +0100
+++ Solaris/configure.sh	2008-11-29 12:17:22.334741748 +0100
@@ -12,11 +12,6 @@
     export CFLAGS="-xc99=%all ${CFLAGS}"
 fi
 
-good_cflags=`echo ${CFLAGS} | grep -- "-Wu,-zla"`
-if [ "x${good_cflags}" = "x" ] ; then
-    export CFLAGS="${CFLAGS} -Wu,-zla"
-fi
-
 good_cflags=`echo ${CFLAGS} | grep -- "-Xc"`
 if [ "x${good_cflags}" != "x" ] ; then
     export CFLAGS=`echo ${CFLAGS} | sed -e "s/-Xc//g"`

FOSSxine-lib fails, there's pkgbuild: "pp.c", line 26: error: cannot find include file: <postproc/postproces s.h> in the log. planar.61.diff from ~/packages/SOURCES/Solaris-XINE-LIB-1.1.10.tar.gz must be modified as follows:

Index: src/post/planar/pp.c
===================================================================
--- old/src/post/planar/pp.c    (revision 2848)
+++ new/src/post/planar/pp.c    (working copy)
@@ -23,7 +23,7 @@
 #include "xine_internal.h"
 #include "post.h"
 #include "xineutils.h"
-#include "postprocess.h"
+#include <ffmpeg/postproc/postprocess.h>
 #include <pthread.h>

 #define PP_STRING_SIZE 256 /\* size of pp mode string (including all options) \*/
FOSSxine-lib fails even after the fix. This time the log contains
pkgbuild: pkgbuild: File not found by glob: /var/tmp/pkgbuild-kdebuild/FOSSxine-lib-1.1.10-build/opt/foss/lib/xine/plugins/1.1.10/xineplug_vo_out_pgx32.so
pkgbuild: pkgbuild: File not found by glob: /var/tmp/pkgbuild-kdebuild/FOSSxine-lib-1.1.10-build/opt/foss/lib/xine/plugins/1.1.10/xineplug_vo_out_pgx64.so
PGX32 and PGX64 are some prehistoric video cards by Sun, I don't own them so I really did not investigate why they're not there and just removed the two lines from FOSSxine-libs.spec:
%{_libdir}/xine/plugins/1.1.10/xineplug_vo_out_pgx32.so
%{_libdir}/xine/plugins/1.1.10/xineplug_vo_out_pgx64.so

FOSSboost fails because the package with solaris patches uses different naming convention than the source one. It must be renamed:

wget http://solaris.bionicmutton.org/SRC/Solaris-BOOST-1.36.0.tar.gz -O ~/packages/SOURCES/Solaris-BOOST-1_36_0.tar.gz

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Members of the EMEA Globalization Center are blogging about the products that comprise the Java Enterprise System stack.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today