CloudServices/Sync/FxSync/Archived/Building:Older Versions
Back to Labs/Weave.
General Building
Prerequisites
Before you can build Weave, you'll need a few tools:
1. A C compiler.
2. If you're on Windows, you'll need cygwin.
3. If you want to commit changes to Weave's source code, you'll need a Mercurial client, available here.
4. The Gecko SDK, available here.
Retrieving the Source
Retrieve the Weave source code from the Mozilla Mercurial source repository using the following command:
hg clone http://hg.mozilla.org/labs/weave
Alternatively, you can also retrieve the latest tarball of the source from:
http://hg.mozilla.org/labs/weave/index.cgi/archive/tip.tar.gz
Building
1. Set the MOZSDKDIR
environment variable to the location of your Gecko SDK, e.g.:
export MOZSDKDIR=/path/to/gecko/sdk
2. Run the make
command in the root directory of the Weave checkout, e.g.:
make
This should build Weave and run its unit tests.
Building Weave 0.20 on MacOSX for PPC
Note: The easiest way is to build is to get 10.5 and the latest XCode for it. 10.4's XCode's ld does not accept the -exported_symbol argument (without modification of the makefile). Read the [Note]
Prerequisites
1. Xcode (included on the 10.5 Leopard DVD, or can be downloaded from Apple Developer Connection).
2. Mercurial so you can generate a buildid.
3. MacPorts You need to get libidl and glib1 from it.
4. XUL-runner from the source because xpidl is not included with the SDK binaries (at least for PPC).
Setup and Configuration of the Prerequisites
1. Mercurial: make local && ./hg version (or install via MacPorts with sudo port install mercurial)
2. MacPorts:
a. Install MacPorts b. sudo port install libidl c. sudo port install glib1
3. XUL-runner:
./configure --with-glib-prefix=/opt/local --with-libIDL-prefix=/opt/local --enable-application=browser make -C config make -C nsprpub make -C xpcom/typelib
Adding variables to .profile
1. Open Terminal application
2. use vi/vim or your favourite editor open .profile in your directory
3. Add these variables to your .profile
export MOZSDKDIR=/opt/local/mozilla/" #from section 3 above export TOPSRCDIR=<path to weave's source> export NATIVE_TOPSRCDIR=<path to weave's source> export PATH=$PATH:/usr/local/bin:<path to MOZSDKDIR's BIN directory>
4. Restart your terminal(s).
Getting the source, modification and build (extra change for 0.20)
The source for Weave is here
For 0.20 you need to make just one modification in src/Makefile Line 79 change the line to:
ifeq ($(machine), Power Macintosh)
Remember to save!
then run make in the weave directory. Compilation should proceed correctly and the add on will be built.
References
1. A thread where I have been helping Slothrop etc to compile for their PPC.
2. A good starting point to get XPIDL working.
10.4 Note
Weave will not compile out of the box on 10.4.
The alternatives 1. Upgrade / change the gcc via macports. 10.4 uses gcc 4.0.1. You can search for later versions via macports search gcc command. However remember to also get and run gcc_select so you can change the default version (back and forth).
Also before you build, make sure you run the apps eg cc or ld with the -v flag, so you are clear about the app version you are running.
or 2. Upgrade to 10.5
Good luck!