Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Compiling 1.18.4.0

Fluf Fredriksson
Registered User
Join date: 8 Feb 2007
Posts: 248
10-20-2007 05:25
A thread to post your hints, tips and misery when compiling the 1.18.4.0RC for Linux.

Ok so far have downloaded and compiled the c-ares library from:
http://daniel.haxx.se/projects/c-ares/
Didn't install it, just edited the updated makeSL (v1.81) script from:
http://wiki.secondlife.com/wiki/Compiling_the_viewer_%28Linux%29
So that it points at the directory I compiled c-ares to get the libraries.

But....

When I compile c-ares it makes a .la library file not a .a library file.
Am sure it's a simple ./configure option, but I don't know it!
Anyone point me in the right direction?
Asriazh Frye
Smart Cookie
Join date: 30 Sep 2006
Posts: 173
10-20-2007 05:48
I simply compiled c-ares, installed it and put its headers into the SL-client source. It seems that's all the client source wanted, since the compile process works just fine.

-Asriazh
Fluf Fredriksson
Registered User
Join date: 8 Feb 2007
Posts: 248
10-20-2007 08:00
ah ha...
Think I cracked it. The libcares.a file gets created in a hidden .libs directory under "c-ares-1.4.0/.libs". Have copied that across now.
I just try not to install things I don't actually need to run the system, especially from tarballs. This one does come with an uninstall, but I've seen many that don't.
Fluf Fredriksson
Registered User
Join date: 8 Feb 2007
Posts: 248
10-21-2007 02:56
Oh I love it when I get an entire thread almost to myself. I can almost have a coherent conversation! ;) Just an update + tips for anyone interested - am aiming at people who might be a bit new to all this, so sorry if this is all old news to you:

I've added:
export CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer"
export CXXFLAGS="${CFLAGS}"
to my ~/.bashrc file so those variables get set when I open a new session and get used by make when compiling the c-ares library. (You'll have to check which -march= is best for your cpu).

I've also finally got round to downloading the googleperf-tools from:
http://code.google.com/p/google-perftools/downloads/list
For Debian I needed both perftools-dev and perftools0
Installed them locally by changing to root and running:
dpkg -i libgoogle-perftools-dev_0.93-1_i386.deb libgoogle-perftools0_0.93-1_i386.deb
Yeah I know I should really download the source and make an optimised version.

And so far so good! I really can't be bothered with the xmlrpc-epi patching as it looks like a bit of a nightmare, and so far haven't bothered with ELFIO either, though that looks easier.
Fluf Fredriksson
Registered User
Join date: 8 Feb 2007
Posts: 248
10-22-2007 04:48
The update you never asked for! :o
I've found that if you compile the google-perftools with my usual "-march=prescott -O2 -pipe -fomit-frame-pointer" you get errors when you run the post compile checks.
So I've dropped back to a simple "-march=prescott" and let c-ares, google-perftools and the client use their own defaults for any optimisation when compiling.
I'm not sure yet, but this also seems to have reduced the number of occasional random segfaults I was getting when running SL.
See? You did want to know that after all! :p
Asriazh Frye
Smart Cookie
Join date: 30 Sep 2006
Posts: 173
10-22-2007 09:17
I gave compiling the SL client with "march=k8" a try, but that resulted in a client crash when trying to rotate prims or objects. The same with "march=athlon-4". So I'm back to "-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions -fomit-frame-pointer -frename-registers -fweb -fexpensive-optimizations"

-Asriazh

P.S.:
Ooops, "-march=k8" works for SL. it's just that last time i tried, i used a generic kernel where the k8 optimizations weren't enabled ^^;