Menu

SolarisBuild

Jon Trulson Ulrich Wilkens
We are currently requesting that all contributions to the project are licenced under the MIT licence. Find out why?

WARNING: THIS GUIDE IS FOR ADVANCED USERS FOR USE IN BUILDING AND PORTING.

Note: This has not been tested with CDE versions 2.4.0a+ (autoconf) and may not work.

Note: This port has been tested on Solaris 11. Older Solaris releases are not supported.
They have Sun-CDE out of the box.


Table of Contents

Build Prerequisites

Supported Platforms

The initial Solaris port only supports 64-bit x86 systems.

Install Dependencies

Install the following packages:

  • developer/versioning/git
  • group/system/solaris-desktop
  • developer/gcc-45
  • system/header
  • developer/macro/gnu-m4
  • text/locale
  • system/locale/extra
  • x11/trusted/trusted-xorg
  • developer/build/autoconf
  • developer/build/automake-110
  • developer/build/libtool

Additional Preparations

  • add /usr/gnu/bin to your PATH variable:

    PATH=$PATH:/usr/gnu/bin
    
  • add /opt/solarisstudio/bin to your PATH variable (optional):

    PATH=$PATH:/opt/solarisstudio/bin
    

Run the following commands as root:

  • add your hostname to the localhost line in /etc/hosts or add a new line with hostname and ip address. NOTE: This should not be needed for CDE versions 2.3 and above.

  • create symlinks:

    ln -s /usr/bin/gcc /usr/bin/cc
    ln -s /opt/solarisstudio12.3 /opt/solarisstudio  (optional)
  • configure runtime linking environment:
    crle -u -l /usr/gnu/lib
    crle -u -l /usr/X11/lib
    crle -64 -u -l /usr/gnu/lib/amd64
    crle -64 -u -l /usr/X11/lib/amd64
  • change LANG varaible:
    svccfg -s svc:/system/environment:init setprop environment/LANG=C
    svccfg -s svc:/system/environment:init setprop environment/LC_ALL=C
    svccfg -s svc:/system/environment:init setprop environment/LC_CTYPE=C
    svcadm refresh svc:/system/environment:init
  • reboot the system

Installation of Motif

Build Motif from source!

cd motif-2.3.4
./autogen.sh
make
sudo make install


Compiling

Get the CDE source code

Use the git clone command here:

On most platform you can use HTTPS:

git clone https://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code

If that doesn't work (for instance some BSD distros) , use the native git protocol instead

git clone git://git.code.sf.net/p/cdesktopenv/code cdesktopenv-code

Or download the latest source release:

Note: The source archive will become out of date. When you want the latest code, clone the git repository.


The X11 library headers need to be symlinked into the build tree.
Be careful of capitalisation of 'x' and 'X' here.

(Replace /path/to/ with the path to the location of your source tree.)

cd /path/to/cdesktopenv-code/cde
mkdir -p imports/x11/include
cd imports/x11/include
ln -s /usr/include/X11 .
ln -s /usr/X11/include/Xm .


Supported Compilers

The port supports either gcc or Solaris Studio compiler. gcc is the default and must be installed (see 1.2).
But it is also possible to install Solaris Studio and to activate it for CDE by adding the following line
to /path/to/cdesktopenv-code/cde/config/cf/host.def:

#define HasSunC YES


Build CDE

cd /path/to/cdesktopenv-code/cde
make World

The build will terminate with a successfully built message.

Install CDE

This has to be done as root:

 cd /path/to/cdesktopenv-code/cde/admin/IntegTools/dbTools
 ./installCDE -s /path/to/cdesktopenv-code/cde


Start CDE

Disable gdm graphical login as root:

svcadm disable svc:/application/graphical-login/gdm

You can now start CDE login manager:

/usr/dt/bin/dtlogin

Alternatively, you can start an X session as a normal user:

env LANG=C startx /usr/dt/bin/Xsession



Related

Wiki: SupportedPlatforms

Discussion

  • gary perreault

    gary perreault - 2014-11-16

    Thanks for the hardwork putting CDE back on solaris and openindiana :) I will be trying this out now.

     
  • Richard Hamilton

    Perhaps the 64-bit crle commands should instead be
    crle -64 -u -l /usr/gnu/lib/64
    crle -64 -u -l /usr/X11/lib/64
    (the system defaults also use the 64 links rather than the architecture-specific directory name)
    Along with whatever else is needed to get this working on SPARC is also done, that would be one less thing to be different between x86 and SPARC. SPARC is a bit more to my immediate interest, having a T5240 off of eBay to play on, and to offset winter heating needs :-)

     
  • Van

    Van - 2017-07-31

    Please help providing steps to compile CDE for Solaris 11 Sparc (on T5240). Step 2.5 *Build CDE" failed on me!

     
  • Ignacio Sniechowski

    Compilation fails for me in Solaris 11.3 (x86). Motif compiles and install OK (motif-2-3-7)
    But CDE, after carefully follow the instructions provided here, fails with the following message:

    ld: fatal: symbol referencing errors

    *** Error code 2
    make: Fatal error: Command failed for target `ttdbck'
    Current working directory /export/home/nacho/cdesktopenv-code/cde/lib/tt/bin/dbck
    
    *** Error code 1
    The following command caused the error:
    for flag in  ''; do \
    case "$flag" in *=*) ;; *[ik]*) set +e;; esac; done; \
    for i in dbck shell scripts tt_type_comp  ttauth ttdbserverd ttsession tttar tttrace ;\
    do \
    echo "making" all "in lib/tt/bin/$i..."; \
    (cd $i && /usr/ccs/bin/make  'CDEBUGFLAGS=-O2' 'CXXDEBUGFLAGS=-O2' all); \
    done
    

    I've tried both using gcc and solaris studio (though still using GCC) as posted here, but get the same error.

    Anyone having the same problem?
    Thanks in advance.

    PS: I will check if using motif-2-3-4 as suggested in this page, makes a difference.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.