Difference between revisions of "Projects/KDE on Solaris"

Jump to: navigation, search
(Compilation and Installation)
 
(91 intermediate revisions by 26 users not shown)
Line 1: Line 1:
Solaris (and [http://www.opensolaris.org/ OpenSolaris]) are Free Software operating systems released under the CDDL by Sun Microsystems. They are vaguely BSD-like. KDE4 runs on this operating system.
+
 
 +
 
 +
[http://www.oracle.com/technetwork/server-storage/solaris/overview/index.html Oracle Solaris 10] and [http://www.oracle.com/technetwork/server-storage/solaris11/overview/index.html Oracle Solaris 11 Express] are operating systems that are available for free. Read the [http://www.oracle.com/technetwork/licenses/solaris-cluster-express-license-167852.html Licensing Terms] for Oracle Solaris 10 and Oracle Solaris 11 Express.  IANAL, but the terms
 +
 
 +
<nowiki>LICENSE RIGHTS
 +
Except for any included software package or file that is licensed to you by Oracle under different license terms, we grant you a perpetual (unless terminated as provided in this agreement), nonexclusive, nontransferable, limited License to use the Programs only for the purpose of developing, testing, prototyping and demonstrating your applications, and not for any other purpose.</nowiki>
 +
 
 +
would appear to allow contribution of an individual to the KDE4 project.
 +
Make your own decision, or talk to your local Business legal representative...
 +
 
 +
In addition, [http://opensolaris.org OpenSolaris] was released under the CDDL, a FOSS license, by Sun Microsystems, but Oracle disbanded the open development of the project after acquiring Sun. Whilst Solaris has its roots in BSD, it is mostly SysV. Solaris 10 is certified UNIX [http://www.unix.org/single_unix_specification/ SUSv3]. KDE4 runs on this operating system.
  
 
The [http://www.opensolaris.org/os/project/kde/ KDE Project] on the OpenSolaris site is intended to be the definitive source of information, but this page on TechBase is intended to collect information, porting and compilation guides, etc. Since TechBase is a wiki, this is much easier than going through the OpenSolaris editing process.
 
The [http://www.opensolaris.org/os/project/kde/ KDE Project] on the OpenSolaris site is intended to be the definitive source of information, but this page on TechBase is intended to collect information, porting and compilation guides, etc. Since TechBase is a wiki, this is much easier than going through the OpenSolaris editing process.
  
'' Solaris '' and '' OpenSolaris '' are trademarks of Sun Microsystems, Inc.
+
'''Status:''' For an overview of the new issues, see the '''[[Projects/KDE_on_Solaris/KDE4_on_Solaris10_Status|KDE4.6.3 on Solaris 10 status]]''' page ('''Updated 05/17/2011'''), which lists the current status. The older '''[[Projects/KDE_on_Solaris/Status|the KDE4.4.1 on Solaris 10 status]]''' page, ('''Updated 03/04/2011''') lists dependencies, showstopper bugs and issues with dependencies.  Not much has happened on the S10 KDE4 front for a while. Trying to resurrect it again....
  
== Prerequisites ==
+
'''Oracle Solaris 11 Express nee OpenSolaris:''' Building on Oracle Solaris 11 Express/OpenSolaris is covered on the [[Projects/KDE_on_Solaris/OpenSolaris|OpenSolaris-specific page]].
  
You can use either Solaris 10 or Solaris Express
+
This page is concerned with instructions on how to build it all.
  
'''Solaris 10 '''
+
''' KDE4 v4.6.0 should be able to be built on Solaris 10 with SS12.2, though there are known issues the SS12.2 and CXX Templates among other bugs '''
Install Sun Studio 12.
+
Patch Sun Studio 12 with patch [http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&type=collections&max=50&language=en&queryKey5=124864&toDocument=yes    124864]
+
  
 +
'' Solaris '' and '' OpenSolaris '' are trademarks of Oracle.
  
'''Solaris Express  '''
+
== Scope ==
Solaris Express ships with ''Sun Studio Express '' instead of Sun Studio 12.
+
You should remove it and manually download/install Sun Studio 12.
+
Apply the required patch as mentioned in the section above
+
  
There is some confusion about which version(s) of Sun Studio 12 are '''really''' supported; it seems that SXDE 1/08 nv79 is the best version to have. Some (even newer) versions of the compile cause trouble when compiling the dependencies and KDE itself. That's for you to find out, though, and we appreciate hearing about bug reports.
+
This page is about KDE4 (the KDE 4.6.0 branch; we are aiming for having KDE4.6.0 fully functional) on Oracle Solaris S10U9 and Oracle Solaris 11 Express, running initially on x86 hardware, then supporting SPARC hardware and compiled with Sun Studio 12.2.
  
== Compilation and Installation ==
+
No other KDE releases, operating system versions, compiler version (ie, not Studio 11, 12 or Sun Studio Express) or hardware platforms are the target of this project, simply because the core contributors to the project do not have them or the time to work on them.
  
Getting KDE4 on your Solaris machine is a three step process:
+
That's not to say it will not necessarily work; people have and continue to contribute work for older hardware platforms (32-bit only like i386[P3/Athlon]). You can probably run the binaries produced by the project on other OpenSolaris releases, even OpenSolaris 2008.11 or 2009.06, but you're
 +
on your own.
  
* You need the tools with which we will build everything else. This is the KDE Build Environment, KBE. KBE is inspired by CBE. KBE packages are installed in the package category KBE. '''Long-term goal:''' Merge CBE and KBE again, make our build depend only on CBE.
+
On your own, that is, unless you register for Techbase and add your comments on  
* You need all of the dependencies for KDE. This is a lot of software and is held in the CVSDude SVN repository. The dependencies are all provided as RPM-style SPEC files and sources. The packages produced by this step are all called FOSS&lt;something&gt; and are in the category KCE. KCE lies between KBE and KDE, hence the name.
+
what needed doing and what was problematic somewhere below.
* You need KDE4 itself. This software is ''not'' packaged yet, but does install in /opt.
+
  
=== Getting the Sources ===
+
We are concentrating on 4.6.0. However since Oracle has not put xcb into the Xserver in Solaris 10 or Solaris 11 Express. (which is a minor addition to the X protocol, and minor functionality in KDE), there may be some problems related to this missing feature.
  
First, we need to get the sources to KBE and the KDE dependencies. These all live in an SVN repository called CVSDude (which is a SVN hosting company that the KDE-Solaris team pays for an account). But not all Solaris installations ''have'' SVN installed already.
+
The core team for KDE4 on Solaris is Adriaan de Groot, Lukas Oboril, Stefan Teleman. We'd like to thank Edward O'Callaghan, Ben Taylor and Mark Wright for their help in particular.
  
* If you do '''not''' have SVN installed, [[#KBE Sources|get the KBE tarball]], unpack it, [[#KBE Compilation and Installation|compile and install]]. After that, you will have SVN and can return here.
+
== Standard Environment Setup ==
* If you '''do''' have SVN installed,
+
  
=== KBE Sources ===
+
We don't have much in the way of documented KDE4 *use* on Solaris nor many reports of bugs found in daily use of the below KDE4 packages on http://bugs.kde.org/ .
 +
Thus we welcome any contributions though either bug reports, the repo or by email.
  
You can get [http://www.bionicmutton.org/solaris/KBE.tar.gz a tarball of KBE] and unpack that. Do this ''only'' if you do not already have SVN installed on your Solaris machine; it is normally in /usr/bin on OpenSolaris machines. As an example, you might use these commands:
+
=== Prerequisites ===
  
<code>/usr/sfw/bin/wget http://www.bionicmutton.org/solaris/KBE.tar.gz<br/>
+
{{warning|The Techbase documentation gets out of date quite quickly. Do not follow it blindly; step into the IRC channel or on to the mailing list for more details or help with issues.}}
/usr/sfw/bin/gtar xvzf KBE.tar.gz
+
</code>
+
  
This will give you a directory called KBE/ with all of the KBE bits and pieces in it. The KBE.tar.gz file is 64MB large and expands to about 80MB; disk space while compiling it is an additional 180MB and the installation in /opt is 90MB again.
+
Getting KDE4 on your Solaris machine requires the following:
  
=== KBE Compilation and Installation ===
+
* Solaris 10U9 or patch to it. 64-bit libraries like openssl is important enough to get it there, and we have a 64-bit libusb available. Initially, to restart the S10 project, only 32-bit compiles will be done to get a proof of concept.
  
SVN is included in KBE, which we need later. There is also make and cmake and other bits and pieces; vim is also included to soothe the nerves of vi-using KDE people like me.<blockquote><tt>cd KBE<br/>
+
* [http://opensolaris.org/os/project/jds/contributing/building/ CBE (Common Build Environment) 1.7.0] - tool chain to make pkgbuild work
bash kbe-install</tt></blockquote>
+
* A check out of the RPM-style SPEC files (they automagically grab the sources for you). - I'll show you as we go.
This script will install dependencies that KBE has which are on the Solaris install media (SUNWi2c and twenty others, I think). Then it will start building the packages for KBE itself, starting with pkgtool. It should go off without a hitch (otherwise post output to the mailing list). If it craps out somehow, you will have to start over from scratch: <blockquote><tt>pkgrm -Y KBE ; bash kbe-install</tt></blockquote>
+
* '''[http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html Sun Studio 12]''' - Packages if you have a support contract, tarfile if you don't. '''SS12 is preferable''' over SS12.2 due to bugs in SS12.2
  
Once KBE is done installing, you can check with <tt>pkginfo -c KBE </tt> to see what it has installed. You will have a <tt>/opt/kdebld</tt> filled with "stuff". Right. Now source the environment from KBE, which you will use in later steps:<blockquote><tt>. /opt/kdebld/bin/env.sh</tt></blockquote>
+
*[http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/studio12-update1-136165.html Sun Studio 12.1] - Packages if you have a support contract, tarfile if you don't.  
(Use <tt>source /opt/kdebld/bin/env.csh</tt> if that's your poison). If you don't have an env.sh at the end, something is definitely wrong. I end up with 210 or so files in <tt>/opt/kdebld/bin</tt>, so keep that in mind as a metric. There are 23 packages in the KBE group.
+
  
You can give <tt>kbe-install</tt> a <tt>--nodeps</tt> to avoid the SUNW packages that it wants to install. You ''do'' need to have Sun Studio 12 9/07 or later installed; any later patches are welcome as well (but see the [[#Prerequisites|prerequisites section]]). I do not know what avoiding the SUNW dependencies will do, actually: they don't really seem to be essential, but I would suggest skipping this step '''only''' if you don't have the install media handy.
+
* [http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html Oracle Studio 12.2] - Packages if you have a support contract, tarfile if you don't. see '''[http://techbase.kde.org/Projects/KDE_on_Solaris/Studio12.2_hallofshame Oracle SS12.2 Bugs]''' which cause problems for the KDE4 Solaris Project.
 +
* [http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index-jsp-136213.html The latest patches for SS12.2] -  *if you have a support contract*.
 +
* S10TLSmercurial - pkg download to be provided soon.  Can also use an old SXCE SUNWmercurial since it's all python except for a couple of libraries.
 +
* Solaris 10 [https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=Web-Stack-1.5-OTH-G-F@CDS-CDS_SMI Webstack 1.5]. Install mysql51 (for QT) and ruby18 (for KDEbindings) using the installer, as well as pfexec pkgadd -d sun-mysql51lib.pkg && pfexec pkgadd -d sun-apache22.  We need apache22 to get the Apache Portable Runtime until these may be ported into the FOSS infrastructure. Also, a late addition is Python2.6 (sun-python26) needed for KDEbindings and KDEsdk.
 +
* Fix /usr/include/python2.4/pyport.h
 +
* [http://www.opensound.com/download.cgi Open Sound System Drivers]
 +
* pkgrm SUNWpixman (for S10U8, FOSSxstuff replaces it with a fixed version)
 +
* ogl-select service needs to run for QT build ('svcadm enable ogl-select')
  
  
==== Using packages ====
+
==== Patching your System ====
  
There are SYSV packages for the parts of KBE available from bionicmutton.org, see [http://www.bionicmutton.org/solaris/ the index of packages] for details. You can get the packages from the individual links there or fetch all of them with wget as follows. For x86 / amd64 machines, use "x86" for <arch>, for SPARC machines use "SPARC".
+
You can use Solaris 10 update 9 (S10U9).  Unless you can get patches, it probably better just to start with S10U9, since anything else will be out of date by at least 18 months.
  
<code>
+
Using [http://www.par.univie.ac.at/solaris/pca Patch Check Advanced (PCA)] works well on S10 to handle patches for Solaris and Studio 12.2.  If you have a contract, you can get current, otherwise just deal with stock Studio 12.2 since the free Studio patches died with Sun.  Don't even bother with Solaris Update Manager.
/usr/sfw/bin/wget --recursive http://www.bionicmutton.org/solaris/KBE/<arch>/
+
</code>
+
  
Use pkgadd on each unpacked package to install it.
 
  
==== Getting help ====
+
'''Studio 12.2'''
 +
This installer requires a GUI so better learn to use ssh -X if not on the localhost.  On Solaris 10, there are about 5 patches out for SS12.2, so if you have a support contract, go for it. There are still some serious bugs in SS12.2, and you can help by registering with bugs.sun.com and voting for bugs that affect the Studio12.2 compiler and KDE dependencies (eigen, boost, templates).  You can vote for 3 bugs at any time, so if one has a higher priority for you, remove the vote for another bug and vote the one you want.
  
If <tt>kbe-install</tt> does not work, please pop into #kde-solaris on Freenode (irc.kde.org works) and ask questions.
+
There is a GUI for the package installer.  With the GUI, there are no patch options unless there are Solaris patches required to make the compiler work. I prefer to select to remove the Japanese and Chinese locales, for obvious reasons.  It's probably easier to just load from the tarball.
  
=== Dependencies ===
+
If you are running OSOL2008.11 or OSOL2008.05, then you will need to select
 +
the download Studio 12.2 *tarball* from the Oracle Studio Download site. 
  
KDE4 has a lot of dependencies. Without getting near to porting all of the optional dependencies for the first four KDE SVN modules, the KDE Solaris team has already done about 50 different Open Source packages. These need to be installed first before you can compile KDE4. The packages range from single header files to Qt 4.3.1, which is kind of big. All of the dependencies are distributed as SysV packages.
+
'''Solaris 10 '''
 +
Install [http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html Sun Studio 12.2].  
  
==== Getting spec files ====
+
==== Solaris 10 Python - Special info ====
  
The next part of the equation is getting all of the '''dependencies''' of KDE to build. These are numerous, multifarious, and huge. And at least one of them will break. It is a 3GB SVN checkout, at least (and will use about 6GB of disk space).
+
If you forget to fix /usr/include/python2.4/pyport.h, FOSSboost will fail as follows:
<code>
+
<syntaxhighlight lang="text">
$ . /opt/kdebld/bin/env.sh
+
vesta% tail /tmp/FOSSboost.log
$ nohup svn co https://svn2.cvsdude.com/kdesolaris/trunk Dude &
+
pkgbuild: + chmod 755 Solaris/patch.sh
$ tail -f nohup.out
+
pkgbuild: + bash -x ./Solaris/patch.sh boost
</code>
+
pkgbuild: + '[' '!' -f configure ']'
Find something to do while the SVN download runs. It takes a while. Probably you'll have to <code>$ pgrep -l svn; kill xxxx</code> and start the checkout again once or twice. When it's done, go to the SPECS.
+
pkgbuild: + echo '# Checking if pyport.h is sane ... must not redeclare gethostname.'
<code>$ cd Dude/SPECS</code>
+
pkgbuild: # Checking if pyport.h is sane ... must not redeclare gethostname.
 +
pkgbuild: + test -f /usr/include/python2.4/pyport.h
 +
pkgbuild: + grep '^extern int gethostname' /usr/include/python2.4/pyport.h
 +
pkgbuild: extern int gethostname(char *, int);
 +
pkgbuild: + exit 1
 +
pkgbuild: Bad exit status from /var/tmp/pkgbuild-edwardoc/pkgbuild-tmp-1.8081 (%prep)
 +
</syntaxhighlight>
  
In the <tt>SPECS/</tt> directory you will find a whole bunch of <tt>*.pspc</tt> files. These represent all the dependencies currently packagedSome of these may conflict with files and packages already sitting in your <tt>~/packages/</tt> directory, so it is safest to remove <tt>~/packages/BUILD/*</tt> and <tt>~/packages/SPECS/*</tt> and <tt>~/packages/SOURCES/*</tt> (but not the directories themselves).
+
{{warning|In /usr/include/python2.4/pyport.h , there's a gethostbyname prototype; it's wrongCommenting it out is sufficient as the make system will check for its presence with a bounded grep [ie, ^externt int gethostbyname]).
 +
The line reads as:
 +
extern int gethostname(char *, int);}}
  
The pspc files are "Pre-SPEC files", meaning that they need to be processed in order to produce the .spec files that pkgtool understands. We do this for two reasons:
+
==== SNV_(97<->103) - Special info ====
* The build and install sequence for each package is the same; all the logic lives in the <tt>Solaris/</tt> directory of each source tarball.
+
* We need to create 32- and 64-bit spec files which are almost alike anyway.
+
  
==== Patching your System ====
+
{{warning|If you would like to build FOSSnas as a dep, It will fail unless you copy the following files into /usr/X11/lib/X11/config/ More info here; cat /tmp/FOSSnas.log }}
  
Boost, one of the dependencies, builds Python bindings, and the Python headers installed by the system Python package are broken. So you will have to edit them as root to fix this. Fortunately it will take a while before Boost gets there, so start the make process and then an editor. In <tt>/usr/include/python2.4/pyport.h</tt> there is a <tt>gethostname()</tt> prototype that must be commented out. Or get a [http://www.bionicmutton.org/solaris/pyport.h good copy of pyport.h] here.
+
* Fixed in SNV103: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6763798
  
==== Compilation ====
+
* Here is a workaround:
  
You will have to source the environment from KBE and then run make in the <tt>Dude/SPECS</tt> folder:
+
[edward@SXCE-Workstation]:/export/home/edward:~>uname -sv
<code>$ cd Dude/SPECS; nohup time make & tail -f nohup.out</code>
+
SunOS snv_99
That will start building all of the packages, one by one. For each package, the perl script <tt>Respect.pl</tt> is used to create the <tt>.spec</tt> files and tar up the source directory which you have checked out of SVN. Then pkgtool is used to build the resulting packages (both 32- and 64-bit if your hardware supports it). Typical output from '''one''' package looks like this:
+
  
<code>perl Respect.pl --with-all --without-upload --without-build flac
+
If you don't do this step you will end up with the following error : "FOSSnas |     FAILED | pkgbuild build failed"
Respect: Reading pspc file flac ...
+
Respect: Reading pspc file flac ...
+
Respect: Creating spec file flac.spec ...
+
Respect: Checking consistency ...
+
Respect: Creating spec file flac.spec ...
+
Respect: Warning - no dependency packages specified.
+
Respect: Installing replacement libtool ...
+
Respect: Creating source tarball ...
+
Respect: Copying tarball to packages/SOURCES ...
+
Respect: Skipping upload of tarball.
+
Respect:    Use --with-upload to enable.
+
Respect: Skipping package build.
+
Respect:    Use --with-build to enable.
+
pkginfo -q "FOSSflac" || pkgtool build "FOSSflac.spec"
+
INFO: Copying %use'd or %include'd spec files to SPECS directory
+
INFO: Processing spec files
+
INFO: Finding sources
+
INFO: Running pkgbuild -ba [...] FOSSflac.spec (FOSSflac)</code>
+
  
 +
/usr/sfw/bin/wget http://xorg.freedesktop.org/archive/individual/util/xorg-cf-files-1.0.2.tar.bz2
  
If a package build fails, there will be a <tt>/tmp/FOSS*.log</tt> file explaining what went wrong. If configure fails in these packages, look for <tt>/tmp/config.log</tt> as well. Unfortunately pkgtool seems to destroy the build results directory even when it fails; you may also be able to look into <tt>~/packages/BUILD/</tt> to find the directory where things were building.
+
/usr/bin/bunzip2 -cd xorg-cf-files-1.0.2.tar.bz2 | tar -xvf -
  
==== Compiling by hand ====
+
cd xorg-cf-files-1.0.2
  
You may want to work on a single pspc file or a single package by hand. Respect.pl has a whole bunch of options, but what you will most commonly do is create .spec files, create a tarball, build and install the package. This is straightforward:<code>perl Respect.pl --with-all --without-upload pspc-file</code>
+
* pfexec cp X11.rules /usr/X11/lib/X11/config/
If you forget the <tt>--without-upload</tt>, it will try uploading the resulting package to bionicmutton, which probably is not what you want.
+
* 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/
  
==== Using packages ====
+
==== Setting up CBE 1.7RC1 ====
  
You can get packages from bionicmutton.org just as you can for KBE. Use
+
N.B. Please check if a later version is out in : http://dlc.sun.com/osol/jds/downloads/cbe/
  
<code>
+
cd ~ ; mkdir CBE1.7 ; cd CBE1.7
/usr/sfw/bin/wget --recursive http://www.bionicmutton.org/solaris/FOSS/<arch>
+
</code>
+
  
==== Getting help ====
+
* x86/x64:
 +
/usr/sfw/bin/wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-x86.tar.bz2
  
As usual, the IRC channel is a good place to start, but you must be able to pastebin compilation errors in order to get any help.
+
/usr/bin/bunzip2 -cd desktop-cbe-1.7.0-rc1-x86.tar.bz2 | tar -xvf -
  
=== Removing FOSS* packages ===
+
* SPARC:
If you want to remove the packages, run
+
/usr/sfw/bin/wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-sparc.tar.bz2
" for i in 1 2 3 4 ; do yes | pfexec pkgrm -Y KCE ; done "
+
  
=== KDE4 Proper ===
+
/usr/bin/bunzip2 -cd desktop-cbe-1.7.0-rc1-sparc.tar.bz2 | tar -xvf -
  
KDE4 still builds out of KDE SVN. We have a setup that applies a handful of Solaris-specific patches to the code and then builds everything. We don't use kdesvn-build yet, but probably should when there are no external patches left.
+
`cd` in and follow the README/INSTALL file.
  
==== Setting up an SVN checkout ====
+
{{warning|If you didn't tell CBE where you want to build the code, it will try to put it under /opt/dtbld.  That really won't work because /opt/dtbld is owned by root.  Modify ~/.pkgbuildmacros and fix %_topdir to some writable directory that you want to build the code in. Most folks use ~/packages.  You can also route the BUILD logs to a directory specified by: ~/.pkgtoolrc and tell "logdir:" where to put it. (~/packages/BUILDLOGS seems reasonable)}}
  
Get a checkout of KDE SVN trunk, like so:<blockquote><tt>/opt/kdebld/bin/svn co svn://anonsvn.kde.org/home/kde/trunk/KDE</tt></blockquote>That's a huge checkout. Remember where you put it.
+
== Getting KDE4-SPEC's (Release) ==
  
==== Using the build system ====
+
Simply;
 +
cd ~ ; mkdir KDE4 ; cd KDE4/
  
The build system lives in CVSDude SVN, so you need to check it out as well:<blockquote><tt>/opt/kdebld/bin/svn co https://svn2.cvsdude.com/kdesolaris/trunk/Build</tt></blockquote>
+
hg clone https://solaris.bionicmutton.org/hg/kde4-specs
Now is probably the right time to source <tt>/opt/kdebld/bin/env.sh</tt> again. Notice that <tt>Build/</tt> just contains Makefiles. Everything here is driven by (GNU) make.
+
* If you don't like using mercurial at all, you can get the tarball here; http://solaris.bionicmutton.org/hg/kde4-specs/archive/tip.tar.gz
  
Configuration is stored in <tt>Makefile.config</tt> and you can override most of that in a file <tt>Makefile.config.local</tt>. The contents of my local configuration file are as follows:<code>KDESVN_DIR=/export/home/adridg/KDE
+
== Getting KDE4-SPEC's-460 (Unstable Testing/Development) ==
DESTRUCTIVE_UNPACK=YES</code>That ought to be self-explanitory: I have the KDE SVN checkout under <tt>~/KDE</tt>.
+
  
A good trial run is of the kdesupport SVN module, so run <tt>make -f Makefile.kdesupport</tt>
+
Simply;
  
==== Getting help ====
+
cd ~ ; mkdir KDE4.X.x ; cd KDE4.X.x/
  
The IRC channel is never too busy.
+
hg clone https://solaris.bionicmutton.org/hg/kde4-specs-460
#kde-solaris on irc.freenode.net
+
* If you don't like using mercurial at all, you can get the tarball here; http://solaris.bionicmutton.org/hg/kde4-specs-460/archive/tip.tar.gz
  
== To-Do/Known Issues ==
+
N.B. The above is also for contributing back (which this mail message is all about). The *-specs-dev repo is public and writable (over https).
 +
So we welcome you too can push fixes back on to it; A review will happen before things end up in *-specs.
  
KDE4 on Solaris is not done yet. Not by a long shot. Most of the time it compiles, but there is much cleaning up of the codebase and dependencies to do. We list them here:
+
== KDE4 Compilation and Installation of (Stable) ==
 +
 
 +
cd kde4-specs/ ; hg up ; cd specs/
 +
 
 +
more README
 +
* Read though and take note of anything important you may need to know since this was last updated.
 +
 
 +
/opt/dtbld/bin/env.sh
 +
* Note: This command will start a subshell. Be careful, because environment variables (notably PATH) set in your shell startup files will override those set up by this command.
 +
 
 +
make rebuild-CBEcmake rebuild-CBEyasm
 +
* This updates cmake from the CBE base because there are some Solaris/Studio 12 fixes there in the updated package.
 +
 
 +
make build-KDEconsolidation
 +
 
 +
This will now go off and build KDE4 and anything else needed as SysV packages. Come back in about 24h depending on your hardware.
 +
 
 +
=== What to expect after a Clean Build ===
 +
                        FOSSnas |      PASSED |
 +
                    FOSSncurses |      PASSED |
 +
                    FOSSopencdk |      PASSED |
 +
                    FOSSopenldap |      PASSED |
 +
                        FOSSpcre |      PASSED |
 +
                      FOSSphonon |      PASSED |
 +
                FOSSqimageblitz |      PASSED |
 +
                          FOSSqt |      PASSED |
 +
                    FOSSreadline |      PASSED |
 +
                    FOSSsoprano |      PASSED |
 +
                      FOSSsqlite |      PASSED |
 +
                      FOSSstdcxx |      PASSED |
 +
                      FOSSstrigi |      PASSED |
 +
                      FOSSxprop |      PASSED |
 +
                    KDEbase-apps |      PASSED |
 +
                KDEbase-runtime |      PASSED |
 +
              KDEbase-workspace |      PASSED |
 +
              KDEdt-integration |      PASSED |
 +
                        KDElibs |      PASSED |
 +
                          KDEpim |      PASSED |
 +
                      KDEpimlibs |      PASSED |
 +
                          KDEsdk |      PASSED |
 +
                  FOSSlibiconvwo |      PASSED |
 +
                  FOSSgettextwo |      PASSED |
 +
                FOSScyrus-saslwo |      PASSED |
 +
            FOSSmit-kerberos5wo |      PASSED |
 +
                  FOSSopenldapwo |      PASSED |
 +
 
 +
== Getting help ==
 +
 
 +
As usual, the IRC channel is a good place to start, but you must be able to pastebin compilation errors in order to get any help.
 +
The IRC channel is never too busy.
 +
<nowiki>#</nowiki>kde-solaris4 on irc.freenode.net . However, keep in mind that IRC is a live medium and it may not be the best place to ask questions. The mailing list kde-discuss at opensolaris.org is much more patient.
  
* iconv_open fails in all Qt applications; it '''looks''' like it is trying a non-existent encoding -- but why? This appeared on Nevada build 70b, but not on Nevada 79b. That's weird :(
+
Also, you are expected to do your homework. Compiling KDE4 on Solaris is not for the faint of heart and you '''really''' need to know your way around compiling stuff and dealing with system software installation.
*glew, freeglut - we have to build our own Mesa (libGLU.so), because in Nevada build is libGLU linked with libgcc and libstdc++. That's very bad.
+
*gnutls - build issue in gnutls-extra lib
+
*ffmpeg - many build issues in different stages for 64bit or 32bit.
+
  
  
Those tools aren't possible to build at this time. I'm still working on. keep tuned.
+
== Binary Packages ==
  
luc^
+
No binary packages for KDE4 for Solaris 10 currently

Latest revision as of 10:54, 15 July 2012


Oracle Solaris 10 and Oracle Solaris 11 Express are operating systems that are available for free. Read the Licensing Terms for Oracle Solaris 10 and Oracle Solaris 11 Express. IANAL, but the terms

LICENSE RIGHTS Except for any included software package or file that is licensed to you by Oracle under different license terms, we grant you a perpetual (unless terminated as provided in this agreement), nonexclusive, nontransferable, limited License to use the Programs only for the purpose of developing, testing, prototyping and demonstrating your applications, and not for any other purpose.

would appear to allow contribution of an individual to the KDE4 project. Make your own decision, or talk to your local Business legal representative...

In addition, OpenSolaris was released under the CDDL, a FOSS license, by Sun Microsystems, but Oracle disbanded the open development of the project after acquiring Sun. Whilst Solaris has its roots in BSD, it is mostly SysV. Solaris 10 is certified UNIX SUSv3. KDE4 runs on this operating system.

The KDE Project on the OpenSolaris site is intended to be the definitive source of information, but this page on TechBase is intended to collect information, porting and compilation guides, etc. Since TechBase is a wiki, this is much easier than going through the OpenSolaris editing process.

Status: For an overview of the new issues, see the KDE4.6.3 on Solaris 10 status page (Updated 05/17/2011), which lists the current status. The older the KDE4.4.1 on Solaris 10 status page, (Updated 03/04/2011) lists dependencies, showstopper bugs and issues with dependencies. Not much has happened on the S10 KDE4 front for a while. Trying to resurrect it again....

Oracle Solaris 11 Express nee OpenSolaris: Building on Oracle Solaris 11 Express/OpenSolaris is covered on the OpenSolaris-specific page.

This page is concerned with instructions on how to build it all.

KDE4 v4.6.0 should be able to be built on Solaris 10 with SS12.2, though there are known issues the SS12.2 and CXX Templates among other bugs

Solaris and OpenSolaris are trademarks of Oracle.

Contents

[edit] Scope

This page is about KDE4 (the KDE 4.6.0 branch; we are aiming for having KDE4.6.0 fully functional) on Oracle Solaris S10U9 and Oracle Solaris 11 Express, running initially on x86 hardware, then supporting SPARC hardware and compiled with Sun Studio 12.2.

No other KDE releases, operating system versions, compiler version (ie, not Studio 11, 12 or Sun Studio Express) or hardware platforms are the target of this project, simply because the core contributors to the project do not have them or the time to work on them.

That's not to say it will not necessarily work; people have and continue to contribute work for older hardware platforms (32-bit only like i386[P3/Athlon]). You can probably run the binaries produced by the project on other OpenSolaris releases, even OpenSolaris 2008.11 or 2009.06, but you're on your own.

On your own, that is, unless you register for Techbase and add your comments on what needed doing and what was problematic somewhere below.

We are concentrating on 4.6.0. However since Oracle has not put xcb into the Xserver in Solaris 10 or Solaris 11 Express. (which is a minor addition to the X protocol, and minor functionality in KDE), there may be some problems related to this missing feature.

The core team for KDE4 on Solaris is Adriaan de Groot, Lukas Oboril, Stefan Teleman. We'd like to thank Edward O'Callaghan, Ben Taylor and Mark Wright for their help in particular.

[edit] Standard Environment Setup

We don't have much in the way of documented KDE4 *use* on Solaris nor many reports of bugs found in daily use of the below KDE4 packages on http://bugs.kde.org/ . Thus we welcome any contributions though either bug reports, the repo or by email.

[edit] Prerequisites

noframe
 
Warning
The Techbase documentation gets out of date quite quickly. Do not follow it blindly; step into the IRC channel or on to the mailing list for more details or help with issues.


Getting KDE4 on your Solaris machine requires the following:

  • Solaris 10U9 or patch to it. 64-bit libraries like openssl is important enough to get it there, and we have a 64-bit libusb available. Initially, to restart the S10 project, only 32-bit compiles will be done to get a proof of concept.
  • CBE (Common Build Environment) 1.7.0 - tool chain to make pkgbuild work
  • A check out of the RPM-style SPEC files (they automagically grab the sources for you). - I'll show you as we go.
  • Sun Studio 12 - Packages if you have a support contract, tarfile if you don't. SS12 is preferable over SS12.2 due to bugs in SS12.2
  • Sun Studio 12.1 - Packages if you have a support contract, tarfile if you don't.
  • Oracle Studio 12.2 - Packages if you have a support contract, tarfile if you don't. see Oracle SS12.2 Bugs which cause problems for the KDE4 Solaris Project.
  • The latest patches for SS12.2 - *if you have a support contract*.
  • S10TLSmercurial - pkg download to be provided soon. Can also use an old SXCE SUNWmercurial since it's all python except for a couple of libraries.
  • Solaris 10 Webstack 1.5. Install mysql51 (for QT) and ruby18 (for KDEbindings) using the installer, as well as pfexec pkgadd -d sun-mysql51lib.pkg && pfexec pkgadd -d sun-apache22. We need apache22 to get the Apache Portable Runtime until these may be ported into the FOSS infrastructure. Also, a late addition is Python2.6 (sun-python26) needed for KDEbindings and KDEsdk.
  • Fix /usr/include/python2.4/pyport.h
  • Open Sound System Drivers
  • pkgrm SUNWpixman (for S10U8, FOSSxstuff replaces it with a fixed version)
  • ogl-select service needs to run for QT build ('svcadm enable ogl-select')


[edit] Patching your System

You can use Solaris 10 update 9 (S10U9). Unless you can get patches, it probably better just to start with S10U9, since anything else will be out of date by at least 18 months.

Using Patch Check Advanced (PCA) works well on S10 to handle patches for Solaris and Studio 12.2. If you have a contract, you can get current, otherwise just deal with stock Studio 12.2 since the free Studio patches died with Sun. Don't even bother with Solaris Update Manager.


Studio 12.2 This installer requires a GUI so better learn to use ssh -X if not on the localhost. On Solaris 10, there are about 5 patches out for SS12.2, so if you have a support contract, go for it. There are still some serious bugs in SS12.2, and you can help by registering with bugs.sun.com and voting for bugs that affect the Studio12.2 compiler and KDE dependencies (eigen, boost, templates). You can vote for 3 bugs at any time, so if one has a higher priority for you, remove the vote for another bug and vote the one you want.

There is a GUI for the package installer. With the GUI, there are no patch options unless there are Solaris patches required to make the compiler work. I prefer to select to remove the Japanese and Chinese locales, for obvious reasons. It's probably easier to just load from the tarball.

If you are running OSOL2008.11 or OSOL2008.05, then you will need to select the download Studio 12.2 *tarball* from the Oracle Studio Download site.

Solaris 10 Install Sun Studio 12.2.

[edit] Solaris 10 Python - Special info

If you forget to fix /usr/include/python2.4/pyport.h, FOSSboost will fail as follows:

vesta% tail /tmp/FOSSboost.log 
pkgbuild: + chmod 755 Solaris/patch.sh
pkgbuild: + bash -x ./Solaris/patch.sh boost
pkgbuild: + '[' '!' -f configure ']'
pkgbuild: + echo '# Checking if pyport.h is sane ... must not redeclare gethostname.'
pkgbuild: # Checking if pyport.h is sane ... must not redeclare gethostname.
pkgbuild: + test -f /usr/include/python2.4/pyport.h
pkgbuild: + grep '^extern int gethostname' /usr/include/python2.4/pyport.h
pkgbuild: extern int gethostname(char *, int);
pkgbuild: + exit 1
pkgbuild: Bad exit status from /var/tmp/pkgbuild-edwardoc/pkgbuild-tmp-1.8081 (%prep)
noframe
 
Warning
In /usr/include/python2.4/pyport.h , there's a gethostbyname prototype; it's wrong. Commenting it out is sufficient as the make system will check for its presence with a bounded grep [ie, ^externt int gethostbyname]).

The line reads as:

extern int gethostname(char *, int);


[edit] SNV_(97<->103) - Special info

noframe
 
Warning
If you would like to build FOSSnas as a dep, It will fail unless you copy the following files into /usr/X11/lib/X11/config/ More info here; cat /tmp/FOSSnas.log


* Fixed in SNV103: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6763798
* Here is a workaround:

[edward@SXCE-Workstation]:/export/home/edward:~>uname -sv SunOS snv_99

If you don't do this step you will end up with the following error : "FOSSnas | FAILED | pkgbuild build failed"

/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/

[edit] Setting up CBE 1.7RC1

N.B. Please check if a later version is out in : http://dlc.sun.com/osol/jds/downloads/cbe/

cd ~ ; mkdir CBE1.7 ; cd CBE1.7

  • x86/x64:

/usr/sfw/bin/wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-x86.tar.bz2

/usr/bin/bunzip2 -cd desktop-cbe-1.7.0-rc1-x86.tar.bz2 | tar -xvf -

  • SPARC:

/usr/sfw/bin/wget http://dlc.sun.com/osol/jds/downloads/cbe/test/desktop-cbe-1.7.0-rc1-sparc.tar.bz2

/usr/bin/bunzip2 -cd desktop-cbe-1.7.0-rc1-sparc.tar.bz2 | tar -xvf -

`cd` in and follow the README/INSTALL file.

noframe
 
Warning
If you didn't tell CBE where you want to build the code, it will try to put it under /opt/dtbld. That really won't work because /opt/dtbld is owned by root. Modify ~/.pkgbuildmacros and fix %_topdir to some writable directory that you want to build the code in. Most folks use ~/packages. You can also route the BUILD logs to a directory specified by: ~/.pkgtoolrc and tell "logdir:" where to put it. (~/packages/BUILDLOGS seems reasonable)


[edit] Getting KDE4-SPEC's (Release)

Simply; cd ~ ; mkdir KDE4 ; cd KDE4/

hg clone https://solaris.bionicmutton.org/hg/kde4-specs

[edit] Getting KDE4-SPEC's-460 (Unstable Testing/Development)

Simply;

cd ~ ; mkdir KDE4.X.x ; cd KDE4.X.x/

hg clone https://solaris.bionicmutton.org/hg/kde4-specs-460

N.B. The above is also for contributing back (which this mail message is all about). The *-specs-dev repo is public and writable (over https). So we welcome you too can push fixes back on to it; A review will happen before things end up in *-specs.

[edit] KDE4 Compilation and Installation of (Stable)

cd kde4-specs/ ; hg up ; cd specs/

more README

  • Read though and take note of anything important you may need to know since this was last updated.

/opt/dtbld/bin/env.sh

  • Note: This command will start a subshell. Be careful, because environment variables (notably PATH) set in your shell startup files will override those set up by this command.

make rebuild-CBEcmake rebuild-CBEyasm

  • This updates cmake from the CBE base because there are some Solaris/Studio 12 fixes there in the updated package.

make build-KDEconsolidation

This will now go off and build KDE4 and anything else needed as SysV packages. Come back in about 24h depending on your hardware.

[edit] What to expect after a Clean Build

                        FOSSnas |      PASSED |
                    FOSSncurses |      PASSED |
                    FOSSopencdk |      PASSED |
                   FOSSopenldap |      PASSED |
                       FOSSpcre |      PASSED |
                     FOSSphonon |      PASSED |
                FOSSqimageblitz |      PASSED |
                         FOSSqt |      PASSED |
                   FOSSreadline |      PASSED |
                    FOSSsoprano |      PASSED |
                     FOSSsqlite |      PASSED |
                     FOSSstdcxx |      PASSED |
                     FOSSstrigi |      PASSED |
                      FOSSxprop |      PASSED |
                   KDEbase-apps |      PASSED |
                KDEbase-runtime |      PASSED |
              KDEbase-workspace |      PASSED |
              KDEdt-integration |      PASSED |
                        KDElibs |      PASSED |
                         KDEpim |      PASSED |
                     KDEpimlibs |      PASSED |
                         KDEsdk |      PASSED |
                 FOSSlibiconvwo |      PASSED |
                  FOSSgettextwo |      PASSED |
               FOSScyrus-saslwo |      PASSED |
            FOSSmit-kerberos5wo |      PASSED |
                 FOSSopenldapwo |      PASSED |

[edit] Getting help

As usual, the IRC channel is a good place to start, but you must be able to pastebin compilation errors in order to get any help. The IRC channel is never too busy. #kde-solaris4 on irc.freenode.net . However, keep in mind that IRC is a live medium and it may not be the best place to ask questions. The mailing list kde-discuss at opensolaris.org is much more patient.

Also, you are expected to do your homework. Compiling KDE4 on Solaris is not for the faint of heart and you really need to know your way around compiling stuff and dealing with system software installation.


[edit] Binary Packages

No binary packages for KDE4 for Solaris 10 currently


This page was last modified on 15 July 2012, at 10:54. This page has been accessed 55,330 times. Content is available under Creative Commons License SA 3.0 as well as the GNU Free Documentation License 1.2.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal