个人工具

“UbuntuHelp:BuildingWtFromSource”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/BuildingWtFromSource}} {{Languages|UbuntuHelp:BuildingWtFromSource}} == Introduction == /!\ '''Note:''' This page is maintained by Tim Sutton (...)
 
 
(未显示同一用户的9个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/BuildingWtFromSource}}
 
{{From|https://help.ubuntu.com/community/BuildingWtFromSource}}
 
{{Languages|UbuntuHelp:BuildingWtFromSource}}
 
{{Languages|UbuntuHelp:BuildingWtFromSource}}
 
 
 
== Introduction ==
 
== Introduction ==
 
 
/!\ '''Note:''' This page is maintained by Tim Sutton (tim [at] linfiniti.com).
 
/!\ '''Note:''' This page is maintained by Tim Sutton (tim [at] linfiniti.com).
 
+
/!\ /!\ /!\ This document is now only relevant for older versions of Witty and you can now easily install Wt from an Ubuntu PPA - please visit this page for instructions : http://www.webtoolkit.eu/wt/wiki/index.php/Installing_Wt_on_Ubuntu /!\ /!\ /!\
 
I am really eager to try out the [http://jose.med.kuleuven.be/wt/Home.fcg Wt] (a.k.a. 'witty') toolkit which allows you to deploy your C++ application as an ajax web app. They have recently published a [http://jose.med.kuleuven.be/wt/doc/tutorial/wt-sdj.xhtml nice article] which provides an overview of the design thoughts behind Wt and some samples showing how it is used. I wanted to get it running on Ubuntu Dapper using apt for dependencies as much as possible. Here is what I did:
 
I am really eager to try out the [http://jose.med.kuleuven.be/wt/Home.fcg Wt] (a.k.a. 'witty') toolkit which allows you to deploy your C++ application as an ajax web app. They have recently published a [http://jose.med.kuleuven.be/wt/doc/tutorial/wt-sdj.xhtml nice article] which provides an overview of the design thoughts behind Wt and some samples showing how it is used. I wanted to get it running on Ubuntu Dapper using apt for dependencies as much as possible. Here is what I did:
 
 
== Getting Wt installed ==
 
== Getting Wt installed ==
 
=== Install Dependencies ===
 
=== Install Dependencies ===
第18行: 第14行:
 
</nowiki></pre>
 
</nowiki></pre>
 
Source Download and Compilation
 
Source Download and Compilation
 
+
Next I downloaded the Wt sources from anonymous CVS (I had some problems with the latest stable release and the developers suggested using CVS head instead).
Next I downloaded the Wt sources from anonymouse CVS (I had some problems with the latest stable release and the developers suggested using CVS head instead).
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
cd ~/src/
 
cd ~/src/
第31行: 第25行:
 
</nowiki></pre>
 
</nowiki></pre>
 
Which gave me an output looking like this:
 
Which gave me an output looking like this:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
-- Check for working C compiler: gcc
 
-- Check for working C compiler: gcc
第45行: 第38行:
 
-- Build files have been written to: /home/timlinux/dev/cpp/wt/build
 
-- Build files have been written to: /home/timlinux/dev/cpp/wt/build
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
At the time of writing ubuntu provides ccmake version 2.2-patch 3. This version has a known issue that needs to be compensated for by running the following command:
 
At the time of writing ubuntu provides ccmake version 2.2-patch 3. This version has a known issue that needs to be compensated for by running the following command:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done
 
for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now go on to make wt:
 
Now go on to make wt:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
make && sudo make install
 
make && sudo make install
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Preparing Apache ===
 
=== Preparing Apache ===
 
 
Now lets get the fastcgi module installed for apache:
 
Now lets get the fastcgi module installed for apache:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo a2enmod
 
sudo a2enmod
 
</nowiki></pre>
 
</nowiki></pre>
 
When prompted type
 
When prompted type
 
 
<pre><nowiki>
 
<pre><nowiki>
 
fastcgi
 
fastcgi
 
</nowiki></pre>
 
</nowiki></pre>
 
Now reload the apache modules:
 
Now reload the apache modules:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/apache2 force-reload
 
sudo /etc/init.d/apache2 force-reload
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next create /etc/apache2/conf.d/witty with the following content:
 
Next create /etc/apache2/conf.d/witty with the following content:
 
<pre><nowiki>
 
<pre><nowiki>
第85行: 第67行:
 
#first an additional handler for witty's fcg extension
 
#first an additional handler for witty's fcg extension
 
<IfModule mod_fastcgi.c>
 
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcg
+
  AddHandler fastcgi-script .fcg
 
</IfModule>
 
</IfModule>
  
第91行: 第73行:
 
Alias /wt /var/www/wt
 
Alias /wt /var/www/wt
 
<Directory /wt>
 
<Directory /wt>
Options -MultiViews +SymLinksIfOwnerMatch
+
  Options -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
+
  AllowOverride None
 
</Directory>
 
</Directory>
  
 
# finally treat all fcg of fgci files as fastcgi scripts
 
# finally treat all fcg of fgci files as fastcgi scripts
 
<Files ~ "\.(fcg|fcgi)$">
 
<Files ~ "\.(fcg|fcgi)$">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride None
+
  AllowOverride None
 
</Files>
 
</Files>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
This creates an alias for the witty working directory and makes sure fastcgi will handle the  .fcg extension properly.
 
This creates an alias for the witty working directory and makes sure fastcgi will handle the  .fcg extension properly.
 
 
After these changes you need to restart apache:
 
After these changes you need to restart apache:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/apache2 restart
 
sudo /etc/init.d/apache2 restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now make the witty '''web''' dir and give ''yourself'' permissions:
 
Now make the witty '''web''' dir and give ''yourself'' permissions:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo mkdir -p /var/www/wt
 
sudo mkdir -p /var/www/wt
 
sudo chown <yourusername> /var/www/wt
 
sudo chown <yourusername> /var/www/wt
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Now we link the libwt.so we built earlier, it should be in the ld search path. Edit (as sudo) /etc/ld.so.conf and check that you have /usr/local/lib in the list. If not, add it, and then run:
Now we link the libwt.so we built earlier should be in ld search path. Edit (as sudo) /etc/ld.so.conf and check you have /usr/local/lib in the list. If not add it and then run:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo ldconfig
 
sudo ldconfig
 
</nowiki></pre>
 
</nowiki></pre>
 
 
== Install the hello world example ==
 
== Install the hello world example ==
 
 
First lets make all the examples
 
First lets make all the examples
 
 
<pre><nowiki>
 
<pre><nowiki>
 
cd ~/dev/cpp/wt/build
 
cd ~/dev/cpp/wt/build
 
make -C examples/
 
make -C examples/
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== A simple example : hello world ===
 
=== A simple example : hello world ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
cd ~/dev/cpp/wt/build/examples/hello
 
cd ~/dev/cpp/wt/build/examples/hello
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now lets install the hello example.  
 
Now lets install the hello example.  
 
 
Now run the deploy script:
 
Now run the deploy script:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
./deploy.sh
 
./deploy.sh
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now you can fire up your browser and point it to the example e.g.:
 
Now you can fire up your browser and point it to the example e.g.:
 
 
http://localhost/wt/hello/hello.fcg
 
http://localhost/wt/hello/hello.fcg
 
https://help.ubuntu.com/community/BuildingWtFromSource?action=AttachFile&do=get&target=wt_helloworld.jpg
 
https://help.ubuntu.com/community/BuildingWtFromSource?action=AttachFile&do=get&target=wt_helloworld.jpg
 
 
=== A more feature filled example : hangman ===
 
=== A more feature filled example : hangman ===
 
 
As before, just run the deploy scripts provided to install hangman:
 
As before, just run the deploy scripts provided to install hangman:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
cd ~/dev/cpp/wt/build/examples/hangman
 
cd ~/dev/cpp/wt/build/examples/hangman
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now run the deploy script:
 
Now run the deploy script:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
./deploy.sh
 
./deploy.sh
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Before the hangman example can be used, you need to create a database and point to that (I assume you already have mysql set up and running locally on your system):
 
Before the hangman example can be used, you need to create a database and point to that (I assume you already have mysql set up and running locally on your system):
 
 
<pre><nowiki>
 
<pre><nowiki>
 
cd ~/dev/cpp/wt/examples/hangman
 
cd ~/dev/cpp/wt/examples/hangman
 
mysql -u<your mysql user name> -p < dbscript
 
mysql -u<your mysql user name> -p < dbscript
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Enter your password when prompted. Also you need to make a tiny config file for Wt to be able to connect to the database properly:
 
Enter your password when prompted. Also you need to make a tiny config file for Wt to be able to connect to the database properly:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
echo "<your mysql user name>" > /var/www/wt/hangman/HangmanDb.info
 
echo "<your mysql user name>" > /var/www/wt/hangman/HangmanDb.info
 
echo "<your mysql password>" > /var/www/wt/hangman/HangmanDb.info
 
echo "<your mysql password>" > /var/www/wt/hangman/HangmanDb.info
 
</nowiki></pre>
 
</nowiki></pre>
 
+
Obviously you should replace items between < > brackets in the above instructions with their real values.
Obviously you should replace items between < > brackets in above instructions with their real values.
+
 
+
 
+
 
Now you can fire up your browser and point it to the example e.g.:
 
Now you can fire up your browser and point it to the example e.g.:
 
 
http://localhost/wt/hangman/hangman.fcg
 
http://localhost/wt/hangman/hangman.fcg
 
 
https://help.ubuntu.com/community/BuildingWtFromSource?action=AttachFile&do=get&target=wt_hangman.jpg
 
https://help.ubuntu.com/community/BuildingWtFromSource?action=AttachFile&do=get&target=wt_hangman.jpg
 
 
== FAQ ==
 
== FAQ ==
 
 
=== Question: When running make I get a bunch of 'WWebWidget: No such file of directory' type errors like this: ===
 
=== Question: When running make I get a bunch of 'WWebWidget: No such file of directory' type errors like this: ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
Scanning dependencies of target xl
 
Scanning dependencies of target xl
第258行: 第206行:
 
make: *** [all] Error 2
 
make: *** [all] Error 2
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Answer: ''' This is a known issue with the version of ccmake (v 2.2 patch 3) shipped with Ubuntu Dapper. Make sure you do the
 
'''Answer: ''' This is a known issue with the version of ccmake (v 2.2 patch 3) shipped with Ubuntu Dapper. Make sure you do the
 
 
<pre><nowiki>
 
<pre><nowiki>
 
for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done
 
for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done
 
</nowiki></pre>
 
</nowiki></pre>
 
step described in the 'source download and compilation' section above.
 
step described in the 'source download and compilation' section above.
 
 
=== Question: Its all built and installed, but when I try to run an example, I get a heap of errors in my apache error logs like this: ===
 
=== Question: Its all built and installed, but when I try to run an example, I get a heap of errors in my apache error logs like this: ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
[Tue Jul 18 15:57:08 2006] [notice] FastCGI: process manager initialized (pid 14761)
 
[Tue Jul 18 15:57:08 2006] [notice] FastCGI: process manager initialized (pid 14761)
第333行: 第277行:
 
etc
 
etc
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Answer: ''' This is probably because the witty run dir is not created and or writeable by the www-data user. Make sure your /usr/run/wt dir is present with the correct permissions.
 
'''Answer: ''' This is probably because the witty run dir is not created and or writeable by the www-data user. Make sure your /usr/run/wt dir is present with the correct permissions.
 
 
=== Question: When I try to run the hangman example, I get 'failed to remain running' messages like this: ===
 
=== Question: When I try to run the hangman example, I get 'failed to remain running' messages like this: ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
[Wed Jul 19 13:56:55 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
 
[Wed Jul 19 13:56:55 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Answer:  ''' To be answered
 
'''Answer:  ''' To be answered
 
 
=== Question: When I try to run the hangman example I get 'Exec format error' messages like this: ===
 
=== Question: When I try to run the hangman example I get 'Exec format error' messages like this: ===
 
 
<pre><nowiki>
 
<pre><nowiki>
 
[Wed Jul 19 10:07:41 2006] [error] [client 127.0.0.1] (8)Exec format
 
[Wed Jul 19 10:07:41 2006] [error] [client 127.0.0.1] (8)Exec format
第351行: 第289行:
 
referer: http://localhost/wt/hangman/hangman.fcg?wtd=Vry2TLKMnkAutkeX&js=yes&ajax=yes
 
referer: http://localhost/wt/hangman/hangman.fcg?wtd=Vry2TLKMnkAutkeX&js=yes&ajax=yes
 
</nowiki></pre>
 
</nowiki></pre>
 
 
'''Answer:  ''' This is because your apache configuration is trying to treat png images as script files. Are you sure you entered the /etc/apache2/conf.d/witty settings exactly as shown in the instructions above?
 
'''Answer:  ''' This is because your apache configuration is trying to treat png images as script files. Are you sure you entered the /etc/apache2/conf.d/witty settings exactly as shown in the instructions above?
 
----
 
----
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 21:47的最新版本

Introduction

/!\ Note: This page is maintained by Tim Sutton (tim [at] linfiniti.com). /!\ /!\ /!\ This document is now only relevant for older versions of Witty and you can now easily install Wt from an Ubuntu PPA - please visit this page for instructions : http://www.webtoolkit.eu/wt/wiki/index.php/Installing_Wt_on_Ubuntu /!\ /!\ /!\ I am really eager to try out the Wt (a.k.a. 'witty') toolkit which allows you to deploy your C++ application as an ajax web app. They have recently published a nice article which provides an overview of the design thoughts behind Wt and some samples showing how it is used. I wanted to get it running on Ubuntu Dapper using apt for dependencies as much as possible. Here is what I did:

Getting Wt installed

Install Dependencies


sudo apt-get install libapache2-mod-fastcgi libfcgi-dev libboost-regex-dev libboost-regex1.33.1 libxml++2.6-dev libxml++2.6c2a libgd2-xpm libgd2-xpm-dev libboost-dbg libboost-date-time1.33.1 libboost-date-time-dev libmysql++-dev libmysql++2c2a cmake

Note: I assume you already have apache2 installed and running on your machine.

Source Download and Compilation Next I downloaded the Wt sources from anonymous CVS (I had some problems with the latest stable release and the developers suggested using CVS head instead).

cd ~/src/
cvs -d:pserver:[email protected]:/cvsroot/witty login
cvs -z3 -d:pserver:[email protected]:/cvsroot/witty co -P wt
cd wt
mkdir build
cd build
cmake -D DEPLOYROOT=/var/www/wt -D WEBUSER=www-data -D WEBGROUP=www-data ../

Which gave me an output looking like this:

-- Check for working C compiler: gcc
-- Check for working C compiler: gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: c++
-- Check for working CXX compiler: c++ -- works
-- Looking for libxml++-2.6
-- Looking for libxml++-2.6 -- found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/timlinux/dev/cpp/wt/build

At the time of writing ubuntu provides ccmake version 2.2-patch 3. This version has a known issue that needs to be compensated for by running the following command:

for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done

Now go on to make wt:

make && sudo make install

Preparing Apache

Now lets get the fastcgi module installed for apache:

sudo a2enmod

When prompted type

fastcgi

Now reload the apache modules:

sudo /etc/init.d/apache2 force-reload

Next create /etc/apache2/conf.d/witty with the following content:

#
# Added for wt web toolkit support
#

#first an additional handler for witty's fcg extension
<IfModule mod_fastcgi.c>
  AddHandler fastcgi-script .fcg
</IfModule>

#next make an alias for witty dir
Alias /wt /var/www/wt
<Directory /wt>
  Options -MultiViews +SymLinksIfOwnerMatch
  AllowOverride None
</Directory>

# finally treat all fcg of fgci files as fastcgi scripts
<Files ~ "\.(fcg|fcgi)$">
  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  AllowOverride None
</Files>

This creates an alias for the witty working directory and makes sure fastcgi will handle the .fcg extension properly. After these changes you need to restart apache:

sudo /etc/init.d/apache2 restart

Now make the witty web dir and give yourself permissions:

sudo mkdir -p /var/www/wt
sudo chown <yourusername> /var/www/wt

Now we link the libwt.so we built earlier, it should be in the ld search path. Edit (as sudo) /etc/ld.so.conf and check that you have /usr/local/lib in the list. If not, add it, and then run:

sudo ldconfig

Install the hello world example

First lets make all the examples

cd ~/dev/cpp/wt/build
make -C examples/

A simple example : hello world

cd ~/dev/cpp/wt/build/examples/hello

Now lets install the hello example. Now run the deploy script:

./deploy.sh

Now you can fire up your browser and point it to the example e.g.: http://localhost/wt/hello/hello.fcg BuildingWtFromSource?action=AttachFile&do=get&target=wt_helloworld.jpg

A more feature filled example : hangman

As before, just run the deploy scripts provided to install hangman:

cd ~/dev/cpp/wt/build/examples/hangman

Now run the deploy script:

./deploy.sh

Before the hangman example can be used, you need to create a database and point to that (I assume you already have mysql set up and running locally on your system):

cd ~/dev/cpp/wt/examples/hangman
mysql -u<your mysql user name> -p < dbscript

Enter your password when prompted. Also you need to make a tiny config file for Wt to be able to connect to the database properly:

echo "<your mysql user name>" > /var/www/wt/hangman/HangmanDb.info
echo "<your mysql password>" > /var/www/wt/hangman/HangmanDb.info

Obviously you should replace items between < > brackets in the above instructions with their real values. Now you can fire up your browser and point it to the example e.g.: http://localhost/wt/hangman/hangman.fcg BuildingWtFromSource?action=AttachFile&do=get&target=wt_hangman.jpg

FAQ

Question: When running make I get a bunch of 'WWebWidget: No such file of directory' type errors like this:

Scanning dependencies of target xl
Building CXX object xlobject/src/CMakeFiles/xl.dir/baseobject.o
Linking CXX static library libxl.a
Scanning dependencies of target wt
In file included from ../src/wt/WInteractWidget.C:6:
../src/wt/WInteractWidget:10:22: error: WWebWidget: No such file or directory
../src/wt/WInteractWidget:18: error: expected class-name before ‘{’ token
../src/wt/WInteractWidget:22: error: expected `)' before ‘*’ token
../src/wt/WInteractWidget:27: error: expected `:' before ‘signals’
../src/wt/WInteractWidget:37: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:37: error: ‘Signal’ was not declared in this scope
../src/wt/WInteractWidget:37: error: expected primary-expression before ‘int’
../src/wt/WInteractWidget:37: error: ISO C++ forbids declaration of ‘signals’ with no type
../src/wt/WInteractWidget:37: error: expected ‘;’ before ‘int’
../src/wt/WInteractWidget:46: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:46: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:46: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:55: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:55: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:55: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:62: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:62: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:62: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:67: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:67: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:67: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:72: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:72: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:72: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:77: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:77: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:77: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:81: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:81: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:81: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:85: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:85: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:85: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:89: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:89: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:89: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:92: error: ‘Wt’ has not been declared
../src/wt/WInteractWidget:92: error: ISO C++ forbids declaration of ‘Signal’ with no type
../src/wt/WInteractWidget:92: error: expected ‘;’ before ‘<’ token
../src/wt/WInteractWidget:94: error: expected `:' before ‘slots’
../src/wt/WInteractWidget:95: error: expected primary-expression before ‘void’
../src/wt/WInteractWidget:95: error: ISO C++ forbids declaration of ‘slots’ with no type
../src/wt/WInteractWidget:95: error: expected ‘;’ before ‘void’
../src/wt/WInteractWidget:101: error: ‘DomElement’ has not been declared
../src/wt/WInteractWidget.C:8: error: expected `)' before ‘*’ token
../src/wt/WInteractWidget.C:45: error: variable or field ‘updateDom’ declared void
../src/wt/WInteractWidget.C:45: error: ‘int WInteractWidget::updateDom’ is not a static member of ‘class WInteractWidget’
../src/wt/WInteractWidget.C:45: error: ‘DomElement’ was not declared in this scope
../src/wt/WInteractWidget.C:45: error: ‘element’ was not declared in this scope
../src/wt/WInteractWidget.C:45: error: expected primary-expression before ‘bool’
../src/wt/WInteractWidget.C:45: error: initializer expression list treated as compound expression
../src/wt/WInteractWidget.C:46: error: expected ‘,’ or ‘;’ before ‘{’ token
../src/wt/WInteractWidget.C:69: error: no ‘void WInteractWidget::gotClick()’ member function declared in class ‘WInteractWidget’
../src/wt/WInteractWidget.C: In member function ‘void WInteractWidget::gotClick()’:
../src/wt/WInteractWidget.C:71: error: ‘clickData’ was not declared in this scope
../src/wt/WInteractWidget.C:71: error: ‘emit’ was not declared in this scope
make[2]: *** [../src/wt/WInteractWidget] Error 1
make[1]: *** [src/CMakeFiles/wt.dir/all] Error 2
make: *** [all] Error 2

Answer: This is a known issue with the version of ccmake (v 2.2 patch 3) shipped with Ubuntu Dapper. Make sure you do the

for i in `find . -name "build.make"`; do echo ".SUFFIXES:" >> $i; done

step described in the 'source download and compilation' section above.

Question: Its all built and installed, but when I try to run an example, I get a heap of errors in my apache error logs like this:

[Tue Jul 18 15:57:08 2006] [notice] FastCGI: process manager initialized (pid 14761)
[Tue Jul 18 15:57:08 2006] [notice] Apache/2.0.55 (Ubuntu) mod_fastcgi/2.4.2 PHP/4.4.2-1build1 configured -- resuming normal operations
[Tue Jul 18 15:57:09 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14767)
Creating new session: DyOaSyj6eb5T5nVN
Spawned new application: pid=14769
bind: No such file or directory
SIGCHLD received
Child pid is 14769
Deleting session: DyOaSyj6eb5T5nVN
[Tue Jul 18 15:57:13 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14770)
[Tue Jul 18 15:57:16 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14771)
[Tue Jul 18 15:57:19 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14772)
connect: No such file or directory
Giving up on session: DyOaSyj6eb5T5nVN
Creating new session: lSwANRPjGVEqcVCu
Spawned new application: pid=14773
bind: No such file or directory
SIGCHLD received
Child pid is 14773
Deleting session: lSwANRPjGVEqcVCu
[Tue Jul 18 15:57:22 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14774)
[Tue Jul 18 15:57:25 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14775)
[Tue Jul 18 15:57:28 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14776)
connect: No such file or directory
Giving up on session: lSwANRPjGVEqcVCu
Creating new session: FAScLywZHXv9eIIa
Spawned new application: pid=14777
bind: No such file or directory
SIGCHLD received
Child pid is 14777
Deleting session: FAScLywZHXv9eIIa
[Tue Jul 18 15:57:31 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14778)
[Tue Jul 18 15:57:34 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14779)
[Tue Jul 18 15:57:37 2006] [warn] FastCGI: scheduled the start of the last (dynamic) server "/var/www/wt/hangman/hangman.fcg" process: reached dynamicMaxClassProcs (10)
[Tue Jul 18 15:57:37 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" started (pid 14780)
connect: No such file or directory
Giving up on session: FAScLywZHXv9eIIa
Creating new session: yfW8iOFppMTodz92
Spawned new application: pid=14781
bind: No such file or directory
SIGCHLD received
Child pid is 14781
Deleting session: yfW8iOFppMTodz92
[Tue Jul 18 15:57:43 2006] [error] [client 127.0.0.1] FastCGI: comm with (dynamic) server "/var/www/wt/hangman/hangman.fcg" aborted: (first read) idle timeout (30 sec)
[Tue Jul 18 15:57:43 2006] [error] [client 127.0.0.1] FastCGI: incomplete headers (0 bytes) received from server "/var/www/wt/hangman/hangman.fcg"
connect: No such file or directory
Giving up on session: yfW8iOFppMTodz92
Creating new session: veXzGFFpqTIr0W65
Spawned new application: pid=14782
bind: No such file or directory
SIGCHLD received
Child pid is 14782
Deleting session: veXzGFFpqTIr0W65
connect: No such file or directory
Giving up on session: veXzGFFpqTIr0W65
Creating new session: ZWDDcvLjlI23NcFo
Spawned new application: pid=14783
bind: No such file or directory
SIGCHLD received
.
.
.
etc

Answer: This is probably because the witty run dir is not created and or writeable by the www-data user. Make sure your /usr/run/wt dir is present with the correct permissions.

Question: When I try to run the hangman example, I get 'failed to remain running' messages like this:

[Wed Jul 19 13:56:55 2006] [warn] FastCGI: (dynamic) server "/var/www/wt/hangman/hangman.fcg" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

Answer: To be answered

Question: When I try to run the hangman example I get 'Exec format error' messages like this:

[Wed Jul 19 10:07:41 2006] [error] [client 127.0.0.1] (8)Exec format
error: exec of '/var/www/wt/hangman/icons/hangman1.png' failed,
referer: http://localhost/wt/hangman/hangman.fcg?wtd=Vry2TLKMnkAutkeX&js=yes&ajax=yes

Answer: This is because your apache configuration is trying to treat png images as script files. Are you sure you entered the /etc/apache2/conf.d/witty settings exactly as shown in the instructions above?