[swift-users] boost-1.56.0 trouble

Thomas Klausner tk at giga.or.at
Mon Aug 18 11:15:13 CEST 2014


Hi!

I've recently updated boost from 1.55.0 to 1.56.0. Since then,
swift-2.0 doesn't build any longer.

I've tried swift from git to find out if a solution is available, but
swift from git doesn't build either, with nearly the same problem.
Linking fails with:

Swiften/libSwiften.a(CombinedAvatarProvider.o): In function `Swift::CombinedAvatarProvider::handleAvatarChanged(Swift::JID const&)':
swift/Swiften/Avatars/CombinedAvatarProvider.cpp:43: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& boost::operator<< <char, std::char_traits<char>, std::string>(std::basic_ostream<char, std::char_traits<char> >&, boost::optional<std::string> const&)'
Swiften/libSwiften.a(CombinedAvatarProvider.o): In function `Swift::CombinedAvatarProvider::getCombinedAvatarAndCache(Swift::JID const&) const':
swift/Swiften/Avatars/CombinedAvatarProvider.cpp:53: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& boost::operator<< <char, std::char_traits<char>, std::string>(std::basic_ostream<char, std::char_traits<char> >&, boost::optional<std::string> const&)'
Swiften/libSwiften.a(StreamResumeSerializer.o): In function `bool boost::detail::lexical_istream_limited_src<char, std::char_traits<char>, true, 2ul>::shl_input_streamable<boost::optional<unsigned int> const>(boost::optional<unsigned int> const&)':
.../include/boost/lexical_cast.hpp:1408: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& boost::operator<< <char, std::char_traits<char>, unsigned int>(std::basic_ostream<char, std::char_traits<char> >&, boost::optional<unsigned int> const&)'

I don't know how to solve this. Does anyone have any suggestions?

Additionally, I needed patches for swift-git to fix "cerr is not part
of std" warnings and to add a header to get a definition for struct
timeval. These are attached, please commit.

Cheers,
 Thomas

P.S.: In case it matters, that's on NetBSD-7.99.1/x86_64 using
gcc-4.8.3.
-------------- next part --------------
$NetBSD$

Make cerr a member of std.

--- Swiften/Client/ClientSession.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/Client/ClientSession.cpp
@@ -46,6 +46,8 @@
 #include <Swiften/TLS/ServerIdentityVerifier.h>
 #include <Swiften/Base/Log.h>
 
+#include <iostream>
+
 #ifdef SWIFTEN_PLATFORM_WIN32
 #include <Swiften/Base/WindowsRegistry.h>
 #endif
$NetBSD$

Make cerr a member of std.

--- Swiften/FileTransfer/IBBReceiveSession.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/FileTransfer/IBBReceiveSession.cpp
@@ -15,6 +15,7 @@
 #include <Swiften/Queries/SetResponder.h>
 
 #include <cassert>
+#include <iostream>
 
 namespace Swift {
 
$NetBSD$

Make cerr a member of std.

--- Swiften/FileTransfer/IncomingFileTransferManager.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/FileTransfer/IncomingFileTransferManager.cpp
@@ -16,6 +16,8 @@
 #include <Swiften/Jingle/Jingle.h>
 #include <Swiften/FileTransfer/IncomingJingleFileTransfer.h>
 
+#include <iostream>
+
 namespace Swift {
 
 IncomingFileTransferManager::IncomingFileTransferManager(
$NetBSD$

Make cerr a member of std.

--- Swiften/Jingle/JingleResponder.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/Jingle/JingleResponder.cpp
@@ -13,6 +13,8 @@
 
 #include <Swiften/Base/Log.h>
 
+#include <iostream>
+
 namespace Swift {
 
 JingleResponder::JingleResponder(JingleSessionManager* sessionManager, IQRouter* router) : SetResponder<JinglePayload>(router), sessionManager(sessionManager), router(router) {
$NetBSD$

Make cerr a member of std.

--- Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/Parser/PayloadParsers/JingleS5BTransportMethodPayloadParser.cpp
@@ -7,6 +7,8 @@
 #include <boost/lexical_cast.hpp>
 #include <boost/optional.hpp>
 
+#include <iostream>
+
 #include "JingleS5BTransportMethodPayloadParser.h"
 
 #include <Swiften/Base/Log.h>
$NetBSD$

Make cerr a member of std.

--- Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp.orig	2014-08-18 06:33:47.000000000 +0000
+++ Swiften/Serializer/PayloadSerializers/JingleContentPayloadSerializer.cpp
@@ -20,6 +20,8 @@
 #include <Swiften/Serializer/PayloadSerializers/JingleIBBTransportPayloadSerializer.h>
 #include <Swiften/Serializer/PayloadSerializers/JingleS5BTransportPayloadSerializer.h>
 
+#include <iostream>
+
 namespace Swift {
 
 JingleContentPayloadSerializer::JingleContentPayloadSerializer() {
-------------- next part --------------
$NetBSD$

Include missing header for struct timeval.

--- 3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c.orig	2014-08-18 06:33:47.000000000 +0000
+++ 3rdParty/LibMiniUPnPc/src/miniupnpc/connecthostport.c
@@ -33,6 +33,7 @@
 #ifndef USE_GETHOSTBYNAME
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <sys/time.h>
 #endif /* #ifndef USE_GETHOSTBYNAME */
 #endif /* #else WIN32 */
 


More information about the swift-users mailing list