Getting Pkg Built And Installed From Source On OpenSolaris

[Last updated: 12th January 2010]

On Monday I got OpenSolaris 2008.05 on my new work machine. I then followed step #2 in the release notes and updated to the latest packages.

I now want to be able to checkout the source code for the pkg project, build and install it, and start to try to understand how it all works.

Hopefully some day it'll be as simple as:

  $ pfexec pkg build-dep pkg
  $ pkg source pkg
  $ cd .../pkg_src_dir
  $ make install

but we aren't there yet. I couldn't actually find a set of step-by-step instructions on how to do this, so I muddled through. Thanks to the helpful folks on the #opensolaris channel on irc.freenode.net and various Google searches.

Before I could get the source code, I first had to get the Mercurial source control management system. That was with:

  $ pfexec pkg install SUNWmercurial

Getting the pkg project source code was with:

  $ hg clone ssh://anon@hg.opensolaris.org/hg/pkg/gate

Most of the code is in Python, but there is some C. Before I could compile that, I needed to get a C compiler and all the things it needs. (I went with the Sun compilers). That's accomplished with:

  $ pfexec pkg install sunstudio12u1

I then added /opt/sunstudio12.1/bin to my PATH and /opt/SunStudioExpress/man to my MANPATH in my ~/.bashrc and sourced it

Trying to do:

  $ cd .../gate/src
  $ make install

in the pkg workspace, now resulted in compiler errors because a variety of standard C include files were missing.

Note that doing:

  $ pkg search -r <missing file>

gives the names of the package you need to install, then you can use the "pfexec pkg install" command to install that package. Rinse and repeat. Here are the packages I had to install:

  SUNWhea
  SUNWgnome-common-devel
  SUNWzoneint
  SUNWxwinc
  SUNWpython26-setuptools

Now back to pylint'ing. Looks like pylint isn't in the IPS repository yet, so I'll have to download and install it by hand.

[]

[]

[]

Comments:

Post a Comment:
Comments are closed for this entry.
About

user12607856

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