- Replace old non-PIC 62-bit linux libs (GMP 4.1.4 built in 2005)
        with PIC libs built with GMP 5.0.2. License is LGPLv3.
        Built by sponge with GCC 4.4.4, downloaded from
        http://sponge.i2p/files/jbigi/gmp-5.0.2/
        For 64-bit processors, both performance testing and
        the GMP changelog led us to use 5.0.2 for both the 32- and 64-bit versions,
        even though the files are twice as big.
        See http://zzz.i2p/topics/306 for discussion and test results.
        libjbigi-linux-athlon64.so was a 64 bit file; by the new naming standard
        supported by NativeBigInteger, it is now a 32-bit file and the
        64-bit one is libjbigi-linux-athlon64_64.so.
        All new 64-bit libs will have _64 appended.
      - Update build docs
This commit is contained in:
zzz
2011-06-05 13:52:43 +00:00
parent 48f4c7286d
commit d28f4bd24b
8 changed files with 61 additions and 13 deletions

View File

@@ -1,27 +1,41 @@
Dynamic library build
=====================
If you have a libgmp.so installed on your system already
(check in /usr/lib), you can build a dynamically linked libjbigi.so as follows:
cd jbigi
build.sh dynamic
The built library is jbigi/lib/libjbigi.so .
You do, of course, need the gmp headers installed.
On ubuntu, check for libgmp3 and libgmp3-dev packages.
This is much easier and faster than building GMP from source.
Otherwise, prior to building the jbigi library, you will need to fetch the GMP source
from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
be unpacked and built as necessary).
Version 4.2.2 has not been extensively tested with I2P. If you would like
to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/build.sh
to change the version number.
Static library build
=====================
Otherwise, the build script build.sh will download the the GMP source,
unpack and build it. The GMP version and download location are configured
in jbigi/build.sh, please review it to ensure you download
and build the desired version.
To build the native jbigi and jcpuid libraries for the current host CPU,
simply run sh build.sh and the results will be packaged up into jbigi.jar
and the libjbigi.so library. To test, copy jbigi/lib/libjbigi.so
and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
it will be used only if the router fails to load the native library.
and the libjbigi.so library.
To build the native jbigi libraries for all supported CPUs (on the current OS),
go into jbigi/ and run build-all.sh (the results will be under jbigi/lib/)
Installation and testing
========================
To test, copy jbigi/lib/libjbigi.so
and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
to your i2p installation directory ($I2P). You may also copy jbigi.jar to the $I2P/lib/ directory;
it will be used only if the router fails to load the native library
from the I2P installation directory.
The build.sh script runs two speed tests, one with your existing
I2P installation and one with the new libjbigi.

View File

@@ -6,7 +6,7 @@ Execute the build.sh script to produce jbigi library files optimized for a numbe
TODO: What is jbigi
TODO: Document generated folder structure
TODO: Instructions for adding the libraries to a jar
Linux-specific information:
===========================
@@ -18,7 +18,7 @@ Then do 'build.sh dynamic'. This will do a quick build using your installed libg
and then test it and the jbigi in your I2P installation to see which is faster.
If the new jbigi is slower, then run 'build.sh' (without the 'dynamic'), which will download
the 4.3.1 libgmp library, build, and test that.
the libgmp library, build, and test that.
Windows-specific information: