Installing Wt on FreeBSD » History » Version 11
Wim Dumon, 03/26/2014 08:19 PM
1 | 4 | Pieter Libin | h1. Installing Wt on FreeBSD |
---|---|---|---|
2 | |||
3 | 11 | Wim Dumon | h2. FreeBSD 10.0 |
4 | |||
5 | Minimal installation prerequisites: |
||
6 | <pre> |
||
7 | pkg install boost-libs cmake gmake |
||
8 | </pre> |
||
9 | |||
10 | Then download, extract and build Wt: |
||
11 | <pre> |
||
12 | wget -c http://kent.dl.sourceforge.net/sourceforge/witty/wt-x.y.z.tar.gz |
||
13 | tar xvxf wt-x.y.z.tar.gz |
||
14 | cd wt-x.y.z |
||
15 | mkdir build |
||
16 | cd build |
||
17 | cmake .. |
||
18 | gmake |
||
19 | gmake -C examples |
||
20 | </pre> |
||
21 | |||
22 | Warning: FreeBSD's default make does not work with CMake generated build files. Be sure to use gmake! |
||
23 | |||
24 | For hints on installing more dependency packages, see the Ubuntu installation instructions in this wiki. |
||
25 | |||
26 | h2. FreeBSD 7.2 |
||
27 | |||
28 | 4 | Pieter Libin | Just a few notes to help FreeBSD users to build Wt. I tested those tips on FreeBSD 7.2. |
29 | |||
30 | * For the cmake options : |
||
31 | |||
32 | <pre> |
||
33 | cmake -DBOOST_DIR=/usr/local -DBOOST_FS_LIB_MT=/usr/local -DBOOST_FS_LIB_MT=/usr/local/lib/libboost_filesystem.so ../ |
||
34 | </pre> |
||
35 | |||
36 | 10 | Koen Deforche | * This will build a non-threaded version of Wt, which is fine for playing around with the features, but a multi-threaded Wt build is to be preferred. Although boost for FreeBSD is multi-threaded, they do not have the signature -mt- in their library names, which is taken by the Wt build process as an indication that the boost libraries are multi-threaded. To force Wt to make a multi-threaded build, you need to edit your CMakeCache.txt and copy the value of each BOOST_xx_LIB variable to BOOST_xx_LIB_MT, specify the BOOST_THREAD_LIB_MT library, and add -lpthread to the WtFindBoost.txt cmake script (lines 223 - 229): |
37 | 4 | Pieter Libin | |
38 | <pre> |
||
39 | SET(BOOST_WT_LIBRARIES |
||
40 | 8 | Davis Peterson | ${BOOST_THREAD_LIB_MT} |
41 | ${BOOST_REGEX_LIB_MT} |
||
42 | 4 | Pieter Libin | ${BOOST_SIGNALS_LIB_MT} |
43 | ${BOOST_SYSTEM_LIB_MT} |
||
44 | ${BOOST_PO_LIB_MT} |
||
45 | ${BOOST_DT_LIB_MT} -lpthread) |
||
46 | </pre> |
||
47 | |||
48 | When running make, you should then get a line that says: |
||
49 | |||
50 | <pre> |
||
51 | ** Enabling multi threading. |
||
52 | </pre> |
||
53 | |||
54 | * Be sure to specify "www" for the WEBUSER and WEBGROUP configuration variables. Otherwise Wt will use "apache" user/group which doesn't exist by default on FreeBSD. |
||
55 | |||
56 | * To compile some examples, you need to replace "png12" by "png" because the PNG libray is simply named "libpng.so" on FreeBSD. |
||
57 | |||
58 | I hope those simple tips will help FreeBSD users to install and try Wt. |