Navigation


source: freeDiameter/INSTALL.FreeBSD

Last change on this file was 1561:699c3fb0c57b, checked in by Thomas Klausner <wiz@gatalith.at>, 20 months ago

Switch from libidn to libidn2.

libidn2 is the backwards compatible successor to libidn,
and at least Red Hat 8 does not provide a dev package for libidn1.

File size: 3.4 KB
RevLine 
[234]1See INSTALL file for general instructions on building freeDiameter.
2
3------------------
4QUICK INSTRUCTIONS
5------------------
6
[643]7On FreeBSD-8.0 at least the following ports packages were required (should be same on FreeBSD-7.x):
[234]8 cmake flex bison gnutls
9
10Then the cmake command had to look like:
[921]11 cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ...
[234]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
[707]222) Install 'cmake'
[234]23
24 a) from sources:
25    # cd /usr/ports/devel/cmake
26    # make install
27   
[660]28 b) or from package (don't forget to set your PACKAGEROOT appropriately. Ex: set PACKAGEROOT=ftp://ftp.jp.freebsd.org):
[234]29    # pkg_add -v -r cmake
30       
31 
[707]323) Install 'mercurial' (optional)
33  (replace 'cmake' by 'mercurial' in the previous command)
[234]34
[707]354) Install 'flex' and 'bison', same way.
[234]36
[1561]375) Install 'gnutls' and 'libidn2', same way also.
[415]38
396) Retrieve freeDiameter source code:
[234]40   # cd ~
[335]41   # /usr/local/bin/hg clone http://www.freediameter.net/hg/freeDiameter/
[234]42   
[415]436b) Make a build directory
[234]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)
[921]48   # /usr/local/bin/cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ../freeDiameter
[234]49
[323]508) Compile, optionnaly test
51   # make
52   # make test
53
549) Install
55   # make install
56   
[643]5710) Run (the install path can be changed during cmake step):
[323]58   # /usr/local/bin/freeDiameterd --help
[238]59
[239]60
[290]61------------------------------
62app_acct test ADDITIONAL STEPS
63------------------------------
64Here is additional steps in order to run the test for app_acct
[239]65
[290]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,
[351]83  root(# "Session-Id" bytea,
[290]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
[323]92  # make edit_cache
[290]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
[660]98  # tests/testappacct -d
[290]99  or
100  # make test
101 
102 
[696]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
Note: See TracBrowser for help on using the repository browser.