Hi Folks,
I'm a web-developer and for now I became a fan of web-developing in C++. Since I have difficulties building some of these packages on Freebsd, I was thought to send a request to FreeBSD community for adding these really nice tools to Ports tree.
http://www.nongnu.org/fastcgipp/
http://www.webtoolkit.eu/wt
http://mumbleface.net/jwsmtp
http://cppcms.sourceforge.net/wikipp/en/page/main
http://soci.sourceforge.net/
After fighting for hours and hours and figuring out so many things, I was successfully built some of 'em.
It's really appreciated to see these packages in Rock-Solid Server OS: FreeBSD.
*** Wt ***
This one kills me until built successfully:
There's a wiki on the official website for FreeBSD, But you know.....
Forget about it!! it's just good to start.
http://redmine.webtoolkit.eu/wiki/wt/Installing_Wt_on_FreeBSD
tar xzf wt-3.1.0a.tar.gz
cd wt-3.1.0 && mkdir build && cd build
For single-thread:
For multi-thread:
Around line 223-229 of ../cmake/WtFindBoost-vintage.txt
Change
To
Also change
To
That really helps: https://forums.freebsd.org/showthread.php?p=34403
Repeat that for: ../cmake/WtFindBoost-cmake.txt
In CMakeCache.txt
for each BOOST_*_LIB_MT replace
:UNINITIALIZED= with :FILEPATH=
In some stage everything stops and you got this error:
Or something like this for gcc44 insted of /usr/bin/ld: cannot find -ldl
Note that I used gcc44 instead of 4.2.1 that ships with standard FreeBSD Installation, this way:
Hit
Remove -ldl from
The wiki says:
But its worked fine, and I never did that.
*** fastcgi++ ***
http://www.nongnu.org/fastcgipp/doc/1.2/
The documentation says:
But when you hit make:
After some hours I figured out you must use gmake instead of make.
And in short time after hitting gmake this error appears on the output:
And after sometime I noticed that you must edit "include/fastcgi++/protocol.hpp"
to
Continue the installation process;
Now everything just works fine.
*** jwsmtp ***
http://mumbleface.net/jwsmtp
make stops with an error like this:
You must add
at the top or near the top of the mailer.h header: "jwsmtp/jwsmtp/mailer.h".
http://sourceforge.net/projects/jwsmtp/forums/forum/167802/topic/2190151
Still didn't have enough time to work on CppCMS & DbiXX and SOCI.
I'm a web-developer and for now I became a fan of web-developing in C++. Since I have difficulties building some of these packages on Freebsd, I was thought to send a request to FreeBSD community for adding these really nice tools to Ports tree.
http://www.nongnu.org/fastcgipp/
http://www.webtoolkit.eu/wt
http://mumbleface.net/jwsmtp
http://cppcms.sourceforge.net/wikipp/en/page/main
http://soci.sourceforge.net/
After fighting for hours and hours and figuring out so many things, I was successfully built some of 'em.
It's really appreciated to see these packages in Rock-Solid Server OS: FreeBSD.
*** Wt ***
This one kills me until built successfully:
There's a wiki on the official website for FreeBSD, But you know.....
Forget about it!! it's just good to start.
http://redmine.webtoolkit.eu/wiki/wt/Installing_Wt_on_FreeBSD
tar xzf wt-3.1.0a.tar.gz
cd wt-3.1.0 && mkdir build && cd build
For single-thread:
Code:
cmake -DBOOST_DIR=/usr/local -DCONNECTOR_FCGI=ON -DCONNECTOR_HTTP=OFF -DWEBUSER=www -DWEBGROUP=www ../
For multi-thread:
Around line 223-229 of ../cmake/WtFindBoost-vintage.txt
Change
Code:
SET(BOOST_WT_LIBRARIES
${BOOST_THREAD_LIB}
${BOOST_REGEX_LIB}
${BOOST_SIGNALS_LIB}
${BOOST_SYSTEM_LIB}
${BOOST_PO_LIB}
${BOOST_DT_LIB})
Code:
SET(BOOST_WT_LIBRARIES
${BOOST_THREAD_LIB_MT}
${BOOST_REGEX_LIB_MT}
${BOOST_SIGNALS_LIB_MT}
${BOOST_SYSTEM_LIB_MT}
${BOOST_PO_LIB_MT}
${BOOST_DT_LIB_MT} -pthread)
Also change
Code:
SET(OTHER_LIBS "-lpthread")
Code:
SET(OTHER_LIBS "-pthread")
That really helps: https://forums.freebsd.org/showthread.php?p=34403
Repeat that for: ../cmake/WtFindBoost-cmake.txt
Code:
cmake -DBOOST_DIR=/usr/local -DBOOST_FS_LIB_MT=/usr/local/lib/libboost_filesystem.so
-DBOOST_THREAD_LIB_MT=/usr/local/lib/libboost_thread.so
-DBOOST_REGEX_LIB_MT=/usr/local/lib/libboost_regex.so
-DBOOST_SIGNALS_LIB_MT=/usr/local/lib/libboost_signals.so
-DBOOST_SYSTEM_LIB_MT=/usr/local/lib/libboost_system.so
-DBOOST_PO_LIB_MT=/usr/local/lib/libboost_program_options.so
-DBOOST_DT_LIB_MT=/usr/local/lib/libboost_date_time.so
-DCONNECTOR_FCGI=ON -DCONNECTOR_HTTP=OFF -DWEBUSER=www -DWEBGROUP=www ../
In CMakeCache.txt
for each BOOST_*_LIB_MT replace
:UNINITIALIZED= with :FILEPATH=
In some stage everything stops and you got this error:
Code:
Linking CXX shared library libwtdbosqlite3.so
/usr/bin/ld: cannot find -ldl
*** Error code 1
Stop in /root/wt-3.1.0/build.
*** Error code 1
Stop in /root/wt-3.1.0/build.
*** Error code 1
Stop in /root/wt-3.1.0/build.
/usr/bin/ld: cannot find -ldl
Or something like this for gcc44 insted of /usr/bin/ld: cannot find -ldl
Code:
/usr/local/lib/gcc44/gcc/i386-portbld-freebsd8.0/4.4.4/../../../../../i386-portbld-freebsd8.0/bin/ld: cannot find -ldl
Note that I used gcc44 instead of 4.2.1 that ships with standard FreeBSD Installation, this way:
Code:
cd /usr/local/bin
ln -s g++44 g++
ln -s gcc44 gcc
ln -s c++44 c++
ln -s cpp44 cpp
setenv PATH "/usr/local/bin:$PATH"
Hit
Code:
find .. | xargs grep 'ldl'
Remove -ldl from
Code:
./src/Wt/Dbo/backend/CMakeFiles/wtdbosqlite3.dir/link.txt
./test/CMakeFiles/test.dir/link.txt
./examples/wt-homepage/CMakeFiles/Home.wt.dir/link.txt
./examples/blog/CMakeFiles/blog.wt.dir/link.txt
Code:
make && make install
The wiki says:
Code:
ln -s /usr/local/lib/libwt.so /usr/lib
ln -s /usr/local/lib/libwtfcgi.so /usr/lib
But its worked fine, and I never did that.
*** fastcgi++ ***
http://www.nongnu.org/fastcgipp/doc/1.2/
The documentation says:
Code:
tar -xvjf fastcgi++-1.2.tar.bz2
cd fastcgi++-1.2
make
make install
But when you hit make:
Code:
"Makefile", line 1: Need an operator
"Makefile", line 3: Need an operator
"Makefile", line 5: Need an operator
"Makefile", line 6: warning: duplicate script for target "ifndef" ignored
"Makefile", line 7: Need an operator
"Makefile", line 9: Need an operator
"Makefile", line 11: Need an operator
"Makefile", line 13: Need an operator
"Makefile", line 14: warning: duplicate script for target "ifdef" ignored
"Makefile", line 15: Need an operator
"Makefile", line 17: Need an operator
"Makefile", line 82: Missing dependency operator
"Makefile", line 84: Need an operator
"Makefile", line 88: Missing dependency operator
"Makefile", line 89: warning: duplicate script for target "ifeq" ignored
"Makefile", line 89: warning: duplicate script for target "(,true)" ignored
"Makefile", line 90: Need an operator
"Makefile", line 94: Missing dependency operator
"Makefile", line 95: warning: duplicate script for target "ifeq" ignored
"Makefile", line 95: warning: duplicate script for target "(,true)" ignored
"Makefile", line 96: Need an operator
"Makefile", line 100: Missing dependency operator
"Makefile", line 101: warning: duplicate script for target "ifeq" ignored
"Makefile", line 101: warning: duplicate script for target "(,true)" ignored
"Makefile", line 102: Need an operator
"Makefile", line 113: Missing dependency operator
"Makefile", line 114: warning: duplicate script for target "ifeq" ignored
"Makefile", line 114: warning: duplicate script for target "(,true)" ignored
"Makefile", line 115: Need an operator
"Makefile", line 119: Missing dependency operator
"Makefile", line 120: warning: duplicate script for target "ifeq" ignored
"Makefile", line 120: warning: duplicate script for target "(,true)" ignored
"Makefile", line 121: Need an operator
make: fatal errors encountered -- cannot continue
After some hours I figured out you must use gmake instead of make.
And in short time after hitting gmake this error appears on the output:
Code:
In file included from include/fastcgi++/exceptions.hpp:28,
from include/fastcgi++/http.hpp:35,
from lib/src/http.cpp:24:
include/fastcgi++/protocol.hpp:27:20: error: endian.h: No such file or directory
gmake: *** [lib/http-static.o] Error 1
And after sometime I noticed that you must edit "include/fastcgi++/protocol.hpp"
Code:
#include <endian.h>
Code:
#include <sys/endian.h>
Continue the installation process;
Now everything just works fine.
*** jwsmtp ***
http://mumbleface.net/jwsmtp
make stops with an error like this:
Code:
mailer.cpp: In member function 'void jwsmtp::mailer::operator()()':
mailer.cpp:438: error: 'strcpy' was not declared in this scope
mailer.cpp: In member function 'std::vector<char, std::allocator<char> > jwsmtp::mailer::makesmtpmessage() const':
mailer.cpp:733: warning: deprecated conversion from string constant to 'char*'
*** Error code 1
Stop in /root/jwsmtp-1.32.15/jwsmtp/jwsmtp.
*** Error code 1
Stop in /root/jwsmtp-1.32.15/jwsmtp.
*** Error code 1
Stop in /root/jwsmtp-1.32.15.
*** Error code 1
Stop in /root/jwsmtp-1.32.15.
You must add
Code:
#include <cstring>
http://sourceforge.net/projects/jwsmtp/forums/forum/167802/topic/2190151
Still didn't have enough time to work on CppCMS & DbiXX and SOCI.