HOWTO: Compile GAIM On Solaris 10
These instructions come courtesy of Torrey McMahon from his internal page (almost verbatim). These instructions were so helpful to me, I thought I'd put the details here for later reference and for anyone else to use as the details out on the web are a bit thin for Solaris.
NOTE: These are Solaris 10 specific instructions, but you should find with a bit of knob twiddling, you can get the procedure to work on earlier releases.
These details are for Gaim 1.3.0 to 1.5. I'm still in the process of documenting and getting Gaim 2.0.0 Beta# to cleanly compile with gcc. Once Gaim 2.0 is officially released, I'll work on getting it to compile cleanly with Sun Studio, and then I'll post the details.
For the Not So Brave...
... see our friends at Blastwave. Be warned through, this may be the easiest method, but it does fill /opt/csw/
with loads of duplicate files and unnecessary crap. You should probably also go this route if you aren't running Solaris 10.
Dependencies
You'll need the following before you start trying to build gaim:
- Solaris 10 or OpenSolaris. If you aren't running Solaris 10 then you'll need to do all sorts of things to get around libraries and programs that were never part of Solaris 8 or Solaris 9. Upgrade to Solaris 10 and come back.
- AO libraries and gmake program from either the companion CD, the external download centre, or a compilation of your own devising. The pkgnames are SFWoggl and SFWgmake if you use the SFW bits.
- The location of your C compiler - these instructions assume you're using the Sun Studio 10 or later compilers (now free for all - get it here)
- Perl, TCL/TK, and GNOME2 installed as Solaris meant them to be or be prepared to hack some of the instructions below.
- The required header and development packages on your system.
- The gaim source code from SourceForge. The link on the upper right hand side of the white frame always has the latest stable release.
- A location that you can write to that will hold the gaim binaries and libraries.
- If you want spell checking to work you'll need the gtkspell libraries installed. The short version of how I did this is:
- Set your path to include the
/usr/css/bin/make
command and the Sun compiler tools. - Change into the gtkspell dir
- Run "
./configure
". If all goes well you'll get a bunch of output concerning how the makefiles were created. Note that the default location for gtkspell is/usr/local
. If you need to change that run "./configure --help
" and look at the syntax. - Run "
make
" - If everything looks good then run "
make install
" - You'll probably see errors at the end concerning some html and sgml doc. You can ignore them.
- Set your path to include the
Setup
Gunzip/bunzip2 and untar the source code.
Set your path to make sure you don't include the "wrong paths" for unbundled items such as older versions of gnome. I set mine to:
/opt/SUNWspro/bin:\
/usr/bin:\
/usr/sbin:\
/sbin:\
/usr/ccs/bin:\
/usr/platform/sun4u/sbin:\
/usr/sfw/bin:\
/usr/dt/bin:\
/usr/openwin/bin
Replace /opt/SUNWspro/bin
with the location of your C compiler if it is not in that location.
Set the CC
environment variable to the location of your C compiler or you may use gcc by accident. On my system that is /opt/SUNWspro/bin/cc
.
Set the CXX
environment variable to the location of your C++ compiler or you may use gcc by accident. On my system that is /opt/SUNWspro/bin/CC
.
Set the CFLAGS
environment variable if you wish to optimize and know what you are doing. I set mine to "-g -w
" as it make debugging easier in dbx and takes some of the warning messages out during compile time. If you want to optimize use "-g -w -xO2
" or something similar.
Set the CXXFLAGS
environment variable if you wish to optimize and know what you are doing. I set mine to "-g0 -w
" as it make debugging easier in dbx and takes some of the warning messages out during compile time. If you want to optimize use "-g0 -w -xO2
" or something similar.
Set the MAKE
environment variable to the location of gmake. If you're using the SFWgmake pkg it's /opt/sfw/bin/gmake
.
Unset LD_LIBRARY_PATH
or strange things may happen between running configure, compiling the program, and actually running it. You shouldn't need to set LD_LIBRARY_PATH
to run gaim if you follow the instructions correctly.
If using gtkspell set the PKG_CONFIG_PATH
variable to the location of the gtkspell.pc file which on my system is /usr/local/lib/pkgconfig
.
Change to the directory you have placed the gaim source in. Run the configure script with the areas indicated below replaced with the locations mentioned in the dependencies section above. You may have to turn this into a script that calls configure as the line can get a bit too long for certain terminal input buffers.
./configure --prefix=<PREFIX> \
--with-ao=<AOROOT> \
--disable-aotest \
--with-tclconfig=/usr/sfw/lib \
--with-tkconfig=/usr/sfw/lib \
--enable-gnutls=yes \
--enable-nss=no
- Replace
<PREFIX>
with where you want to install gaim. - Replace
<AOROOT>
with where you have installed the libao pkgs
On my system I use this script snippet
./configure \
--with-ao=/opt/sfw \
--disable-aotest \
--with-tclconfig=/usr/sfw/lib \
--with-tkconfig=/usr/sfw/lib \
--enable-gnutls=yes \
--enable-nss=no
Note that since I don't use the --prefix
flag gaim installs to /usr/local
. Make sure to add that and set it correctly if you need to install someplace such as /opt/gaim
or your home directory.
Configure Output
After the configure step runs you should see output that states the various plugins and extras were enabled. If not go back through the output and see where things bombed out. Usually, it's a typo or permission on a file you may have recently installed such as the GNUTLS libs. The only things I don't get working are
- NAS audio - Tried but it wanted to drop bits in /usr/openwin, it's kind of crusty and I didn't see the point.
- Kerberos4 support for zepyher - No clue what it is.
This is the end of output I get from configure with everything working.
gaim 1.3.0
Build Protocol Plugins........ : yes
Protocols to link statically.. :
Protocols to build dynamically : gg irc jabber msn napster novell oscar yahoo zephyr
UI Library.................... : GTK 2.x
SSL Library/Libraries......... : GNUTLS
Build with Plugin support..... : yes
Build with Perl support....... : yes
Build with Tcl support........ : yes
Build with Tk support......... : yes
Build with Audio support...... : yes
Build with NAS support........ : no
Build with GtkSpell support... : yes
Use kerberos 4 with zephyr.... : no
Use external libzephyr........ : no
Use XScreenSaver Extension.... : yes
Use X Session Management...... : yes
Use startup notification.......: yes
Print debugging messages...... : no
Gaim will be installed in /usr/local/bin.
Warning: You have an old copy of gaim at /usr/local/bin/gaim.
configure complete, now type 'make'
$
Makefile Hacking
Unfortunately, even with all of those script lines you need to hand edit the various Makefiles to get gaim to run correctly without setting LD_LIBRARY_PATH
. You only need to perform this hack if you want to use the TCL/TK plugins with gaim. This is a bug in the TCL/TK implementation on Solaris.
Edit the config.status
file and find the two lines that look like
s,@TCL_LIBS@,-L/usr/sfw/lib -ltcl8.3,;t t
s,@TK_LIBS@,-L/usr/sfw/lib -ltk8.3,;t t
... and change them to read:
s,@TCL_LIBS@,-L/usr/sfw/lib -R/usr/sfw/lib -ltcl8.3,;t t
s,@TK_LIBS@,-L/usr/sfw/lib -R/usr/sfw/lib -ltk8.3,;t t
Once you have edited the file run "./config.status
" to update the Makefiles.
Build
After setting our environment variables, running the configure, and hacking our makefiles it's time to compile. Run gmake
and you should see the compile process kick off. If you get any errors then make sure the steps above were done correctly and you have your dependencies resolved. If you change or fix anything - You just noticed you mistyped something in the configure command - make sure to re-run the configure command and hack the config.status
file as above before you re-run gmake
.
Install
After the compile runs, and everything looks good, run
... to place the binaries and libraries in their specified places. If you run this as root make sure that the permissions on the directories and files correct. Any newly created directories will be created with root's umask. When run with directory permission problems gaim will complain about missing plugins.
It is strongly suggested that you remove the older version of gaim installed with Solaris 10 once you install a new version. If you do not then you'll probably run the older version by accident at some point and cause some interesting issues with your gaim preferences. In other words, as root,
Happy "Gaiming".