Difference between revisions of "User:Dzonatas Sol/Snowglobe"

From Second Life Wiki
Jump to navigation Jump to search
(→‎Base 32 bit chroot setup: now have to install make also)
(→‎Base 32 bit chroot setup: update from sid to squeeze (needed to proper c++ abi, avoid gcc 4.5 for now, use gcc 4.4))
Line 5: Line 5:
Note: If you have a separate /var partition it will need to be greater than 3.7GB to complete the build.
Note: If you have a separate /var partition it will need to be greater than 3.7GB to complete the build.


On Debian, bootstrap "sid" for your 32bit chroot:
On Debian, bootstrap "squeeze" for your 32bit chroot:


<code>$ sudo debootstrap --arch i386 sid /var/chroot/sid-ia32 http://ftp.debian.org/debian/</code>
<code>$ sudo debootstrap --arch i386 squeeze /var/chroot/squeeze-ia32 http://ftp.debian.org/debian/</code>


Once done, make sure you have your schroot entry set properly, mine looks like this
Once done, make sure you have your schroot entry set properly, mine looks like this


  [sid]
  [squeeze]
  description=Debian sid (unstable)
  description=Debian squeeze (stable)
  location=/var/chroot/sid-ia32
  location=/var/chroot/squeeze-ia32
  priority=3
  priority=3
  groups=dzonatas,root
  groups=dzonatas,root
  root-groups=root
  root-groups=root
  aliases=unstable,default,ia32
  aliases=stable,ia32
  personality=linux32
  personality=linux32
  type=plain
  type=plain
Line 25: Line 25:
Now you can log into your chroot as root to setup the base packages:
Now you can log into your chroot as root to setup the base packages:


<code>$ sudo linux32 schroot -c sid -u root</code>
<code>$ sudo linux32 schroot -c squeeze -u root</code>


Initialize the packages:
Initialize the packages:

Revision as of 14:52, 6 April 2011

Step-by-Step 32bit Chroot Compile

Base 32 bit chroot setup

Note: If you have a separate /var partition it will need to be greater than 3.7GB to complete the build.

On Debian, bootstrap "squeeze" for your 32bit chroot:

$ sudo debootstrap --arch i386 squeeze /var/chroot/squeeze-ia32 http://ftp.debian.org/debian/

Once done, make sure you have your schroot entry set properly, mine looks like this

[squeeze]
description=Debian squeeze (stable)
location=/var/chroot/squeeze-ia32
priority=3
groups=dzonatas,root
root-groups=root
aliases=stable,ia32
personality=linux32
type=plain
run-setup-scripts=true
run-exec-scripts=true

Now you can log into your chroot as root to setup the base packages:

$ sudo linux32 schroot -c squeeze -u root

Initialize the packages:

$ apt-get update

Install these packages:

$ apt-get install python g++ subversion unzip bzip2 libx11-dev libxrender-dev libgl1-mesa-dev libxft-dev libxrandr-dev libxcursor-dev libglu-dev libsdl-dev libgtk2.0-bin make cmake bison flex git mercurial

Install Autobuild:

$ cd /tmp && hg clone http://hg.secondlife.com/autobuild && cd autobuild && python setup.py install

At this point, you can log out of root:

$ exit

The packages are setup.

Sources Setup

Login to your chroot as a regular user:

$ schroot -c sid

We can use the /tmp directory for this example, and download the sources.

$ cd /tmp
$ hg clone http://hg.secondlife.com/viewer-development

Run the Compile

$ cd viewer-development
$ autobuild build -c OpenSourceRelWithDebInfo

After that completes, you should have it all ready for a package in the newview/packaged directory1. Copy that directory where you would normally want to execute it from (see YOURBUILTSNOWGLOBEDIR2 below).

1. This is where you copy from for example: /var/chroot//squeeze-ia32/snowglobe/indra/viewer-linux-i686-relwithdebinfo/newview/packaged.

2. This is where you copy to, the install directory for the 64 bit secondlife binary.

Nicky Perian

Snowglobe 32 bit Compatibility on Debian Lenny 64

To prevent assertion failures with the 32 bit pre-compiled libs included above, perform these steps:

$ mkdir /tmp/extralibs
$ wget http://ftp.us.debian.org/debian/pool/main/g/gdbm/libgdbm3_1.8.3-3_i386.deb
$ wget http://ftp.us.debian.org/debian/pool/main/t/tcp-wrappers/libwrap0_7.6.q-16_i386.deb
$ dpkg -x libgdbm3_1.8.3-3_i386.deb /tmp/extralibs
$ dpkg -x libwrap0_7.6.q-16_i386.deb /tmp/extralibs
$ cd YOURBUILTSNOWGLOBEDIR
$ cp /tmp/extralibs/lib/* lib
$ cp /tmp/extralibs/usr/lib/* lib

Replace the word YOURBUILTSNOWGLOBEDIR with your final installed/packaged directory (the one that looks like newview/packaged after a successful build and wherever you copied it to).

32 bit Snowglobe 1.4+/2.0+ binaries then work on Debian Lenny 64

Standalone 64 bit Compile: Debian Lenny/Squeeze AMD 64

Here are my notes about the compilation experience:

Lenny comes with cmake 2.6.0, but the experimental version is required:

sudo apt-get install -t sid cmake

Specific cmake builds wouldn't be needed if an universal binary was used, instead.

Downloaded and unpacked Snowglobe source (1.2.4.3008). Not gonna worry about git/hg/svn matters for this annotation.

Downloaded related files as specified in doc/asset_urls.txt: MD5, ART, LIBS_LINUXI386 (see above 32bit compile)

$ cd indra
$ ./develop.py --standalone -m64 configure
$ cd viewer-linux-x86_64-relwithdebinfo
$ make secondlife-bin

Issues:

  • SNOW-240 At this time there is no jsoncpp debian package, so configure fails on this. Downloaded and compiled from sources noted in jira issue. Copied include files to /usr/local/include and libs to /usr/local/lib for temporary fix.
  • SNOW-285 build error: llqtwebkit.h: No such file or directory -- Despite this being a dependency, it should have made the configure fail like above in SNOW-240. The configure failure message could point to a wiki page to resolve the dependency (like an extra deb package for Debian).
  • Somewhere in the attempts to build llqtwebkit, the /usr/lib/libGL.so file got deleted. I can pinpoint here because other programs worked (X, wine, monovida, etc) up until that moment. Very strange for that to happen, yet not totally unexpected (from other people's experience with qt-webkit). The older NVidia drivers that have Xgl support didn't have a deb package, so qt-webkit thought it could overwrite the GL files. Blind installs, like this issue, is exactly what the Debian-Way tries to avoid. I eventually avoided the llqtwebkit build entirely and just used the pre-built 32bit version for now. These plugins could be downloaded by a debian package separate from this build since it really isn't required to build and run secondlife-bin (thanks to LLMediaPlugin work).
  • Upgrade to NVidia 190.42 drivers the Debian-Way.

With the above issues resolved, you can install the built files. Normally, a "make package" would package them for you, yet since this is a "standalone" version this means it is assumed some pieces that were normally put into the package are already installed somewhere else rather than being a static build with secondlife-bin. The "make package" works if you built the plugins.