Solaris/OpenSolaris: Difference between revisions

From KDE Community Wiki
m (unfinished, need to check other prereqs)
Line 23: Line 23:
== Building KDE4 on OpenSolaris ==
== Building KDE4 on OpenSolaris ==


You will need a Nevada machine as well. Set up SunStudio 12 and patch it up as described on the [[KDE on Solaris]] page. Tar that up and then extract it on your OpenSolaris machine. This will give you /opt/SUNWspro. Leave that alone.
It is possible to build and install KDE4 on an OpenSolaris machine. It requires much more setup than on a Nevada or Solaris 10 system. You can skip at least some of the CBE setup, but you will have to install lots of other tools and headers. You need the Nevada machine (a VirtualBox will do) because you cannot install SunStudio 12 and patches on OpenSolaris; the available compiler on OpenSolaris (Sun Studio Express) '''does not work''' for KDE4.


=== Required development tools ===
=== Installing Tools ===


OpenSolaris ships without many of the development tools you will need. Start by installing development headers and tools:
Set up SunStudio 12 ('''not Studio Express''') and patch it up as described on the [[KDE on Solaris]] page. Tar that up and then extract it on your OpenSolaris machine. This will give you /opt/SUNWspro. Leave that alone.
 
You will also need to install more development tools with the following package installation command:
<code bash>
<code bash>
pfexec pkg install SUNWmercurial \
pfexec pkg install SUNWmercurial \
     SUNWgmake \
     SUNWgmake \
     SUNWcurl
     SUNWcurl
pfexec pkg install SUNWhea \
</code>
 
=== Installing Headers ===
 
OpenSolaris ships without many of the headers you will need, instead packaging them separately (like the -devel packages in Linux, but with less-consistent naming). You will need at least the following:
<code bash>pfexec pkg install SUNWhea \
     SUNWaudh \
     SUNWaudh \
     SUNWxorg-headers</code>
     SUNWxorg-headers</code>
Next, we'll create some directories for storing sources, binaries and other tools, then fetch sources for pkgtool (used to build SysV packages) and the KDE4 specfiles. Then we will build pkgtool and some of the tools for CBE (without the whole CBE).
 
=== Configuring Paths ===
 
For consistency, let's set up some standard directories in your home directory. Then we need to set up your build environment -- in this example by adding to your .bash_profile, but you may want to do that differently.
 
<code bash>
<code bash>
mkdir ~/src ~/bin ~/packages
mkdir ~/src ~/bin ~/packages
cd ~/src
cat >> ~/.bash_profile
hg clone http://solaris.bionicmutton.org/hg/kde4-specs-dev
PATH=/opt/SUNWspro/bin:/opt/dtbld/bin:$HOME/bin:$PATH
CC=/opt/SUNWspro/bin/cc
CXX=/opt/SUNWspro/bin/CC
MAKE=/usr/bin/gmake
export CC CXX MAKE
</code>
 
Don't worry that /opt/dtbld doesn't exist yet. We'll create it shortly. Note that we are adding the Studio12 paths to your environment and also ~/bin, which we will use to override some of the system path defaults.
 
=== Installing CBE Components ===
 
Next, we'll fetch sources for pkgtool and build it. The pkgtool program is used to build SysV packages and is part of the CBE (Common Build Environment). We won't be building all of the CBE, though.
<code bash>cd ~/src
wget http://ovh.dl.sourceforge.net/sourceforge/pkgbuild/pkgbuild-1.3.3.tar.bz2
wget http://ovh.dl.sourceforge.net/sourceforge/pkgbuild/pkgbuild-1.3.3.tar.bz2
gtar xvjf pkgbuild-1.3.3.tar.bz2
gtar xvjf pkgbuild-1.3.3.tar.bz2
cd pkgbuild-1.3.3
cd pkgbuild-1.3.3
./configure --prefix=/opt/dtbld
./configure --prefix=/opt/dtbld
# Lots of output snipped
make
# Not much output snipped
pfexec make install
pfexec chgrp bin /opt/dtbld/bin
# More output snipped
</code>
Check if /opt/dtbld/bin/pkgtool will run; for instance pkgtool --help should do the trick. You can remove ~/src/pkgbuild-1.3.3* now.
Next up we will install some other CBE components, using KDE's copy of their specfiles. We need to get the KDE specfile repository for this, though:
<code bash>cd ~/src
hg clone http://solaris.bionicmutton.org/hg/kde4-specs-dev
cd kde4-specs-dev/specs
gmake CBEcmake CBEyasm
</code>
</code>
This will build and install cmake 2.6.2 and yasm into /opt/dtbld. The cmake is newer than what CBE 1.7.0 will deliver; yasm is the same as CBE yasm.

Revision as of 14:57, 2 January 2009

