Boost logo

Boost Testing :

Subject: Re: [Boost-testing] [bronf][mingw] pthreads not linked (was Re: [sandia][intel-linux] pthreads not linked)
From: frederic.bron_at_[hidden]
Date: 2008-12-17 00:30:55

OK, -DBOOST_POSIX_THREAD has gone with threadapi=win32 target-os=windows on the command line of bjam (not in user-config.jam) but not more success for the regression tests.
I do not see -DBOOST_WINDOWS_API -DBOOST_HAS_WINTHREADS -DBOOST_THREAD_WIN32 on the command line, maybe it is defined in a config file somewhere?
Tomorrow, I will try again adding <compileflags>-DBOOST_HAS_WINTHREADS <compileflags>-DBOOST_WINDOWS_API <compileflags>-DBOOST_THREAD_WIN32 to user-config.jam.
This is also strange: report pages are empty on the web site:

Here are some issues found in bjam.log:

../boost/asio/detail/socket_types.hpp:34:5: warning: #warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately
../boost/asio/detail/socket_types.hpp:35:5: warning: #warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target)
../boost/asio/detail/socket_types.hpp:69:5: #error You must add -D__USE_W32_SOCKETS to your compiler options.

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:635: error: declaration of C function `int gethostname(char*, int)' conflicts with
/usr/include/sys/unistd.h:206: error: previous declaration `int gethostname(char*, size_t)' here

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:635: error: declaration of C function `int gethostname(char*, int)' conflicts with
/usr/include/sys/unistd.h:206: error: previous declaration `int gethostname(char*, size_t)' here

../boost/asio/detail/win_fd_set_adapter.hpp: In member function `bool boost::asio::detail::win_fd_set_adapter::is_set(boost::asio::detail::socket_type) const':
../boost/asio/detail/win_fd_set_adapter.hpp:56: error: `__WSAFDIsSet' undeclared (first use this function)

../boost/test/impl/debug.ipp: In function `void boost::debug::debugger_break()':
../boost/test/impl/debug.ipp:692: error: `__try' undeclared (first use this function)
../boost/test/impl/debug.ipp:692: error: expected `;' before '{' token
../boost/test/impl/debug.ipp:702: error: `__except' undeclared (first use this function)
../boost/test/impl/debug.ipp:703: error: expected `;' before '{' token
../boost/test/impl/debug.ipp:710: error: `__debugbreak' undeclared (first use this function)

    "/usr/bin/g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -mthreads -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_DLL=1 -I".." -c -o i:\boost_regression_gcc_mingw-3.4.4
\results\boost\bin.v2\libs\thread\build\gcc-mingw_3.4.4\debug\target-os-windows\threadapi-win32\threading-multi\win32\thread.o" "i:\boost_regression_gcc_mingw-3.4.4

i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp: In function `void boost::<unnamed>::create_current_thread_tls_key()':
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:32: error: `tss_cleanup_implemented' undeclared (first use this function)
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:32: error: (Each undeclared identifier is reported only once for each function it appears in.)
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp: In member function `void boost::thread::start_thread()':
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:188: error: 'struct boost::detail::thread_data_base' has no member named 'id'
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:188: error: `_beginthreadex' undeclared (first use this function)
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:193: error: `intrusive_ptr_add_ref' undeclared (first use this function)
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:194: error: `boost::detail::win32' has not been declared
i:\boost_regression_gcc_mingw-3.4.4\boost\libs\thread\src\win32\thread.cpp:194: error: `handle' undeclared (first use this function)

Frédéric Bron

boost-testing-bounces_at_[hidden] a écrit sur 15/12/2008 09:41:06 :

> frederic.bron_at_[hidden] wrote:
> >
> >
> > boost-testing-bounces_at_[hidden] a écrit sur 13/12/2008 17:58:39 :
> >> frederic.bron_at_[hidden] wrote:
> >>
> >> >
> >> >
> >> > I have just rerun the regression tests with the following user-
> config.jam:
> >> >
> >> > using gcc : mingw_3.4.4 : /usr/bin/g++ : <compilerflags>-mno-cygwin
> >> > <compileflags>-DBOOST_WINDOWS_API <compileflags>-
> >> DBOOST_HAS_WINTHREADS <linkflags>-mno-cygwin ;
> >> >
> >> > However, the result is not better because:
> >> >
> >> > nearly each time -DBOOST_HAS_WINTHREADS is used, -
> >> DBOOST_THREAD_POSIX is used (257 times)!
> >> > 82 times, -DBOOST_HAS_WINTHREADS is used alone.
> >> >
> >> > I am pretty sure it is because I run mingw from cygwin... any
> >> workaround to say to bjam I am using
> >> > a pure win32 application?
> >>
> >> I am not sure what you're trying to say. Are you using target-
> >> os=windows when building mingw
> >> tests?
> >
> > No, did not know this option. Seems like what I am looking for. Is
> it an option of bjam that I
> > should give to as --bjam-options=?
> I think so. It is probably best to run tests for mingw only,
> specifying the mingw gcc as
> toolset, and target-os=windows as bjam options.
> > Can I remove the compileflags options from
> > user-config.jam if I use target-os=windows?
> -mno-cygwin
> will have to stay. The defines probably should go.
> - Volodya
> _______________________________________________
> Boost-Testing mailing list
> Boost-Testing_at_[hidden]

Avis :
Ce message et toute pièce jointe sont la propriété d'Alcan et sont destinés seulement aux personnes ou à l'entité à qui le message est adressé. Si vous avez reçu ce message par erreur, veuillez le
détruire et en aviser l'expéditeur par courriel. Si vous n'êtes pas le destinataire du message, vous n'êtes pas autorisé à utiliser, à copier ou à divulguer le contenu du message ou ses pièces jointes
en tout ou en partie.

This message and any attachments are the property of Alcan and are intended solely for the named recipients or entity to whom this message is addressed. If you have received this message in error
please inform the sender via e-mail and destroy the message. If you are not the intended recipient you are not allowed to use, copy or disclose the contents or attachments in whole or in part.

Boost-testing list run by mbergal at