Debian Codegraph @

storage/maria/libmarias3/docs/introduction/compiling.rst

raw
1 Compiling libMariaS3
2 ====================
3
4 libMariaS3 is designed to be compiled with GCC or CLang on a modern Linux distrubition or Mac OSX.
5
6 Prerequisites
7 -------------
8
9 libMariaS3 requires *libcurl 7.x* and *libxml2* to be installed. For RPM based distributions this can be installed using:
10
11 .. code-block:: bash
12
13 sudo dnf install libcurl-devel libxml2-devel
14
15 Building
16 --------
17
18 On most systems you can use the following commands, this is especially useful for customising your install::
19
20 autoreconf -fi
21 ./configure
22 make
23 make install
24
25 The build system will automatically detect how many processor cores you have (physicaly and virtual) and set the ``--jobs`` options of make accordingly.
26
27 Testing
28 -------
29
30 libMariaS3 comes with a basic test suite which we recommend executing, especially if you are building for a new platform.
31
32 You will need the following OS environment variables set to run the tests:
33
34 +------------+----------------------------------------------------------+
35 | Variable | Desription |
36 +============+==========================================================+
37 | S3KEY | Your AWS access key |
38 +------------+----------------------------------------------------------+
39 | S3SECRET | Your AWS secret key |
40 +------------+----------------------------------------------------------+
41 | S3REGION | The AWS region (for example us-east-1) |
42 +------------+----------------------------------------------------------+
43 | S3BUCKET | The S3 bucket name |
44 +------------+----------------------------------------------------------+
45 | S3HOST | OPTIONAL hostname for non-AWS S3 service |
46 +------------+----------------------------------------------------------+
47 | S3NOVERIFY | Set to ``1`` if the host should not use SSL verification |
48 +------------+----------------------------------------------------------+
49
50 The test suite is automatically built along with the library and can be executed with ``make check`` or ``make distcheck``. If you wish to test with valgrind you can use::
51
52 TESTS_ENVIRONMENT="./libtool --mode=execute valgrind --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE" make check
53
54 Building RPMs
55 -------------
56
57 The build system for libMariaS3 has the capability to build RPMs. To build RPMs simply do the following:
58
59 .. code-block:: bash
60
61 autoreconf -fi
62 ./configure
63 make dist-rpm
64
65 .. note::
66 The package ``redhat-rpm-config`` is required for building the RPM because this generates the debuginfo RPM.
67
68 Building DEBs
69 -------------
70
71 Debian packages for libMariaS3 can be built using the standard ``dpkg-buildpackage`` tool as follows:
72
73 .. code-block:: bash
74
75 autoreconf -fi
76 dpkg-buildpackage
77
78 .. note::
79 You may need to add ``--no-sign`` to dpkg-buildpackage to build unsigned packages.