source: core/c/README @ 5be7ea1

Last change on this file since 5be7ea1 was 5be7ea1, checked in by zzz <zzz@…>, 13 years ago
  • libjbigi:
    • Add documentation on dynamic build option
    • Add two speed tests to the build script
    • Clean up the build script, make it easier to build dynamic
  • Property mode set to 100644
File size: 1.6 KB
1If you have a installed on your system already
2(check in /usr/lib), you can build a dynamically linked as follows:
3        cd jbigi
4 dynamic
5The built library is jbigi/lib/ .
7Otherwise, prior to building the jbigi library, you will need to fetch the GMP source
8from, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
9be unpacked and built as necessary).
11Version 4.2.2 has not been extensively tested with I2P. If you would like
12to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/
13to change the version number.
15To build the native jbigi and jcpuid libraries for the current host CPU,
16simply run sh and the results will be packaged up into jbigi.jar
17and the library. To test, copy jbigi/lib/
18and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
19to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
20it will be used only if the router fails to load the native library.
22To build the native jbigi libraries for all supported CPUs (on the current OS),
23go into jbigi/ and run (the results will be under jbigi/lib/)
25The script runs two speed tests, one with your existing
26I2P installation and one with the new libjbigi.
28Alternatively, after copying the files to the i2p/ directory,
29to run a speed test comparing the native library to the java library,
30run the shell script below. Adjust the I2P= line as necessary.
35export I2P=~/i2p
36java -cp $I2P/lib/i2p.jar:$I2P/lib/jbigi.jar net.i2p.util.NativeBigInteger
Note: See TracBrowser for help on using the repository browser.