Solaris

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Notes)
 
(16 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
Most of this is a war of inches, with the enemy using 10,000 paper cuts to bleed your soul dry.
 
Most of this is a war of inches, with the enemy using 10,000 paper cuts to bleed your soul dry.
  
Most likely, he'll win.
+
Most likely, he'll win. (Note: He did, see the Epilogue.  You win some, and you lose all the rest.)
  
 
The opposition's key weapon is the excessive use of unnecessary features.  Not even resulting in bloat, but just growing the dependency graph of installed software on the build system to make the entire thing ''incredibly'' sensitive to almost any difference between their build systems and yours.
 
The opposition's key weapon is the excessive use of unnecessary features.  Not even resulting in bloat, but just growing the dependency graph of installed software on the build system to make the entire thing ''incredibly'' sensitive to almost any difference between their build systems and yours.
Line 23: Line 23:
 
This is on a randomly, and partially, upgraded version of OpenSolaris Indiana (2008.5).
 
This is on a randomly, and partially, upgraded version of OpenSolaris Indiana (2008.5).
  
[http://wikis.sun.com/display/chosug/Installing+a+Linux+Zone Using these directions for setting up the zone].
+
[http://wikis.sun.com/display/chosug/Installing+a+Linux+Zone Use these directions for setting up the zone].
  
 
== Prerequisite Software ==
 
== Prerequisite Software ==
Line 35: Line 35:
  
 
The rest by download, configure, and make. Here's what I've had to install so far:
 
The rest by download, configure, and make. Here's what I've had to install so far:
 
+
{| border="1"
# apr-1.3.3/ -- for subversion
+
! Package
# apr-util-1.3.4/  -- for subversion
+
! Comments
# bash-3.2/ -- the builtin cp doesn't take the -t option, the one in this newer bash does.  [http://www.mail-archive.com/bug-bash@gnu.org/msg02148.html You'll probably need this one-line patch]
+
|-
# diffstat-1.46/
+
| apr-1.3.3/ || for subversion
# help2man-1.36.4/
+
|-
# gettext-0.17/
+
| apr-util-1.3.4/  || for subversion
# git-1.6.0.2/ -- yum didn't have this.
+
|-
# ncftp-3.2.2/ -- to make CPAN happy about Locale::gettext
+
| bash-3.2/ || the builtin cp doesn't take the -t option, the one in this newer bash does.  [http://www.mail-archive.com/bug-bash@gnu.org/msg02148.html You'll probably need this one-line patch]
# neon-0.28.3/  -- for subversion
+
|-
# Python-2.6/  -- for the proper sqlite support.  Yeah, the whole thing.
+
| diffstat-1.46/ ||
# sqlite-3.6.3/  -- for python's sake.
+
|-
# subversion-1.5.3/  -- yum didn't have this.
+
| help2man-1.36.4/ ||
# texi2html-1.64/ -- no package for this either.
+
|-
# texinfo-4.9/ -- default version didn't have makeinfo
+
| gettext-0.17/ ||
# make-3.81/ -- seriously
+
|-
# tar-1.20/ -- again, seriously.
+
| gmp-4.2.4/ || For GCC.  --prefix=/usr
 
+
|-
 +
| mpfr-2.3.2/ || For GCC --prefix=/usr
 +
|-
 +
| '''gcc-4.3.2/''' || B/c the original GCC supplied didn't understand a specific warning flag.
 +
|-
 +
| git-1.6.0.2/ || yum didn't have this.
 +
|-
 +
| ncftp-3.2.2/ || to make CPAN happy about Locale::gettext
 +
|-
 +
| neon-0.28.3/  || for subversion
 +
|-
 +
| openssl-0.9.8i/ || for subversion.  Install in /usr/local.
 +
|-
 +
| '''Python-2.6/''' || for the proper sqlite support.  Yeah, the whole thing.
 +
|-
 +
| sqlite-3.6.3/  || for python's sake.
 +
|-
 +
| '''subversion-1.5.3/''' || yum didn't have this.
 +
|-
 +
| texi2html-1.64/ || no package for this either.
 +
|-
 +
| '''linux-2.6.18/''' || For the headers.  You don't have to build or even configure this.  Just untar and symlink the include/ directory.
 +
|-
 +
| texinfo-4.9/ || default version didn't have makeinfo
 +
|-
 +
| make-3.81/ || seriously
 +
|-
 +
| tar-1.20/ || again, seriously.
 +
|-
 +
|}
 
As early as you can, build gettext and install it.  Then setup LD_LIBRARY_PATH, /etc/ld.so.conf, etc. before moving forward with the rest.  Otherwise some of the configures will complain about preloadable_libintl.so.
 
As early as you can, build gettext and install it.  Then setup LD_LIBRARY_PATH, /etc/ld.so.conf, etc. before moving forward with the rest.  Otherwise some of the configures will complain about preloadable_libintl.so.
  
 
When they're installed, they'll go in the default prefix setting, namely /usr/local/bin.  Put /usr/local/bin in as the first entry in your path.
 
When they're installed, they'll go in the default prefix setting, namely /usr/local/bin.  Put /usr/local/bin in as the first entry in your path.
  
== Notes ==
+
= Hacking up the system to make it work =
 +
== Linux Kernel ==
 +
Go into /usr/include, and
  
 +
<tt>ln -s /usr/local/src/linux-2.6.18/include/linux .</tt>
 +
 +
== Upgraded Python ==
 +
In /usr/bin, rename python to old_python, and link /usr/local/bin/python here.  Modify the bang line in /usr/bin/yum to point to /usr/bin/python2.2
 +
 +
== The new Bash ==
 
The build system will complain if you attempt to run it as root, even if it's the bullshit root in a container (it can't tell the difference).  Create /home, and then create a user (say "moko") to run the build system.  Also, edit /etc/shells and add /usr/local/bin/bash to the list.  Finally, edit /etc/passwd and change moko's shell to /usr/local/bin/bash.
 
The build system will complain if you attempt to run it as root, even if it's the bullshit root in a container (it can't tell the difference).  Create /home, and then create a user (say "moko") to run the build system.  Also, edit /etc/shells and add /usr/local/bin/bash to the list.  Finally, edit /etc/passwd and change moko's shell to /usr/local/bin/bash.
  
 
In both root's and that user's .bashrc, pop in these lines:
 
In both root's and that user's .bashrc, pop in these lines:
  
export PATH=/usr/local/bin/:$PATH
+
<tt>export PATH=/usr/local/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
+
 
 +
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH</tt>
 +
 
  
 
So that your new tool versions & shared libs will get picked up properly.
 
So that your new tool versions & shared libs will get picked up properly.
  
 +
== Runtime Library Setup ==
 
Also, add /usr/local/lib to /etc/ld.so.conf (in the zone, obviously), and do an ldconfig after installing gettext.
 
Also, add /usr/local/lib to /etc/ld.so.conf (in the zone, obviously), and do an ldconfig after installing gettext.
  
[[Category:Application Developer]]
 
 
[[Category:Host OSes]]
 
[[Category:Host OSes]]
[[Category:In progress]]
+
 
 +
= Epilogue =
 +
Well, the last thing I got to was a QT based tool requiring a semaphore implementation.  Perhaps someone else can give that a try.
 +
 
 +
I went ahead & VirtualBox'd an Ubuntu install and dedicated it to OM.  Ugh.

Latest revision as of 09:29, 1 February 2009

Contents

[edit] Building on Solaris

(Well, OpenSolaris)

Most of this is a war of inches, with the enemy using 10,000 paper cuts to bleed your soul dry.

Most likely, he'll win. (Note: He did, see the Epilogue. You win some, and you lose all the rest.)

The opposition's key weapon is the excessive use of unnecessary features. Not even resulting in bloat, but just growing the dependency graph of installed software on the build system to make the entire thing incredibly sensitive to almost any difference between their build systems and yours.

Hence, why we're going to use a full Linux userland stack to do this. Atop of this, we'll have to upgrade components extensively to make this all work. You're going to hate all this.

But hey, at least you don't actually have to run Linux.

[edit] Note and Disclaimer

I'm still working on getting this all to work. Don't actually follow these instructions until I've claimed success. Until then, it's best an amusement to watch from the sidelines.

[edit] Onto the Point

After a few dead starts, the best way to build on Solaris is to use a BrandZ Linux zone, and install enough stuff into the CentOS-3 image to make it all work.

This is on a randomly, and partially, upgraded version of OpenSolaris Indiana (2008.5).

Use these directions for setting up the zone.

[edit] Prerequisite Software

It's time to install a lot of software. After you're done with this, you'll:

  1. Respect distribution maintainers more
  2. Loathe other software developers more

Try to install what you can from the package list in MokoMakefile

The rest by download, configure, and make. Here's what I've had to install so far:

Package Comments
apr-1.3.3/ for subversion
apr-util-1.3.4/ for subversion
bash-3.2/ the builtin cp doesn't take the -t option, the one in this newer bash does. You'll probably need this one-line patch
diffstat-1.46/
help2man-1.36.4/
gettext-0.17/
gmp-4.2.4/ For GCC. --prefix=/usr
mpfr-2.3.2/ For GCC --prefix=/usr
gcc-4.3.2/ B/c the original GCC supplied didn't understand a specific warning flag.
git-1.6.0.2/ yum didn't have this.
ncftp-3.2.2/ to make CPAN happy about Locale::gettext
neon-0.28.3/ for subversion
openssl-0.9.8i/ for subversion. Install in /usr/local.
Python-2.6/ for the proper sqlite support. Yeah, the whole thing.
sqlite-3.6.3/ for python's sake.
subversion-1.5.3/ yum didn't have this.
texi2html-1.64/ no package for this either.
linux-2.6.18/ For the headers. You don't have to build or even configure this. Just untar and symlink the include/ directory.
texinfo-4.9/ default version didn't have makeinfo
make-3.81/ seriously
tar-1.20/ again, seriously.

As early as you can, build gettext and install it. Then setup LD_LIBRARY_PATH, /etc/ld.so.conf, etc. before moving forward with the rest. Otherwise some of the configures will complain about preloadable_libintl.so.

When they're installed, they'll go in the default prefix setting, namely /usr/local/bin. Put /usr/local/bin in as the first entry in your path.

[edit] Hacking up the system to make it work

[edit] Linux Kernel

Go into /usr/include, and

ln -s /usr/local/src/linux-2.6.18/include/linux .

[edit] Upgraded Python

In /usr/bin, rename python to old_python, and link /usr/local/bin/python here. Modify the bang line in /usr/bin/yum to point to /usr/bin/python2.2

[edit] The new Bash

The build system will complain if you attempt to run it as root, even if it's the bullshit root in a container (it can't tell the difference). Create /home, and then create a user (say "moko") to run the build system. Also, edit /etc/shells and add /usr/local/bin/bash to the list. Finally, edit /etc/passwd and change moko's shell to /usr/local/bin/bash.

In both root's and that user's .bashrc, pop in these lines:

export PATH=/usr/local/bin/:$PATH

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH


So that your new tool versions & shared libs will get picked up properly.

[edit] Runtime Library Setup

Also, add /usr/local/lib to /etc/ld.so.conf (in the zone, obviously), and do an ldconfig after installing gettext.

[edit] Epilogue

Well, the last thing I got to was a QT based tool requiring a semaphore implementation. Perhaps someone else can give that a try.

I went ahead & VirtualBox'd an Ubuntu install and dedicated it to OM. Ugh.

Personal tools

Building on Solaris

(Well, OpenSolaris)

Most of this is a war of inches, with the enemy using 10,000 paper cuts to bleed your soul dry.

Most likely, he'll win.

The opposition's key weapon is the excessive use of unnecessary features. Not even resulting in bloat, but just growing the dependency graph of installed software on the build system to make the entire thing incredibly sensitive to almost any difference between their build systems and yours.

Hence, why we're going to use a full Linux userland stack to do this. Atop of this, we'll have to upgrade components extensively to make this all work. You're going to hate all this.

But hey, at least you don't actually have to run Linux.

Note and Disclaimer

I'm still working on getting this all to work. Don't actually follow these instructions until I've claimed success. Until then, it's best an amusement to watch from the sidelines.

Onto the Point

After a few dead starts, the best way to build on Solaris is to use a BrandZ Linux zone, and install enough stuff into the CentOS-3 image to make it all work.

This is on a randomly, and partially, upgraded version of OpenSolaris Indiana (2008.5).

Using these directions for setting up the zone.

Prerequisite Software

It's time to install a lot of software. After you're done with this, you'll:

  1. Respect distribution maintainers more
  2. Loathe other software developers more

Try to install what you can from the package list in MokoMakefile

The rest by download, configure, and make. Here's what I've had to install so far:

  1. apr-1.3.3/ -- for subversion
  2. apr-util-1.3.4/ -- for subversion
  3. bash-3.2/ -- the builtin cp doesn't take the -t option, the one in this newer bash does. You'll probably need this one-line patch
  4. diffstat-1.46/
  5. help2man-1.36.4/
  6. gettext-0.17/
  7. git-1.6.0.2/ -- yum didn't have this.
  8. ncftp-3.2.2/ -- to make CPAN happy about Locale::gettext
  9. neon-0.28.3/ -- for subversion
  10. Python-2.6/ -- for the proper sqlite support. Yeah, the whole thing.
  11. sqlite-3.6.3/ -- for python's sake.
  12. subversion-1.5.3/ -- yum didn't have this.
  13. texi2html-1.64/ -- no package for this either.
  14. texinfo-4.9/ -- default version didn't have makeinfo
  15. make-3.81/ -- seriously
  16. tar-1.20/ -- again, seriously.

As early as you can, build gettext and install it. Then setup LD_LIBRARY_PATH, /etc/ld.so.conf, etc. before moving forward with the rest. Otherwise some of the configures will complain about preloadable_libintl.so.

When they're installed, they'll go in the default prefix setting, namely /usr/local/bin. Put /usr/local/bin in as the first entry in your path.

Notes

The build system will complain if you attempt to run it as root, even if it's the bullshit root in a container (it can't tell the difference). Create /home, and then create a user (say "moko") to run the build system. Also, edit /etc/shells and add /usr/local/bin/bash to the list. Finally, edit /etc/passwd and change moko's shell to /usr/local/bin/bash.

In both root's and that user's .bashrc, pop in these lines:

export PATH=/usr/local/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

So that your new tool versions & shared libs will get picked up properly.

Also, add /usr/local/lib to /etc/ld.so.conf (in the zone, obviously), and do an ldconfig after installing gettext.