[234] | 1 | See INSTALL file for general instructions on building freeDiameter. |
---|
| 2 | |
---|
| 3 | ------------------ |
---|
| 4 | QUICK INSTRUCTIONS |
---|
| 5 | ------------------ |
---|
| 6 | |
---|
[643] | 7 | On 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 | |
---|
| 10 | Then 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 | --------------------- |
---|
| 15 | COMPLETE INSTRUCTIONS |
---|
| 16 | --------------------- |
---|
| 17 | |
---|
| 18 | 1) If you don't have freeBSD yet: |
---|
| 19 | Install minimal system + ports using initial installer /usr/sbin/sysinstall |
---|
| 20 | |
---|
| 21 | |
---|
[707] | 22 | 2) 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] | 32 | 3) Install 'mercurial' (optional) |
---|
| 33 | (replace 'cmake' by 'mercurial' in the previous command) |
---|
[234] | 34 | |
---|
[707] | 35 | 4) Install 'flex' and 'bison', same way. |
---|
[234] | 36 | |
---|
[1561] | 37 | 5) Install 'gnutls' and 'libidn2', same way also. |
---|
[415] | 38 | |
---|
| 39 | 6) Retrieve freeDiameter source code: |
---|
[234] | 40 | # cd ~ |
---|
[335] | 41 | # /usr/local/bin/hg clone http://www.freediameter.net/hg/freeDiameter/ |
---|
[234] | 42 | |
---|
[415] | 43 | 6b) Make a build directory |
---|
[234] | 44 | # mkdir fD-build |
---|
| 45 | # cd fD-build |
---|
| 46 | |
---|
| 47 | 7) 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] | 50 | 8) Compile, optionnaly test |
---|
| 51 | # make |
---|
| 52 | # make test |
---|
| 53 | |
---|
| 54 | 9) Install |
---|
| 55 | # make install |
---|
| 56 | |
---|
[643] | 57 | 10) Run (the install path can be changed during cmake step): |
---|
[323] | 58 | # /usr/local/bin/freeDiameterd --help |
---|
[238] | 59 | |
---|
[239] | 60 | |
---|
[290] | 61 | ------------------------------ |
---|
| 62 | app_acct test ADDITIONAL STEPS |
---|
| 63 | ------------------------------ |
---|
| 64 | Here is additional steps in order to run the test for app_acct |
---|
[239] | 65 | |
---|
[290] | 66 | 1) Install the required packages |
---|
| 67 | # pkg_add -v -r postgresql84-client |
---|
| 68 | # pkg_add -v -r postgresql84-server |
---|
| 69 | |
---|
| 70 | 2) 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 | |
---|
| 91 | 3) 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 | |
---|
| 97 | 4) run the test |
---|
[660] | 98 | # tests/testappacct -d |
---|
[290] | 99 | or |
---|
| 100 | # make test |
---|
| 101 | |
---|
| 102 | |
---|
[696] | 103 | ---------------------------------- |
---|
| 104 | Segmentation fault on program exit |
---|
| 105 | ---------------------------------- |
---|
| 106 | |
---|
| 107 | In case you encounter a segmentation fault on program termination like this: |
---|
| 108 | [...] |
---|
| 109 | freeDiameterd framework is terminated. |
---|
| 110 | Segmentation fault: 11 (core dumped) |
---|
| 111 | |
---|
| 112 | with 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 | |
---|
| 117 | You may try to add the following compilation directive in cmake: |
---|
| 118 | -DSKIP_DLCLOSE:BOOL=ON |
---|
| 119 | |
---|
| 120 | Note: this segmentation fault was experienced with: |
---|
| 121 | - FreeBSD 8.1 |
---|
| 122 | - 64 bits architecture only. |
---|
| 123 | - Profiling mode only. |
---|
| 124 | |
---|
| 125 | |
---|