KDE on OpenSolaris is like KDE on Solaris but with some extra setup steps. There are IPS packages available intermittently, when the KDE IPS package server is up (it's a VM at the end of a DSL line - see the archives of [email protected] to find it). Using OSOL as a build platform is possible, but you'll need at least one Nevada machine as well.

Installing KDE4 IPS packages

The current KDE4 IPS package server is the machine pkg in the domain bionicmutton.org; the IPS server runs on port 10000. This is a fairly standard IPS setup. The bionicmutton domain is Adriaan's and has been previously used to serve up SysV packages as well. The IPS server is in a VirtualBox at the end of a DSL line, so it's not necessarily up or fast. Eventually we will be moving to a more convention IPS repo like pending/ or contrib/.

First you need to set up a pkg authority to be able to get packages from bionicmutton at all. The first line creates the authority; the second fetches a catalog from it and the third checks that at least one of the packages can be found. Only the first is strictly necessary.

pfexec pkg set-authority \

   -O http://<host.domain>:10000/ bionicmutton

pfexec pkg refresh bionicmutton pkg search -r KDEgdm-integration

Remember that KDE includes setuid code. Remember that installing packages from untrusted and unsigned third parties is insecure. Remember that the KDE codebase is huge and not extensively tested on OpenSolaris yet. Consider whether you really want to install KDE4 on the machine you're working on. Then decide to do it anyway. You will need KDEbase-apps for things like Konqueror and Konsole, and KDEgdm-integration to be able to choose KDE as a session; other KDE packages may be installed as you need them (such as KDEpim, KDEgames, etc.). There is a KDEconsolidation package as well that pulls in everything we know of.

pfexec pkg install KDEbase-apps \

   KDEgdm-integration

After installing KDEgdm-integration, you should be able to log out and choose KDE as a session type from the login manager. Then you get a full KDE 4.1.3 desktop. On my machine with Radeon graphics it is very slow to start up and launch applications, but fairly fast after that. There is a discussion on performance tweaking on [email protected].

Please report problems to KDE bug tracker with Operating System set to "Solaris". Please check for duplicates [1] first.

Building KDE4 on OpenSolaris

It is possible to build and install KDE4 on an OpenSolaris machine. It requires much more setup than on a Nevada or Solaris 10 system. You can skip at least some of the CBE setup, but you will have to install lots of other tools and headers. You need the Nevada machine (a VirtualBox will do) because you cannot install SunStudio 12 and patches on OpenSolaris; the available compiler on OpenSolaris (Sun Studio Express) does not work for KDE4.

Installing Tools

Set up SunStudio 12 (not Studio Express) and patch it up as described on the KDE on Solaris page. Tar that up and then extract it on your OpenSolaris machine. This will give you /opt/SUNWspro. Leave that alone.

You will also need to install more development tools with the following package installation command: pfexec pkg install SUNWmercurial \

   SUNWgmake \
   SUNWcurl

Installing Headers

OpenSolaris ships without many of the headers you will need, instead packaging them separately (like the -devel packages in Linux, but with less-consistent naming). You will need at least the following: pfexec pkg install SUNWhea \

   SUNWaudh \
   SUNWxorg-headers

Configuring Paths

For consistency, let's set up some standard directories in your home directory. Then we need to set up your build environment -- in this example by adding to your .bash_profile, but you may want to do that differently.

mkdir ~/src ~/bin ~/packages cat >> ~/.bash_profile PATH=/opt/SUNWspro/bin:/opt/dtbld/bin:$HOME/bin:$PATH CC=/opt/SUNWspro/bin/cc CXX=/opt/SUNWspro/bin/CC MAKE=/usr/bin/gmake export CC CXX MAKE

Don't worry that /opt/dtbld doesn't exist yet. We'll create it shortly. Note that we are adding the Studio12 paths to your environment and also ~/bin, which we will use to override some of the system path defaults.

Installing CBE Components

Next, we'll fetch sources for pkgtool and build it. The pkgtool program is used to build SysV packages and is part of the CBE (Common Build Environment). We won't be building all of the CBE, though. cd ~/src wget http://ovh.dl.sourceforge.net/sourceforge/pkgbuild/pkgbuild-1.3.3.tar.bz2 gtar xvjf pkgbuild-1.3.3.tar.bz2 cd pkgbuild-1.3.3 ./configure --prefix=/opt/dtbld

  1. Lots of output snipped

make

  1. Not much output snipped

pfexec make install pfexec chgrp bin /opt/dtbld/bin

  1. More output snipped

Check if /opt/dtbld/bin/pkgtool will run; for instance pkgtool --help should do the trick. You can remove ~/src/pkgbuild-1.3.3* now.

Next up we will install some other CBE components, using KDE's copy of their specfiles. We need to get the KDE specfile repository for this, though: cd ~/src hg clone http://solaris.bionicmutton.org/hg/kde4-specs-dev cd kde4-specs-dev/specs gmake CBEcmake CBEyasm This will build and install cmake 2.6.2 and yasm into /opt/dtbld. The cmake is newer than what CBE 1.7.0 will deliver; yasm is the same as CBE yasm.