Closed drook closed 4 years ago
You have DummyConnectionServer(Factory)
classes installed both from spectrum and swiften, swiften classes should not be installed system-wide, they are for tests only.
To be honest, I don't quite understand this (but I have only shallow knowledge of C++). I have only Swiften headers system-wide installed (bunch of various *.h files installed by the Swiften installer, and this looks totally valid to me), and they are directly mentioned in spectrum2: if I just delete all of the headers, or at least the headers mentioned in the error (leaving out only the libraries and swiften-config binary), spectrum2 stops building, because if cannot find it's includes (again, this looks totally predictable too). I can overcome the first error - mentioned above - by wiping out the content of the swiften ConnectionServerFactory.h header file - leaving only namespace declaration with 2 classes, - and the building stops complaining about virtual methods, but then it merely crashes later:
]# gmake
[ 0%] Built target pb
[ 4%] Built target transport-plugin
[ 4%] Building CXX object libtransport/CMakeFiles/transport.dir/FileTransferManager.cpp.o
[ 4%] Building CXX object libtransport/CMakeFiles/transport.dir/NetworkPluginServer.cpp.o
/home/emz/src/spectrum2-2.0.13/libtransport/NetworkPluginServer.cpp:311:75: error: member access into incomplete type
'Swift::ConnectionServerFactory'
m_server = component->getNetworkFactories()->getConnectionServerFactory()->createConnectionServer(SWIFT_...
^
/usr/local/swiften/include/Swiften/FileTransfer/SOCKS5BytestreamServerManager.h:25:11: note: forward declaration of
'Swift::ConnectionServerFactory'
class ConnectionServerFactory;
^
/home/emz/src/spectrum2-2.0.13/libtransport/NetworkPluginServer.cpp:1915:19: warning: incrementing expression of type
bool is deprecated and incompatible with C++17 [-Wdeprecated-increment-bool]
matchCount++;
~~~~~~~~~~^
1 warning and 1 error generated.
gmake[2]: *** [libtransport/CMakeFiles/transport.dir/build.make:265: libtransport/CMakeFiles/transport.dir/NetworkPluginServer.cpp.o] Ошибка 1
gmake[1]: *** [CMakeFiles/Makefile2:556: libtransport/CMakeFiles/transport.dir/all] Ошибка 2
gmake: *** [Makefile:172: all] Ошибка 2
Could you please help me with building this ?
I managed to fix this error above by converting pure virtual methods to non-pure (simply removing returned zero in swifter header for createConnectionServer() routine in createConnectionServerFactory.h). But then I got building crashed on another location, seems this has nothing to do with virtual methods I tampered with:
[ 15%] Building CXX object libtransport/CMakeFiles/transport.dir/__/include/Swiften/Server/ServerFromClientSession.cpp.o
/home/emz/src/spectrum2-2.0.13/include/Swiften/Server/ServerFromClientSession.cpp:115:31: error: no viable conversion
from 'Swift::TLSServerLayer *' to 'std::unique_ptr<StreamLayer>'
getStreamStack()->addLayer(tlsLayer);
^~~~~~~~
/usr/include/c++/v1/memory:2401:28: note: candidate constructor (the implicit copy constructor) not viable: no known
conversion from 'Swift::TLSServerLayer *' to 'const std::__1::unique_ptr<Swift::StreamLayer,
std::__1::default_delete<Swift::StreamLayer> > &' for 1st argument
class _LIBCPP_TEMPLATE_VIS unique_ptr {
^
/usr/include/c++/v1/memory:2466:13: note: candidate constructor template not viable: no known conversion from
'Swift::TLSServerLayer *' to 'std::nullptr_t' (aka 'nullptr_t') for 1st argument
constexpr unique_ptr(nullptr_t) noexcept : __ptr_(pointer()) {}
^
/usr/include/c++/v1/memory:2494:3: note: candidate constructor not viable: no known conversion from
'Swift::TLSServerLayer *' to 'std::__1::unique_ptr<Swift::StreamLayer,
std::__1::default_delete<Swift::StreamLayer> > &&' for 1st argument
unique_ptr(unique_ptr&& __u) noexcept
^
/usr/include/c++/v1/memory:2503:3: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-0,
type-parameter-0-1>' against 'Swift::TLSServerLayer *'
unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
^
/usr/include/c++/v1/memory:2509:3: note: candidate template ignored: could not match 'auto_ptr<type-parameter-0-0>'
against 'Swift::TLSServerLayer *'
unique_ptr(auto_ptr<_Up>&& __p,
^
/usr/local/swiften/include/Swiften/StreamStack/StreamStack.h:27:73: note: passing argument to parameter here
void addLayer(std::unique_ptr<StreamLayer> /* streamLayer */);
^
1 error generated.
gmake[2]: *** [libtransport/CMakeFiles/transport.dir/build.make:889: libtransport/CMakeFiles/transport.dir/__/include/Swiften/Server/ServerFromClientSession.cpp.o] Ошибка 1
gmake[1]: *** [CMakeFiles/Makefile2:556: libtransport/CMakeFiles/transport.dir/all] Ошибка 2
gmake: *** [Makefile:172: all] Ошибка 2
Could you please help with the latter, if it's not triggered by the changes I made (doubt that , but still).
These are changes from 5.0 which is not compatible with current released version, use swift-4.x branch
FreeBSD:
Compiler:
Swiften:
Tail of the build log: