blob: 4625d8a847037bc3fbd0b911a662ced0d200808b [file] [log] [blame]
Brian Waters13d96012017-12-08 16:53:31 -06001See INSTALL file for general instructions on building freeDiameter.
2
3------------------
4QUICK INSTRUCTIONS
5------------------
6
7On FreeBSD-8.0 at least the following ports packages were required (should be same on FreeBSD-7.x):
8 cmake flex bison gnutls
9
10Then the cmake command had to look like:
11 cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ...
12
13
14---------------------
15COMPLETE INSTRUCTIONS
16---------------------
17
181) If you don't have freeBSD yet:
19 Install minimal system + ports using initial installer /usr/sbin/sysinstall
20
21
222) Install 'cmake'
23
24 a) from sources:
25 # cd /usr/ports/devel/cmake
26 # make install
27
28 b) or from package (don't forget to set your PACKAGEROOT appropriately. Ex: set PACKAGEROOT=ftp://ftp.jp.freebsd.org):
29 # pkg_add -v -r cmake
30
31
323) Install 'mercurial' (optional)
33 (replace 'cmake' by 'mercurial' in the previous command)
34
354) Install 'flex' and 'bison', same way.
36
375) Install 'gnutls' and 'libidn', same way also.
38
396) Retrieve freeDiameter source code:
40 # cd ~
41 # /usr/local/bin/hg clone http://www.freediameter.net/hg/freeDiameter/
42
436b) Make a build directory
44 # mkdir fD-build
45 # cd fD-build
46
477) Run cmake for freeDiameter (add other flags as you see fit, see INSTALL for more details)
48 # /usr/local/bin/cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ../freeDiameter
49
508) Compile, optionnaly test
51 # make
52 # make test
53
549) Install
55 # make install
56
5710) Run (the install path can be changed during cmake step):
58 # /usr/local/bin/freeDiameterd --help
59
60
61------------------------------
62app_acct test ADDITIONAL STEPS
63------------------------------
64Here is additional steps in order to run the test for app_acct
65
661) Install the required packages
67 # pkg_add -v -r postgresql84-client
68 # pkg_add -v -r postgresql84-server
69
702) Prepare access to the database:
71 # echo postgresql_enable=YES >> /etc/rc.conf
72 # /usr/local/etc/rc.d/postgresql initdb
73 # su - pgsql
74 > /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
75 > /usr/local/bin/createuser root
76 Shall the new user be allowed to create databases? (y/n) y
77 > logout
78 # /usr/local/bin/createdb root
79 # /usr/local/bin/psql root
80 root=# CREATE TABLE incoming_test (
81 root(# recorded_on timestamp with time zone NOT NULL,
82 root(# "Accounting-Record-Type" integer,
83 root(# "Session-Id" bytea,
84 root(# "Accounting-Record-Number" integer,
85 root(# "Route-Record1" bytea,
86 root(# "Route-Record2" bytea,
87 root(# "Route-Record3" bytea,
88 root(# "Route-Record4" bytea );
89 root=# \q
90
913) configure the sources
92 # make edit_cache
93 BUILD_APP_ACCT:BOOL=ON
94 TEST_APP_ACCT:BOOL=ON
95 TEST_APP_ACCT_CONNINFO:STRING="user=root dbname=root"
96
974) run the test
98 # tests/testappacct -d
99 or
100 # make test
101
102
103----------------------------------
104Segmentation fault on program exit
105----------------------------------
106
107In case you encounter a segmentation fault on program termination like this:
108 [...]
109 freeDiameterd framework is terminated.
110 Segmentation fault: 11 (core dumped)
111
112with a backtrace like this:
113 #0 0x0000000801a414a0 in ?? ()
114 #1 0x0000000800f99274 in __cxa_finalize () from /lib/libc.so.7
115 #2 0x0000000800f460b7 in exit () from /lib/libc.so.7
116
117You may try to add the following compilation directive in cmake:
118 -DSKIP_DLCLOSE:BOOL=ON
119
120Note: this segmentation fault was experienced with:
121 - FreeBSD 8.1
122 - 64 bits architecture only.
123 - Profiling mode only.
124
125