File: INSTALL

package info (click to toggle)
dieharder 3.31.1-7
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 7,316 kB
  • ctags: 2,692
  • sloc: ansic: 16,937; sh: 10,158; makefile: 498; perl: 73; php: 2
file content (137 lines) | stat: -rw-r--r-- 5,343 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
========================================================================
                      QUICK BUILD/INSTALL INSTRUCTIONS
========================================================================

Dieharder should build from the freshly unpacked tarball if you enter:

 ./autogen.sh
 make

from the toplevel source directory, IF you have the required libraries
and tools installed.

========================================================================
                           BUILD REQUIREMENTS

Dieharder requires the Gnu Scientific Library (GSL) and the Gnu Build
Tools (GBT) for its build, and it is strongly recommended that they be
up to date versions.  This precludes building or running dieharder on a
truly old linux (or other) distribution.  In practical terms, if your
linux distribution is older than two years (say, pre-FC 4) it is
unlikely to build smoothly without signicant work.  For many of you
reading this, then, my first instruction is "update to a relatively
modern build environment that contains a contemporary GSL and GBT".

A few required components may not be installed on your system by default
even if your system is quite modern.  The GSL is one example -- you may
need to use yum or apt-get or whatever package manager your system uses
to install its packages to install it, e.g. "yum install gsl\*" (to get
both the library and its header files) or you may have to get the GSL
sources and build/install from scratch.

Also be sure your system has libtool installed and on your path or else
the build will fail.  In particular its definition on your system needs
to be in aclocal's search path.  Running ./autogen.sh "should" fix all
of that, but in an imperfect world there are probably systems missing
this or that or configured very differently from my test/development
systems where it doesn't.

Note that there are MANY options you may want to give configure to tune
up a build for your particular architecture.  We will mention only two.
The first is the --prefix option, which can be used to change the
toplevel install path for packaging or to build and install a private
(non-root) copy.  The default (run automatically at the end of
./autogen.sh) is to run:

 ./configure --prefix=/usr

AS ROOT for a traditional FHS-compliant build and install.  However, you
may instead with to enter some other toplevel path path such as:

 ./configure --prefix=$(HOME)/usr

for an alternative install into your own home directory.  If you do the
latter, you will have to make sure that ~/usr/bin is on your default
path (set with the PATH environment variable) and ~/usr/lib is on your
default library path (set with the LD_LIBRARY_PATH variable).

dieharder uses GNU Libtool in order to automatically build against a
shared libdieharder library on a variety of systems.  This enables one
to build dieharder tests into your own applications, into a GUI version
that is planned, and into existing tools such as R.  

While shared libraries are very nice for making usable binaries and
efficiently using system resources, they can be a pain when trying to
debug a program or if you are building a single copy of dieharder for
your personal and private use.  For that reason, compilation of shared
libraries can be turned off by specifying the `--disable-shared' option
to configure:

 ./configure --prefix=$(HOME)/usr --disable-shared

This should produce a static-linked binary of dieharder that can be run
without the need to install the library at all.

Finally, to just build the software in place, enter:

 make

or to build it and install it on the path defined in the configure step
above, enter:

 make install

This last step will need to be done as root if the install is into a
root-owned directory such as /usr and must be followed as noted by
rerunning ldconfig.

NOTE WELL:  Be aware that the application is DYNAMICALLY LINKED and will
not work unless the libdieharder library is installed and made available
to the dynamic linker by running ldconfig (for the FHS install) or the
use of

 LD_LIBRARY_PATH=$(HOME)/usr/lib
 export LD_LIBRARY_PATH

for a private one.

                        RPM BUILD INSTRUCTIONS

There are two ways one should be able to build a functional set of RPMs
for the dieharder user interface application and libdieharder, the core
library of RNG testing routines.  The easiest, when it works, is to
download the source rpm and use

 rpmbuild --rebuild dieharder-whatever-src.rpm

where "whatever" should of course be the version of the source rpm you
seek to rebuild.  In order for this to work, you will need something
like the following in ~/.rpmmacros:

%_topdir	/home/rgb/Src/rpm_tree

# Don't do fascist build policy -- unpackaged files ignored.
%define _unpackaged_files_terminate_build 0

where the topdir macro should point to a valid RPM build tree.

Alternatively, once you have run the configure step above using
--prefix=/usr (only) you should be able to build the rpms using:

 make rpm

where once again a suitable rpm tree must exist and be pointed to in
.rpmmacros.


                Debian / Ubuntu Package Build Instructions

As Dieharder is provided as an actively maintained, simply do

   sudo apt-get build-dep dieharder

to install all build requirements for Dieharder, and 

   sudo apt-get source dieharder

to install the current sources.