by dan64 » Sat Feb 23, 2013 10:01 am
$this->bbcode_second_pass_quote('farsheedj', '
')No luck with second method. Get this error.
Starting package()...
==> Build: ddconsole...
[ 33%] [ 66%] Building CXX object CMakeFiles/ddconsole.dir/ddconsole.cpp.o
Building CXX object CMakeFiles/ddconsole.dir/tmp/dd/src/dd/src/include/netpptk/netpptk.cpp.o
In file included from /usr/include/sys/socket.h:40,
from /tmp/dd/src/dd/src/include/netpptk/netpptk.cpp:26:
/usr/include/bits/socket.h:366:24: error: asm/socket.h: No such file or directory
In file included from /usr/include/sys/socket.h:40,
from /tmp/dd/src/dd/src/ddconsole/../include/netpptk/netpptk.h:22,
from /tmp/dd/src/dd/src/ddconsole/ddconsole.cpp:19:
/usr/include/bits/socket.h:366:24: error: asm/socket.h: No such file or directory
/tmp/dd/src/dd/src/ddconsole/ddconsole.cpp:22:25: error: linux/fcntl.h: No such file or directory
/tmp/dd/src/dd/src/include/netpptk/netpptk.cpp: In constructor 'tkSock::tkSock()':
/tmp/dd/src/dd/src/include/netpptk/netpptk.cpp:86: error: 'SOL_SOCKET' was not declared in this scope
/tmp/dd/src/dd/src/include/netpptk/netpptk.cpp:86: error: 'SO_REUSEADDR' was not declared in this scope
................................................................................
make[2]: *** [CMakeFiles/ddconsole.dir/tmp/dd/src/dd/src/include/netpptk/netpptk.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/ddconsole.dir/ddconsole.cpp.o] Error 1
make[1]: *** [CMakeFiles/ddconsole.dir/all] Error 2
make: ***
[all] Error 2
Aborting...
The problem is that the DownloadDaemon compile well only with the boost library installed. In this case is necessary change in PKGBUILD the row where cmake is invocated as follows:
$this->bbcode_second_pass_code('', '
cmake . -DUSE_STD_THREAD=0 -DCMAKE_CXX_LINK_FLAGS:STRING="-lboost_system"
')
A
workaround is to adapt the gnu c/c++ include
to be compatible with the boost libraries:
1) add in <thread> (in the include gnu c++ directory) the following lines:
#include <mutex>
#include <condition_variable>2) add in /usr/include/stdlib.h :
#include <unistd.h>With these 2 little patchs the DownloadDaemon should be able to compile without errors using the standard threads (i.e. without the boost libraries).
It worked for me using "gcc 4.7.2-3"
Regards,
Danilo