http://redmine.emweb.be/
http://redmine.emweb.be/favicon.ico?1693408525
2010-09-15T08:50:04Z
Redmine
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1226
2010-09-15T08:50:04Z
Koen Deforche
koen@emweb.be
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>InProgress</i></li><li><strong>Assignee</strong> changed from <i>Koen Deforche</i> to <i>Wim Dumon</i></li></ul><p>Wim,</p>
<p>This is a mingw problem, you need to link against a networking library (winsock) ?</p>
<p>Regards,<br><br>
koen</p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1228
2010-09-15T10:15:34Z
Wim Dumon
wim@emweb.be
<ul></ul><p>Correct. Add ws2_32.lib to the linker command.</p>
<p>What MingW installation are you using?</p>
<p>Regards,<br><br>
Wim.</p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1229
2010-09-15T13:20:00Z
le batoto
le.batoto@gmail.com
<ul></ul><p>Hi Wim,</p>
<p>I use gcc version 4.4.1 (TDM-2 mingw32) but I didn't have a problème like this with wt 3.1.4 during compilation. I use the same compilator.</p>
<p>Regards,<br><br>
Lebatoto</p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1230
2010-09-15T18:44:03Z
Wim Dumon
wim@emweb.be
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>20</i></li></ul><p>I'll take a look at it</p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1232
2010-09-16T12:51:46Z
Wim Dumon
wim@emweb.be
<ul><li><strong>% Done</strong> changed from <i>20</i> to <i>50</i></li></ul><p>Hey,</p>
<p>Thanks for the TDM pointer. I identified two problems while building on MinGW, for which the patches are below (will be in public git soon, and in the next release).<br><br>
However, I still have problems with boost.thread (v1.44.0). For some unclear reason, symbols like <em>imp</em>__ZN5boost6threadD1Ev are undefined. I'm linking to a static boost.thread library, so I don't think that <em>imp</em> prefix is correct. Are you doing something special to get this right?</p>
<pre><code>@@ -287,11 +287,15 @@ PROPERTIES
VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
SOVERSION ${WT_SOVERSION}
DEBUG_POSTFIX "d"
)
+IF(WIN32)
+ TARGET_LINK_LIBRARIES(wt ws2_32)
+ENDIF(WIN32)
+
IF(MSVC)
SET_TARGET_PROPERTIES(wt PROPERTIES COMPILE_FLAGS "/wd4251 /wd4275 /wd4355 /wd4800 /wd4996 /wd4101")
- TARGET_LINK_LIBRARIES(wt winmm wsock32)
+ TARGET_LINK_LIBRARIES(wt winmm)
ENDIF(MSVC)
SUBDIRS(isapi fcgi http)
@@ -166,11 +166,11 @@ void WLogger::setStream(std::ostream& o)
void WLogger::setFile(const std::string& path)
{
if (ownStream_)
delete o_;
-#ifdef WIN32
+#ifdef _MSC_VER
FILE *file = _fsopen(path.c_str(), "at", _SH_DENYNO);
if (file) {
o_ = new std::ofstream(file);
} else {
o_ = new std::ofstream(path.c_str(), std::ios_base::out | std::ios_base::ate);
</code></pre>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1248
2010-09-16T14:04:35Z
Tomasz Kalicki
tkalicki@gmail.com
<ul></ul><p>There is a problem with boost.thread.</p>
<p>Reason:<br><br>
Default on Windows bjam builds only static multithreaded libraries in debug and release modes, using shared runtime.<br><br>
But Wt is trying to link boost.thread as shared library due to bug in boost/thread/detail/config.hpp</p>
<p>Fix for that file:</p>
<pre><code>--- oldconfig.hpp 2010-07-09 20:13:09.000000000 +0200
+++ config.hpp 2010-09-16 11:11:48.000000000 +0200
@@ -37,7 +37,7 @@
#elif defined(BOOST_THREAD_USE_LIB) //Use lib
#else //Use default
# if defined(BOOST_THREAD_PLATFORM_WIN32)
-# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)
+# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) || defined(__MINGW32__)
//For compilers supporting auto-tss cleanup
//with Boost.Threads lib, use Boost.Threads lib
# define BOOST_THREAD_USE_LIB
</code></pre>
<p>Or we can define BOOST_THREAD_USE_LIB without changing any boost stuff</p>
<p>Similar problem to:<br><br>
<a href="https://svn.boost.org/trac/boost/ticket/4614" class="external">https://svn.boost.org/trac/boost/ticket/4614</a></p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1249
2010-09-16T14:07:33Z
le batoto
le.batoto@gmail.com
<ul></ul><p>Hi Wim.</p>
<p>I use Boost library version 1.43.0 and I have builded all with the same TDM-GCC-4.4.1_2 compilator.<br><br>
I have used the void WLogger::setFile(const std::string& path) in the wt version 3.1.3 instead.<br><br>
I have made your poposition and i have added -lws2_32 and -lwsock32 within the file link.txt in the directory test/CMakeFiles/test.dir but I have another problem during buld when it's time to compile SocketNotifier.C in the directory wt-3.1.5\examples\feature\socketnotifier. The compilator don't find the définition of getaddrinfo(...) and freeaddrinfo(...) functions. The build phase is made about 99% when it's happen.</p>
<p>I have many problems too when -lws2_32, -lwsock32 and -lmswsock aren't placed on the last of the list of libraries within link.txt. I don't understand why!</p>
<p>I want to try with loaden mingw32-4.4.3-4 but I don't have a time. I'll make it in future.</p>
<p>I would to suggest you to try with tdm-gcc-4.5.1.exe compilator, the last version of tdm-gcc.</p>
<p>Another question Wim, what IDE do you use for the test?(Eclipse, Code::Block, QCreator, ....)</p>
<p>Regards.<br><br>
Lebatoto</p>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1254
2010-09-16T17:09:19Z
Wim Dumon
wim@emweb.be
<ul></ul><p>Tomas,</p>
<p>Thank you, I suspected that some patch was required or that I did something stupid. I fixed Wt's CMakeLists to include the define too if static libs are used on windows. I also had problems with some _tls symbol which I had to work around.</p>
<p>Lebatoto,</p>
<p>setFile is indeed another issue that I encountered and resolved.</p>
<p>The order in which libraries are specified on the ld command line is indeed important. I guess you'll find more information in the documentation of the gnu binutils.</p>
<p>Never mind the SocketNotifier feature example. MinGW apparantly doesn't support how it does name lookups, but the intention is merely to demonstrate how one Wt class (WSocketNotifier) works. Look at the code if you're interested in this class. Use 'make -k' to avoid that make stops at the first error it encounters. I'll exclude the SocketNotifier example from the MinGW build.</p>
<p>I use Visual Studio on Windows. If I compile with MinGW, I use the command line and vim as editor.</p>
<p>I wrote my installation instructions on the Wiki: <a href="http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MinGW" class="external">http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_MinGW</a></p>
<p>I will also include this patch in the next release (ISAPI does not compile becaue httpext.h is too old):</p>
<pre><code>@@ -164,11 +164,13 @@ SET(WTHTTP_CONFIGURATION ${CONFIGDIR}/wthttpd CACHE PATH "Path for the wthttpd c
SET(WEBUSER apache CACHE STRING "Webserver username (e.g. apache or www)")
SET(WEBGROUP apache CACHE STRING "Webserver groupname (e.g. apache or www or users)")
IF(WIN32)
SET(CONNECTOR_FCGI FALSE)
- OPTION(CONNECTOR_ISAPI "Compile in ISAPI connector (libwtisapi) ?" ON)
+ IF(NOT MINGW)
+ OPTION(CONNECTOR_ISAPI "Compile in ISAPI connector (libwtisapi) ?" ON)
+ ENDIF(NOT MINGW)
ELSE(WIN32)
OPTION(CONNECTOR_FCGI "Compile in FCGI connector (libwtfcgi) ?" ON)
SET(CONNECTOR_ISAPI OFF)
ENDIF(WIN32)
OPTION(CONNECTOR_HTTP "Compile in stand-alone httpd connector (libwthttp) ?" ON)
@@ -244,10 +246,14 @@ FIND_PACKAGE(Doxygen)
INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIRS})
LINK_DIRECTORIES(${BOOST_LIB_DIRS})
IF(WIN32)
IF(BOOST_DYNAMIC)
ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
+ ELSE(BOOST_DYNAMIC)
+ # You could expect that this is the default when BOOST_ALL_DYN_LINK
+ # is not set, but this is problematic for cygwin
+ ADD_DEFINITIONS(-DBOOST_THREAD_USE_LIB)
ENDIF(BOOST_DYNAMIC)
ADD_DEFINITIONS(
-D_CRT_SECURE_NO_WARNINGS
-Dinline=__inline
-D_SCL_SECURE_NO_WARNINGS
</code></pre>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1256
2010-09-16T17:17:47Z
Wim Dumon
wim@emweb.be
<ul><li><strong>Status</strong> changed from <i>InProgress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>50</i> to <i>100</i></li></ul>
Wt - Bug #516: build failed on linking phase
http://redmine.emweb.be/issues/516?journal_id=1472
2010-11-02T09:33:21Z
Koen Deforche
koen@emweb.be
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul><p>Fixed in 3.1.6</p>