-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
104 lines (81 loc) · 2.52 KB
/
README
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
JAGS Bernoulli module
===================
Provides Bernoulli distribution functions for JAGS.
License
-------
http://www.r-project.org/Licenses/GPL-2
General install notes
---------------------
Install dependencies (on a clean ubuntu installation)
```
sudo apt-get install autoconf automake libtool g++
```
Creating all auxiliary files
```
autoreconf -fvi
```
Building
```
./configure
make
```
or, if JAGS has been installed in a different location, e.g. /usr
```
./configure --prefix /usr
make
```
Install
```
sudo make install
```
Windows Compiling and Installation
----------------------------------
## Linux
For building the module in Windows it is easiest to use a tarball that was created in linux like this (starting from a source clone):
```
autoreconf -fvi
./configure
make dist-gzip
```
Copy the *.tar.gz file to your msys home directory and continue from there.
## Windows
- Install MinGW (MinGW installer including msys):
http://www.mingw.org
In MinGW get installer: msys-base is all you need.
- Install TDM-GCC Compiler Suite:
http://tdm-gcc.tdragon.net
Use the exact same version of tdm-gcc as has been used to compile your
JAGS Version on your system. In that case, also don't forget to untick
the "Check for updated files on the TDM-GCC server"
during the installation proccess of tdm-gcc.
For Jags-3.3.0 and Jags-3.4.0 use:
tdm64-gcc-4.6.1.exe
- Delete all *.dll.a files int the TDM-GCC Installation, so the
compiler will link to the static libraries.
- Change path in c:/mingw/msys/1.0/etc/fstab from
this: c:/mingw /mingw
to: c:/MinGW64 /mingw
to use TDM-GCC compilers
--> Start msys, extract tarball in your home dir,
cd into dir and do the following:
+ Note: the module needs the JAGS include files and
the JAGS libraries.
Therefore use the -L and -I options, as shown below.
- For building 32bit binaries
```
CXX="g++ -m32" \
./configure LDFLAGS="-L/c/Progra~1/JAGS/JAGS-3.4.0/i386/bin" CXXFLAGS="-I/c/Progra~1/JAGS/JAGS-3.4.0/include"
make win32
```
- For building 64bit binaries
```
CXX="g++ -m64" \
./configure LDFLAGS="-L/c/Progra~1/JAGS/JAGS-3.4.0/x64/bin" CXXFLAGS="-I/c/Progra~1/JAGS/JAGS-3.4.0/include"
make win64
```
- Copy the win/win32/bernoulli.* or win/win64/bernoulli.*
files to your JAGS modules directory to enable the module.
For JAGS-3.4.0 this usually is:
x64: C:\Program Files\JAGS\JAGS-3.4.0\x64\modules
x32: C:\Program Files\JAGS\JAGS-3.4.0\x32\modules
+ Note: If you compile both 32bit and 64bit don't forget to make clean between the building.