Changeset d28f4bd2


Ignore:
Timestamp:
Jun 5, 2011 1:52:43 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
d834c80
Parents:
48f4c72
Message:
  • JBigI:
    • 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
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • core/c/README

    r48f4c72 rd28f4bd2  
     1
     2Dynamic library build
     3=====================
     4
    15If you have a libgmp.so installed on your system already
    26(check in /usr/lib), you can build a dynamically linked libjbigi.so as follows:
    37        cd jbigi
    48        build.sh dynamic
    5 The built library is jbigi/lib/libjbigi.so .
     9You do, of course, need the gmp headers installed.
     10On ubuntu, check for libgmp3 and libgmp3-dev packages.
     11This is much easier and faster than building GMP from source.
    612       
    7 Otherwise, prior to building the jbigi library, you will need to fetch the GMP source
    8 from http://www.swox.com/gmp/, saving it to jbigi/gmp-4.2.2.tar.bz2 (it will
    9 be unpacked and built as necessary).
    1013
    11 Version 4.2.2 has not been extensively tested with I2P. If you would like
    12 to use a well-tested version, get gmp-4.1.4.tar.bz2, and edit jbigi/build.sh
    13 to change the version number.
     14Static library build
     15=====================
     16
     17Otherwise, the build script build.sh will download the the GMP source,
     18unpack and build it. The GMP version and download location are configured
     19in jbigi/build.sh, please review it to ensure you download
     20and build the desired version.
    1421
    1522To build the native jbigi and jcpuid libraries for the current host CPU,
    1623simply run sh build.sh and the results will be packaged up into jbigi.jar
    17 and the libjbigi.so library. To test, copy jbigi/lib/libjbigi.so
    18 and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
    19 to your i2p/ directory. You can also copy jbigi.jar to the i2p/lib/ directory;
    20 it will be used only if the router fails to load the native library.
     24and the libjbigi.so library.
    2125
    2226To build the native jbigi libraries for all supported CPUs (on the current OS),
    2327go into jbigi/ and run build-all.sh (the results will be under jbigi/lib/)
     28
     29
     30Installation and testing
     31========================
     32
     33To test, copy jbigi/lib/libjbigi.so
     34and jcpuid/lib/freenet/support/CPUInformation/libjcpuid-*.so
     35to your i2p installation directory ($I2P). You may also copy jbigi.jar to the $I2P/lib/ directory;
     36it will be used only if the router fails to load the native library
     37from the I2P installation directory.
    2438
    2539The build.sh script runs two speed tests, one with your existing
  • core/c/jbigi/README

    r48f4c72 rd28f4bd2  
    77TODO: What is jbigi
    88TODO: Document generated folder structure
    9 TODO: Instructions for adding the libraries to a jar
     9
    1010
    1111Linux-specific information:
     
    1919
    2020If the new jbigi is slower, then run 'build.sh' (without the 'dynamic'), which will download
    21 the 4.3.1 libgmp library, build, and test that.
     21the libgmp library, build, and test that.
    2222
    2323
  • installer/lib/jbigi/README.txt

    r48f4c72 rd28f4bd2  
     1NOTE: This file may not be maintained.
     2See history.txt, checkin comments, javadoc, and code in
     3NativeBigInteger.java and CPUID.java for additional information.
     4See NativeBigInteger.java for naming rules and algorithms for
     5generating an ordered list of names to load.
     6
     7================================
     8
    19jbigi.jar was built by jrandom on Aug 21, 2004 with the jbigi and jcpuid
    210native libraries compiled on linux, winXP (w/ MinGW), and freebsd (4.8). 
     
    2432as it should offer amd64 users better performance than jbigi-win-none.dll
    2533until we get a full amd64 build.
     34
     35================================
     36
     37Updates May/June 2011:
     38  jcpuid:
     39   - jcpuid.c updated to be compatible with -fPIC
     40   - 32 bit libjcpuid-linux-x86.so updated, compiled with -fPIC.
     41   - 64 bit libjcpuid-linux-x86_64.so added, compiled with -fPIC.
     42   - See also javadoc and code in CPUID.java
     43  jbigi:
     44   - k62 and k63 are identical for all except windows; exception added to
     45     NativeBigInteger to use k62 for k63. k63 files deleted.
     46   - All 32 bit linux files updated with GMP 4.3.2, compiled with -fPIC,
     47     except for athlon64 and pentium4, which use GMP 5.0.2.
     48   - All 64 bit linux files updated with GMP 5.0.2.
     49   - libjbigi-windows-athlon64.dll deleted, it was a duplicate of
     50     libjbigi-windows-athlon.dll. NativeBigInteger now uses athlon as
     51     a fallback for all 64-bit processors.
     52   - Note that all new 64 bit files will use the _64 suffix. For example,
     53     the old libjbigi-linux-athlon64.so file was 64 bit; now it is 32 bit
     54     and the 64 bit file is libjbigi-linux-athlon64_64.so.
     55   - The 4.3.2 files are half the size of the 5.0.2 files, and there was
     56     little or no performance difference for 32 bit, so we are using
     57     4.3.2 for 32 bit. For 64-bit processors, both performance testing and
     58     the GMP changelog led us to use 5.0.2 for both the 32- and 64-bit versions.
     59   - See also checkin comments, javadoc and code in NativeBigInteger.java
Note: See TracChangeset for help on using the changeset viewer.