Bug #91923 We cannot compile MySQL Workbench 8, besides all dependencies are satisfied.
Submitted: 7 Aug 2018 17:29 Modified: 9 Sep 2018 7:18
Reporter: Pablo Largo Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:8.0.12 OS:Ubuntu (16.04)
Assigned to: CPU Architecture:Any
Tags: compile, libssh

[7 Aug 2018 17:29] Pablo Largo
Description:
This is the far we came. Tried with libssh 0.7.3, 0.7.4 and 0.7.5. 

[ 68%] Building CXX object library/ssh/CMakeFiles/wbssh.dir/SSHSession.cpp.o
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp: In member function ‘void ssh::SSHSession::pollEvent()’:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:195:59: error: within this context
       ssh_event_add_session(_event, _session->getCSession());
                                                           ^
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp: In member function ‘bool ssh::SSHSession::isConnected() const’:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:236:67: error: within this context
     return _isConnected && ssh_is_connected(_session->getCSession());
                                                                   ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp: In member function ‘bool ssh::SSHSession::openChannel(ssh::Channel*)’:
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:252:44: error: ‘class ssh::Channel’ has no member named ‘getCChannel’
       rc = ssh_channel_open_session(chann->getCChannel());
                                            ^
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp: In member function ‘void ssh::SSHSession::reconnect()’:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:471:49: error: within this context
     if (!ssh_is_connected(_session->getCSession())) {
                                                 ^
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp: In member function ‘int ssh::SSHSession::verifyKnownHost(const ssh::SSHConnectionConfig&, std::__cxx11::string&)’:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:489:50: error: within this context
     rc = ssh_get_publickey(_session->getCSession(), &srvPubKey);
                                                  ^
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp: In member function ‘void ssh::SSHSession::authenticateUser(const ssh::SSHConnectionCredentials&)’:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:561:68: error: within this context
       throw SSHTunnelException(ssh_get_error(_session->getCSession()));
                                                                    ^
In file included from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.h:33:0,
                 from *HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:25:
/usr/include/libssh/libsshpp.hpp:383:15: error: ‘ssh_session_struct* ssh::Session::getCSession()’ is private
   ssh_session getCSession(){
               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:582:72: error: within this context
           throw SSHTunnelException(ssh_get_error(_session->getCSession()));
                                                                        ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp: In member function ‘void ssh::SSHSession::authPassword(const string&)’:
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:592:31: error: ‘class ssh::Session’ has no member named ‘userauthKbdint’
       while ((ret = _session->userauthKbdint(nullptr, nullptr)) == SSH_AUTH_INFO) {
                               ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:593:34: error: ‘class ssh::Session’ has no member named ‘userauthKbdintGetNPrompts’
         int nPrompts = _session->userauthKbdintGetNPrompts();
                                  ^
*HIDDEN*/mysql-workbench-community-8.0.12-src/library/ssh/SSHSession.cpp:595:21: error: ‘class ssh::Session’ has no member named ‘userauthKbdintSetAnswer’
           _session->userauthKbdintSetAnswer(i, password.c_str());
                     ^
library/ssh/CMakeFiles/wbssh.dir/build.make:110: fallo en las instrucciones para el objetivo 'library/ssh/CMakeFiles/wbssh.dir/SSHSession.cpp.o'
make[2]: *** [library/ssh/CMakeFiles/wbssh.dir/SSHSession.cpp.o] Error 1
CMakeFiles/Makefile2:1718: fallo en las instrucciones para el objetivo 'library/ssh/CMakeFiles/wbssh.dir/all'
make[1]: *** [library/ssh/CMakeFiles/wbssh.dir/all] Error 2
Makefile:127: fallo en las instrucciones para el objetivo 'all'
make: *** [all] Error 2

How to repeat:
Try to compile MySQL Workbench on Ubuntu 16.04, satisfying dependencies like libssh by compiling and installing manually.
[8 Aug 2018 8:10] Marcin Szalowicz
Hello Pablo, 
you need to have libssh with additional patch for libsshpp.hpp.

That patch was merged just yesterday. 
https://git.libssh.org/projects/libssh.git/commit/?id=5ea81166bf885d0fd5d4bb232fc22633f5aa...
[8 Aug 2018 11:37] Pablo Largo
Yeah, found this patch also in a mailing list, but the patch alone wasn't enough: you have to compile libssh directly from master.

I've been able to compile, install and execute MySQL Workbench 8.0.12 finally and it seems to work, but it gives a "free(): invalid pointer" only when trying to connect with a MySQL database (a RDMS connection seems to don't crash).

May it be related to the Connector/C++?
[8 Aug 2018 11:43] Pablo Largo
Runtime error when trying to connect with MySQL

Attachment: backtrace.log (text/x-log), 41.58 KiB.

[9 Aug 2018 7:18] Marcin Szalowicz
Please provide your cmake setup as also information which cpp connector are you using and what are the compiler flags.
[10 Sep 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".