Project

General

Profile

Installing Wt on QNX » History » Version 4

Wim Dumon, 03/29/2011 05:11 PM

1 1 Wim Dumon
h1. Installing Wt on QNX
2
3
PRELIMINARY: this document is not yet finished. It is intended for the upcoming Wt version 3.1.9.
4
5
These are the guidelines to install Wt on Qnx. The procedure is very similar to other POSIX systems, but you need to work around some bugs in some libraries.
6
7
h2. Build boost for QNX.
8
9
These instructions and the patch below are for boost 1.46.1, the most recent boost at the time of writing of this document.
10
11
In general, boost seems to work pretty ok with Qnx. To work around some compiletime and runtime problems, you should apply this patch:
12
13
<pre>
14
diff -ru boost_1_46_1/libs/filesystem/v3/src/operations.cpp ../boost_1_46_1/libs/filesystem/v3/src/operations.cpp
15
--- boost_1_46_1/libs/filesystem/v3/src/operations.cpp	2011-03-03 18:00:21.000000000 +0000
16
+++ ../boost_1_46_1/libs/filesystem/v3/src/operations.cpp	2011-03-22 15:40:32.000000000 +0000
17
@@ -32,7 +32,7 @@
18
 
19
 #if !(defined(__HP_aCC) && defined(_ILP32) && \
20
       !defined(_STATVFS_ACPP_PROBLEMS_FIXED))
21
-#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
22
+//#define _FILE_OFFSET_BITS 64 // at worst, these defines may have no effect,
23
 #endif
24
 #if !defined(__PGI)
25
 #define __USE_FILE_OFFSET64 // but that is harmless on Windows and on POSIX
26
@@ -182,6 +182,7 @@
27
 #include <string>
28
 #include <cstring>
29
 #include <cstdio>      // for remove, rename
30
+#include <stdio.h>
31
 #include <cerrno>
32
 #include <cassert>
33
 // #include <iostream>    // for debugging only; comment out when not in use
34
</pre>
35
36
This patch has been submitted to boost: https://svn.boost.org/trac/boost/ticket/5355
37
38 4 Wim Dumon
The second file that requires patching is exception_ptr.hpp:
39
<pre>
40
--- boost_1_46_1/boost/exception/detail/exception_ptr.hpp    2011-03-10 07:34:15.000000000 +0000
41
+++ boost/exception/detail/exception_ptr.hpp 2011-03-24 03:09:33.000000000 +0000
42
@@ -67,6 +67,7 @@
43
             boost::exception,
44
             std::bad_alloc
45
                 {
46
+~bad_alloc_() throw() {}
47
                 };
48
49
         template <int Dummy>
50
51
</pre>
52
53 1 Wim Dumon
Then, bootstrap and compile boost:
54
<pre>
55
# cd boost_1_46_1
56 3 Wim Dumon
# ./bootstrap.sh --with-libraries=date_time,filesystem,program_options,regex,signals,system,thread
57 1 Wim Dumon
# ./bjam toolset=qcc variant=release link=static threading=multi install
58
</pre>
59
60
h2. Build cmake for QNX
61
62
Just follow the instructions in the Readme.txt file. I built cmake 2.8.4 without problems:
63
64
<pre>
65
# ./bootstrap
66
# make
67
# make install
68
</pre>
69
70
h2. Build Wt for QNX
71
72
Download Wt, and untar it in a directory wt-x.y.z. There's one important catch: cmake will by default select a different compiler than qcc to build Wt - and we noticed this doesn't work very well. Since we have built boost with qcc, we'll also build Wt with qcc.
73
74
<pre>
75 4 Wim Dumon
# tar xvzf wt-3.1.9.tar.gz
76 1 Wim Dumon
# cd wt-3.1.8
77
# mkdir build
78
# cd build
79
# cmake -DCMAKE_C_COMPILER=qcc -DCMAKE_CXX_COMPILER=QCC ..
80 2 Wim Dumon
# make
81
# cd examples
82
# make
83 1 Wim Dumon
</pre>