Bug 60907 - MySQL Connector build fails on Mac OSX
Summary: MySQL Connector build fails on Mac OSX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
4.1.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: David Tardon
URL:
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-15 15:50 UTC by Alex Thurgood
Modified: 2013-11-13 23:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
LO mysql connector for OSX build from 25/02/2013 (1.45 MB, application/vnd.openofficeorg.extension)
2013-02-28 17:45 UTC, Alex Thurgood
Details
crash trace when attempting to connect to mysql using native connector built with dev build (82.50 KB, text/plain)
2013-03-04 17:47 UTC, Alex Thurgood
Details
copy of mysql connector extension for OSX built on 03/03/2013 (1.45 MB, application/vnd.openofficeorg.extension)
2013-03-04 17:49 UTC, Alex Thurgood
Details
callstack at time of crash (25.49 KB, text/plain)
2013-03-06 16:14 UTC, Alex Thurgood
Details
debug info of connection from dbaui::OApplicationController::ensureConnection(dbtools::SQLExceptionInfo*) (16.67 KB, text/plain)
2013-03-07 10:11 UTC, Alex Thurgood
Details
connector build from 20130311 (456.48 KB, application/vnd.openofficeorg.extension)
2013-03-13 14:19 UTC, Alex Thurgood
Details
build failure of libmariadb on OSX (36.76 KB, text/plain)
2013-03-21 10:03 UTC, Alex Thurgood
Details
place this to libmariadb directory and try to "make libmariadb.all" (5.72 KB, text/plain)
2013-03-21 17:46 UTC, Fridrich Strba
Details
build log (244.02 KB, text/plain)
2013-03-22 08:08 UTC, Alex Thurgood
Details
mysqlcppconn build log (17.10 KB, text/plain)
2013-03-22 08:49 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Thurgood 2013-02-15 15:50:34 UTC
Since the gbuildification of mysqlc and mysqlcppconn, the connector extension fails to build with the following switch :

--with-libmysql-path="pathtomysqlconnectorClibrary"

This makes building of the connector extension impossible on OSX.

Already reported on developer mailing list on January 31st, 2013.

FWIW, here's the error message I get when building :

[build CPY] mysql-connector-ooo/description.xml
cp: /Users/Shared/mysql-connector-c-6.0.2-osx10.5-x86-32bit//lib/ is a
directory (not copied).
make[1]: ***
[/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/ExtensionTarget/mysql-connector-ooo/root]
Error 1

using the following switches :

./autogen.sh
--with-max-jobs=4
--with-num-cpus=2
--disable-ccache
--with-macosx-sdk=10.6
--enable-epm
--with-epm=internal
--disable-online-update
--without-doxygen
--with-system-openldap
--with-system-openssl
--enable-extra-gallery
--enable-extra-template
--enable-extra-sample
--enable-ext-diagram
--enable-ext-oooblogger
--enable-ext-google-docs
--enable-ext-nlpsolver
--enable-ext-watch-window
--enable-ext-wiki-publisher
--enable-ext-mysql-connector
--with-libmysql-path="/Users/Shared/mysql-connector-c-6.0.2-osx10.5-x86-32bit/"
Comment 1 Alex Thurgood 2013-02-15 15:51:49 UTC
Adding Norbert, Tor, and Lionel to CC
Comment 2 Not Assigned 2013-02-20 11:51:02 UTC
David Tardon committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=74a920c59ff7a68f5d42b3b9188ef8aeff28eda1

fdo#60907 export libmysql file name'



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Alex Thurgood 2013-02-22 08:17:00 UTC
Still not fixed after pull, make clean :

[build CXX] mysqlc/source/mysqlc_services.cxx
i686-apple-darwin10-g++-4.2.1: libmysql.16.dylib": No such file or directory
[build CXX] mysqlc/source/mysqlc_connection.cxx
i686-apple-darwin10-g++-4.2.1: libmysql.16.dylib": No such file or directory
<command-line>: warning: missing terminating " character
<command-line>: warning: missing terminating " character
In file included from /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/connection.h:32,
                 from /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/driver.h:28,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_connection.hxx:39,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_driver.hxx:30,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_services.cxx:20:
/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/warning.h:62: warning: unused parameter ‘e’
In file included from /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/connection.h:32,
                 from /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/driver.h:28,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_connection.hxx:39,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_driver.hxx:30,
                 from /Users/Shared/Repos/LO/core/mysqlc/source/mysqlc_driver.cxx:26:
/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/UnpackedTarball/mysqlcppconn/cppconn/warning.h:62: warning: unused parameter ‘e’
make[1]: *** [/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/CxxObject/mysqlc/source/mysqlc_services.o] Error 1
make[1]: *** Deleting file `/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/CxxObject/mysqlc/source/mysqlc_services.o'
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/CxxObject/mysqlc/source/mysqlc_driver.o] Error 1
make[1]: *** Deleting file `/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/CxxObject/mysqlc/source/mysqlc_driver.o'


Re-opening

Alex
Comment 4 Lionel Elie Mamane 2013-02-22 08:39:31 UTC
(In reply to comment #3)
> Still not fixed after pull, make clean :
> 
> [build CXX] mysqlc/source/mysqlc_services.cxx
> i686-apple-darwin10-g++-4.2.1: libmysql.16.dylib": No such file or directory

This looks like a different issue... In your build, in file config_host.mk, please show us the line:

 export LIBMYSQL=SOMETHING
Comment 5 Alex Thurgood 2013-02-23 14:42:26 UTC
(In reply to comment #4)


> This looks like a different issue... In your build, in file config_host.mk,
> please show us the line:
> 
>  export LIBMYSQL=SOMETHING


OK, in config_host.mk :

export LIBMYSQL=libmysql.dylib
export LIBMYSQL_PATH=/USers/Shared/mysql-connector-c-6.0.2-osx10.5-x86-32bit/



Alex
Comment 6 Lionel Elie Mamane 2013-02-24 17:32:21 UTC
I think I fixed it, but cannot test. Please try again with:

commit e5444ae3e099e1279b9b685b623c6e50bb8efd3b
Author:     Lionel Elie Mamane <lionel@mamane.lu>
AuthorDate: Sun Feb 24 18:29:01 2013 +0100
Commit:     Lionel Elie Mamane <lionel@mamane.lu>
CommitDate: Sun Feb 24 18:30:16 2013 +0100

    fdo#60907 no space in front of MYSQL_LIB
    
    Change-Id: If477ae65eb93d8eb944c345853c13ca0d1826762
Comment 7 Not Assigned 2013-02-24 17:35:35 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e5444ae3e099e1279b9b685b623c6e50bb8efd3b

fdo#60907 no space in front of MYSQL_LIB



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Alex Thurgood 2013-02-27 18:20:12 UTC
that did the trick, thanks !


Alex
Comment 9 Joel Madero 2013-02-27 18:25:19 UTC
We mark as VERIFIED once bug fix has been verified :) Glad that Lionel could help you out
Comment 10 Alex Thurgood 2013-02-28 17:42:24 UTC
Re-opening because although the connector file is built and can be installed, it still doesn't work :

When testing the connection during set up of the ODB connection parameters, I get a "Connection could not be established error". This error goes away if I continue with the setup nonetheless, but when I try to display the list of tables by clicking on the Table icon, the login screen appears again. Entering the login data again, or confirming the data already in the dialog do nothing, just make the dialog disappear, but the connection to the db does not occur.

So we're still stuck here.

The size of the connector is all wrong too, which probably explains why it doesn't work. The newly built connector is only 1.2Mb in size, whereas previous working connectors were always around 4Mb.

Trying to upload a copy of the connector here as an attachment.

Alex
Comment 11 Alex Thurgood 2013-02-28 17:45:20 UTC
Created attachment 75703 [details]
LO mysql connector for OSX build from 25/02/2013
Comment 12 Alex Thurgood 2013-02-28 17:48:47 UTC
Looking at the contents of the connector :

Archive:  /Volumes/Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/ExtensionTarget/mysql-connector-ooo.oxt
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  02-25-13 08:32   META-INF/
     1389  02-25-13 08:32   META-INF/manifest.xml
      314  02-25-13 08:27   components.rdb
      255  02-21-13 15:22   description-en-US.txt
     1739  02-25-13 08:32   description.xml
      838  02-21-13 15:25   images/extension_32.png
  2540336  02-21-13 15:22   libmysql.dylib
   696796  02-21-13 15:40   libmysqlcppconn.dylib
   563072  02-25-13 08:11   mysqlc.uno.dylib
        0  02-25-13 08:32   registration/
   436392  02-25-13 08:32   registration/LICENSE
     3561  02-21-13 15:25   registry/data/org/openoffice/Office/DataAccess/Drivers.xcu
 --------                   -------
  4244692                   12 files
Comment 13 Alex Thurgood 2013-02-28 17:50:00 UTC
Now compare that to an earlier one that works :

Archive:  /Users/alex/Desktop/mysql-connector-ooo.oxt
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  01-14-13 16:44   META-INF/
     1395  01-14-13 16:44   META-INF/manifest.xml
      255  01-14-13 16:43   description-en-US.txt
     1739  01-14-13 16:44   description.xml
        0  01-14-13 16:44   images/
      838  01-14-13 16:44   images/extension_32.png
  2540336  01-14-13 16:44   libmysql.16.dylib
   763996  01-14-13 16:44   libmysqlcppconn.dylib
   568172  01-15-13 10:22   mysqlc.uno.dylib
        0  01-14-13 16:43   registration/
   442492  01-14-13 16:43   registration/LICENSE
        0  01-14-13 16:44   registry/
        0  01-14-13 16:44   registry/data/
        0  01-14-13 16:44   registry/data/org/
        0  01-14-13 16:44   registry/data/org/openoffice/
        0  01-14-13 16:44   registry/data/org/openoffice/Office/
        0  01-14-13 16:44   registry/data/org/openoffice/Office/DataAccess/
     3561  01-14-13 16:44   registry/data/org/openoffice/Office/DataAccess/Drivers.xcu
 --------                   -------
  4322784                   18 files
Comment 14 Alex Thurgood 2013-02-28 18:19:32 UTC
(In reply to comment #13)
> Now compare that to an earlier one that works :
> 

Correction : this could be the AOO connector, which doesn't want to install in LO 3.5.7 or 3.6.5, haven't tried in LO4 or LO-dev yet.

Alex
Comment 15 Lionel Elie Mamane 2013-03-01 06:24:55 UTC
(In reply to comment #12)
> Looking at the contents of the connector :
>   2540336  02-21-13 15:22   libmysql.dylib

Please try to rename that file to libmysql.16.dylib, and also any mention of it in META-INF/manifest.xml

Does it work then?
Comment 16 Not Assigned 2013-03-01 09:00:29 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a42649c6743a54498375903b4357c4c0545fbab8

fdo#60907 Use *one* variable for the MySQL library file



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Lionel Elie Mamane 2013-03-01 09:03:14 UTC
I might have fixed it. Let me know.
Comment 18 Alex Thurgood 2013-03-04 17:45:58 UTC
Well, it "builds", but still doesn't work.

It is still only 1.5Mb, which is too small.

With LibreOfficeDev :

Version 4.1.0.0.alpha0+ (Build ID: 9cae1dc5311c09168fbe1f04bea3d4ee33a04bb)


it causes a crash, trace enclosed, when attempting a login, after clicking on the Tables icon.



Alex
Comment 19 Alex Thurgood 2013-03-04 17:47:28 UTC
Created attachment 75906 [details]
crash trace when attempting to connect to mysql using native connector built with dev build
Comment 20 Alex Thurgood 2013-03-04 17:49:09 UTC
Created attachment 75907 [details]
copy of mysql connector extension for OSX built on 03/03/2013
Comment 21 Lionel Elie Mamane 2013-03-04 18:26:28 UTC
(In reply to comment #18)

> it causes a crash, trace enclosed, when attempting a login, after clicking
> on the Tables icon.

I repeat my request of comment 15:

 Please try to rename that file to libmysql.16.dylib.

 Does it work then?

Also, it would be nice to see that uncaught exception's embedded error message.

From your build log, please tell me what argument of "-DMYSQL_LIB=what" is passed to gcc during compilation of mysqlc.

Enable LibreOffice debug tracing for the mysqlc  module. You should get a line like:

 clientlib=SOMETHING

in the trace. What is the "SOMETHING"?
Comment 22 Alex Thurgood 2013-03-04 22:05:06 UTC
(In reply to comment #21)
> (In reply to comment #18)
> 
> > it causes a crash, trace enclosed, when attempting a login, after clicking
> > on the Tables icon.
> 
> I repeat my request of comment 15:
> 
>  Please try to rename that file to libmysql.16.dylib.
> 
>  Does it work then?


Am away from machine til Wednesday now so will have to wait.


> 
> Also, it would be nice to see that uncaught exception's embedded error
> message.
> 

Will have à poke around.

> From your build log, please tell me what argument of "-DMYSQL_LIB=what" is
> passed to gcc during compilation of mysqlc.

Will look that up too.

> 
> Enable LibreOffice debug tracing for the mysqlc  module. You should get a
> line like:
> 
>  clientlib=SOMETHING
> 
> in the trace. What is the "SOMETHING"?

Will have à look.


Alex
Comment 23 Alex Thurgood 2013-03-06 14:16:14 UTC
(In reply to comment #21)


> I repeat my request of comment 15:
> 
>  Please try to rename that file to libmysql.16.dylib.
> 
>  Does it work then?

So I took the following steps :

1) physically removed the previously installed connector extension in LibreOfficeDev.

2) extracted the files from the OXT, renamed libmysql.dylib to libmysql.16.dylib.

3) rezipped the files into an OXT archive.

4)Started LibreOfficeDev, dragged and dropped the connector extension to the running LO, and then installed it via the extensions manager GUI.


5) Opened my usual "direct mysql connection" configured ODB file.

6) No difference whatsoever. Still get a crash, the trace of which looks identical to the previous one posted here.


Alex
Comment 24 Alex Thurgood 2013-03-06 14:46:45 UTC
(In reply to comment #21)

Tracing via gdb with the connector containing the renamed libmysql.16.dylib : 

libc++abi.dylib: terminate called throwing an exception

Program received signal SIGABRT, Aborted.
0x969d1a6a in __pthread_kill ()
(gdb) bt          
#0  0x969d1a6a in __pthread_kill ()
#1  0x9806dacf in pthread_kill ()
#2  0x980a44f8 in abort ()
#3  0x98f5a80c in abort_message ()
#4  0x98f58275 in default_terminate ()
#5  0x98f582b5 in safe_handler_caller ()
#6  0x98f5831d in std::terminate ()
#7  0x98f59412 in __cxa_throw ()
#8  0x193c7b15 in sql::mysql::MySQL_Driver::MySQL_Driver ()
#9  0x193c7cee in sql::mysql::get_driver_instance_by_name ()
#10 0x193c813b in sql::mysql::get_driver_instance ()
#11 0x1932aee5 in connectivity::mysqlc::MysqlCDriver::impl_initCppConn_lck_throw ()
#12 0x1932bf4a in connectivity::mysqlc::MysqlCDriver::connect ()
#13 0x19256bbe in connectivity::mysql::ODriverDelegator::connect ()
#14 0x1902d7b4 in connectivity::OPoolCollection::getConnectionWithInfo ()
#15 0x1a061ad1 in dbaccess::ODatabaseSource::buildLowLevelConnection ()
#16 0x1a062a18 in dbaccess::ODatabaseSource::buildIsolatedConnection ()
#17 0x1a063290 in dbaccess::OSharedConnectionManager::getConnection ()
#18 0x1a063ca9 in dbaccess::ODatabaseSource::getConnection ()
#19 0x1a064270 in dbaccess::ODatabaseSource::connectWithCompletion ()
#20 0x1a064bd8 in dbaccess::ODatabaseSource::connectWithCompletion ()
#21 0x1ec8d2af in dbaui::ODatasourceConnector::connect ()
#22 0x1ec8e100 in dbaui::ODatasourceConnector::connect ()
#23 0x1eb9c4b5 in dbaui::OGenericUnoController::connect ()
#24 0x1eb266f1 in dbaui::OApplicationController::ensureConnection ()
#25 0x1eb17cd4 in dbaui::OApplicationController::onContainerSelect ()
#26 0x1eb44c03 in dbaui::OApplicationSwapWindow::onContainerSelected ()
#27 0x1eb44d57 in dbaui::OApplicationSwapWindow::OnContainerSelectHdl ()
#28 0x00c29ee2 in SvtIconChoiceCtrl::ClickIcon ()
#29 0x00c21fa8 in SvxIconChoiceCtrl_Impl::SelectEntry ()
#30 0x00c22a4c in SvxIconChoiceCtrl_Impl::SetCursor ()
#31 0x00c24b15 in SvxIconChoiceCtrl_Impl::MouseButtonDown ()
#32 0x00c290f4 in SvtIconChoiceCtrl::MouseButtonDown ()
#33 0x01a38b41 in ImplHandleMouseEvent ()
#34 0x01a39e79 in ImplWindowFrameProc ()
#35 0x01a95a99 in -[SalFrameView sendMouseEventToFrame:button:eventtype:] ()
#36 0x01a92b01 in -[SalFrameView mouseDown:] ()
#37 0x99613a21 in -[NSWindow sendEvent:] ()
#38 0x9960ea0f in -[NSApplication sendEvent:] ()
#39 0x01a8676f in -[VCL_NSApplication sendEvent:] ()
#40 0x01a4b0e2 in AquaSalInstance::Yield ()
#41 0x01717e04 in Application::Yield ()
#42 0x0171926c in Application::Execute ()
#43 0x00071d38 in desktop::Desktop::Main ()
#44 0x0171f552 in ImplSVMain ()
#45 0x01a49f01 in AquaSalInstance::handleAppDefinedEvent ()
#46 0x01a8683b in -[VCL_NSApplication sendEvent:] ()
#47 0x9952872c in -[NSApplication run] ()
#48 0x994cb6f6 in NSApplicationMain ()
#49 0x01a4aa17 in ImplSVMainHook ()
#50 0x0171f611 in SVMain ()
#51 0x000a0005 in soffice_main ()
#52 0x00001f4e in main ()
Comment 25 Alex Thurgood 2013-03-06 15:04:46 UTC
This is what can be seen in the Apple trace with regard to libc++abi.dylib :

3   libc++abi.dylib               	0x98f5a80c abort_message + 151
4   libc++abi.dylib               	0x98f58275 default_terminate() + 34
5   libc++abi.dylib               	0x98f582b5 safe_handler_caller(void (*)()) + 13
6   libc++abi.dylib               	0x98f5831d std::terminate() + 23
7   libc++abi.dylib               	0x98f59412 __cxa_throw + 110


How can I investigate that further ?


Alex
Comment 26 Lionel Elie Mamane 2013-03-06 15:27:31 UTC
(In reply to comment #25)

> How can I investigate that further ?

Do you use --without-system-mysqlcppconn or --with-system-mysqlcppconn?

 - Break on sql::mysql::MySQL_Driver::MySQL_Driver
 - Show me what argument it is called with (the value of clientLib).
 - Break on the exception catch there, show me the caught exception.
 - step through the execution and observe the problem:

   You should end up in mysqlcppconn/driver/nativeapi/mysql_client_api.cpp,
   function getCApiHandle with some reasonable name argument, that is
   "/path/to/libmysql.dylib/in/libreoffice/install/libmysql.dylib"
Comment 27 Alex Thurgood 2013-03-06 16:14:40 UTC
Created attachment 76027 [details]
callstack at time of crash

Attached callstack at time of crash
Comment 28 Alex Thurgood 2013-03-06 16:23:00 UTC
(In reply to comment #26)
> (In reply to comment #25)
> 
> > How can I investigate that further ?
> 
> Do you use --without-system-mysqlcppconn or --with-system-mysqlcppconn?
> 

I don't use the system mysqlcppconn because if I do, the build looks for headers that aren't present (e.g. interface.h and others), causing the build to fail.



>  - Break on sql::mysql::MySQL_Driver::MySQL_Driver

Tried setting a breakpoint with sql::mysql::MySQL_Driver::MySQL_Driver, but it bombs before gdb seems to be able to set it. Perhaps I am not waiting long enough, but gdb only then reacts (registering the bomb out) when I proceed to validate the id/pwd combo. 

I'm looking into the rest of your suggestions, but am a complete newb when it comes to gdb.

I am also rebuilding LO and the connector with a build.log, as I didn't have one for the previous build.

Alex
Comment 29 Alex Thurgood 2013-03-07 07:51:16 UTC
From the build.log :

running ./configure with '--with-max-jobs=4' '--with-num-cpus=2' '--disable-ccache' '--with-macosx-sdk=10.6' '--enable-epm' '--with-epm=internal' '--disable-online-update' '--without-doxygen' '--with-system-openldap' '--with-system-openssl' '--enable-extra-gallery' '--enable-extra-template' '--enable-extra-sample' '--enable-ext-diagram' '--enable-ext-oooblogger' '--enable-ext-google-docs' '--enable-ext-nlpsolver' '--enable-ext-watch-window' '--enable-ext-wiki-publishe' '--enable-ext-mysql-connector' '--with-libmysql-path=/Users/Shared/mysql-connector-c-6.0.2-osx10.5-x86-32bit/' '--srcdir=/Users/Shared/Repos/LO/core'


There is no trace of -DMYSQL_LIB, grepping for "MYSQL" returns nothing, and with "mysql" instead I see the following in the build.log :

[build DEP] LNK:Library/libmysqllo.dylib
Archive:  /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/Zip/driver_mysql_en-US.zip
[build CXX] connectivity/source/drivers/mysql/YDriver.cxx
[build CXX] connectivity/source/drivers/mysql/YTables.cxx
[build CXX] connectivity/source/drivers/mysql/YTable.cxx
[build CXX] connectivity/source/drivers/mysql/YViews.cxx
[build CXX] connectivity/source/drivers/mysql/YCatalog.cxx
[build CXX] connectivity/source/drivers/mysql/YColumns.cxx
[build CXX] connectivity/source/drivers/mysql/YUser.cxx
[build CXX] connectivity/source/drivers/mysql/YUsers.cxx
[build CXX] connectivity/source/drivers/mysql/Yservices.cxx
[build LNK] Library/libmysqllo.dylib
[build CMP] connectivity/source/drivers/mysql/mysql
Comment 30 Alex Thurgood 2013-03-07 08:02:15 UTC
(In reply to comment #29)
> From the build.log :
> 
> running ./configure with '--with-max-jobs=4' '--with-num-cpus=2'
> '--disable-ccache' '--with-macosx-sdk=10.6' '--enable-epm'
> '--with-epm=internal' '--disable-online-update' '--without-doxygen'
> '--with-system-openldap' '--with-system-openssl' '--enable-extra-gallery'
> '--enable-extra-template' '--enable-extra-sample' '--enable-ext-diagram'
> '--enable-ext-oooblogger' '--enable-ext-google-docs'
> '--enable-ext-nlpsolver' '--enable-ext-watch-window'
> '--enable-ext-wiki-publishe' '--enable-ext-mysql-connector'
> '--with-libmysql-path=/Users/Shared/mysql-connector-c-6.0.2-osx10.5-x86-
> 32bit/' '--srcdir=/Users/Shared/Repos/LO/core'
> 

Although this has nothing to do with the mysql connector, note that although there's a typo error in the wiki publisher extension switch above (which I've now corrected), despite that typo, I get no error message on the console from configure, so these error messages must be silently deleted or ignored on OSX...who knows what else might be ignored...sigh

Alex
Comment 31 Alex Thurgood 2013-03-07 10:11:47 UTC
Created attachment 76104 [details]
debug info of connection from dbaui::OApplicationController::ensureConnection(dbtools::SQLExceptionInfo*)
Comment 32 Alex Thurgood 2013-03-07 16:30:48 UTC
So, seeing as I wasn't having much luck getting the break to trigger, I tried something a bit different - I tried creating a new ODB file using the mysql native connector, and this is what I get in GDB when I test the connection to the DB :

2013-03-07 17:08:02.377 soffice[16510:f0b] [IMKInputSession deactivate] exception caught.
	IMKInputSession:<IMKInputSession: 0x1abb36b0> -- 
	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port invalid
2013-03-07 17:08:02.380 soffice[16510:f0b] [IMKInputSession activate] exception caught.
	IMKInputSession: <IMKInputSession: 0x1abd2000> -- 
	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port invalid

and the GUI shows an error message :
"A driver is not registered for the URL s"


If I then save the file nonetheless as "New Database.odb", the ODB file is written to disk and then the login credentials dialog appears. I enter the pwd and get the following error :

SQL Status: HY000

The connection to the external data source could not be established. No SDBC driver was found for the given URL.

Under "Information" :
A connection for the following URL was requested "s".


If I then look in the database "connection properties" (right mouse button click in lower window frame of Base main window), I get a dialog which just shows a field with a blank URL entry, and not the usual mysql connection dialog.

Is there some default fallback behaviour that switches dialogs if the proper driver can't be loaded for whatever reason ?

In my trusty ODB file that I have always used, the parameters have also disappeared if I call up the "Connection Properties" via the context menu. If I force them manually back in and try to connect, I get an error message :


The connection to the data source "IPGALORE_directmysql" could not be established.

SQL Status: HY000

The connection to the external data source could not be established. No SDBC driver was found for the given URL.

A connection for the following URL was requested "s127.0.0.1:3306/ipdatabase".

So we still have that "s" character in the string, which shouldn't be there.

Subsequently saving the changes, and attempting to access the connection properties once more via the context menu brings up the dreaded URL dialog, which has nothing in common with the usual connection dialog, in fact it looks far more like the JDBC connector dialog, but just contains the Datasource URL field and user authentication fields (this is the Interaction Handler dialog, I believe).


All very strange.

Alex
Comment 33 Alex Thurgood 2013-03-07 16:48:08 UTC
Note that in the above described scenario, the Connection Type info is not set. If I call up the connection type dialog via the context menu from the main base window, it appears as unset, instead of Mysql(native).
Comment 34 Alex Thurgood 2013-03-07 17:11:48 UTC
(In reply to comment #32)

> 
> 2013-03-07 17:08:02.377 soffice[16510:f0b] [IMKInputSession deactivate]
> exception caught.
> 	IMKInputSession:<IMKInputSession: 0x1abb36b0> -- 
> 	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port
> invalid
> 2013-03-07 17:08:02.380 soffice[16510:f0b] [IMKInputSession activate]
> exception caught.
> 	IMKInputSession: <IMKInputSession: 0x1abd2000> -- 
> 	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port
> invalid
> 

The IMK stuff is from the Input Method Key interface, which is, from what I understand, mainly used for non Western language input, but my OSX configuration isn't set up as default for any Asian language input (optional Wubi Xing, Wubi Hua, and Pinyin entry only)


Alex
Comment 35 Alex Thurgood 2013-03-07 17:28:23 UTC
(In reply to comment #34)
> (In reply to comment #32)

> > 2013-03-07 17:08:02.377 soffice[16510:f0b] [IMKInputSession deactivate]
> > exception caught.
> > 	IMKInputSession:<IMKInputSession: 0x1abb36b0> -- 
> > 	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port
> > invalid
> > 2013-03-07 17:08:02.380 soffice[16510:f0b] [IMKInputSession activate]
> > exception caught.
> > 	IMKInputSession: <IMKInputSession: 0x1abd2000> -- 
> > 	NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port
> > invalid


If I'm reading the links correctly from the SDK Developer references, the methods referred to in IMKInputSession.h point to obsolete/legacy symbols (cf. legacy_symbols_file.txt in /Developer/Extras/LegacyAPISurvey/) that were previously used in the Human Interface tools Carbon framework ? So the crash I'm seeing has possibly nothing to do with the mysql connector driver at all, something in our code (the anonymous namespace authentication dialog handler perhaps) just happens to be the trigger for the exception ?  Arrgghh.




Alex
Comment 36 Alex Thurgood 2013-03-07 17:42:21 UTC
libc++abi.dylib: terminate called throwing an exception

Program received signal SIGABRT, Aborted.
0x969d1a6a in __pthread_kill ()
(gdb) bt full
#0  0x969d1a6a in __pthread_kill ()
No symbol table info available.
#1  0x9806dacf in pthread_kill ()
No symbol table info available.
#2  0x980a44f8 in abort ()
No symbol table info available.
#3  0x98f5a80c in abort_message ()
No symbol table info available.
#4  0x98f58275 in default_terminate ()
No symbol table info available.
#5  0x98f582b5 in safe_handler_caller ()
No symbol table info available.
#6  0x98f5831d in std::terminate ()
No symbol table info available.
#7  0x98f59412 in __cxa_throw ()
No symbol table info available.
#8  0x19240b15 in sql::mysql::MySQL_Driver::MySQL_Driver ()
No symbol table info available.
#9  0x19240cee in sql::mysql::get_driver_instance_by_name ()
No symbol table info available.
#10 0x1924113b in sql::mysql::get_driver_instance ()
No symbol table info available.
#11 0x191a3ee5 in connectivity::mysqlc::MysqlCDriver::impl_initCppConn_lck_throw ()
No symbol table info available.
#12 0x191a4f4a in connectivity::mysqlc::MysqlCDriver::connect ()
No symbol table info available.
#13 0x09d47bbe in connectivity::mysql::ODriverDelegator::connect ()
No symbol table info available.
#14 0x06e657b4 in connectivity::OPoolCollection::getConnectionWithInfo ()
No symbol table info available.
#15 0x1d71ead1 in dbaccess::ODatabaseSource::buildLowLevelConnection ()
No symbol table info available.
#16 0x1d71fa18 in dbaccess::ODatabaseSource::buildIsolatedConnection ()
No symbol table info available.
#17 0x1d720290 in dbaccess::OSharedConnectionManager::getConnection ()
No symbol table info available.
#18 0x1d720ca9 in dbaccess::ODatabaseSource::getConnection ()
No symbol table info available.
#19 0x1d721270 in dbaccess::ODatabaseSource::connectWithCompletion ()
No symbol table info available.
#20 0x1d721bd8 in dbaccess::ODatabaseSource::connectWithCompletion ()
No symbol table info available.
#21 0x1e4742af in dbaui::ODatasourceConnector::connect ()
No symbol table info available.
#22 0x1e475100 in dbaui::ODatasourceConnector::connect ()
No symbol table info available.
#23 0x1e3834b5 in dbaui::OGenericUnoController::connect ()
No symbol table info available.
#24 0x1e30d6f1 in dbaui::OApplicationController::ensureConnection ()
No symbol table info available.
#25 0x1e2fecd4 in dbaui::OApplicationController::onContainerSelect ()
No symbol table info available.
#26 0x1e32bc03 in dbaui::OApplicationSwapWindow::onContainerSelected ()
No symbol table info available.
#27 0x1e32bd57 in dbaui::OApplicationSwapWindow::OnContainerSelectHdl ()
No symbol table info available.
#28 0x00c29ee2 in SvtIconChoiceCtrl::ClickIcon ()
No symbol table info available.
#29 0x00c21fa8 in SvxIconChoiceCtrl_Impl::SelectEntry ()
No symbol table info available.
#30 0x00c22a4c in SvxIconChoiceCtrl_Impl::SetCursor ()
No symbol table info available.
#31 0x00c24b15 in SvxIconChoiceCtrl_Impl::MouseButtonDown ()
No symbol table info available.
#32 0x00c290f4 in SvtIconChoiceCtrl::MouseButtonDown ()
No symbol table info available.
#33 0x01a38b41 in ImplHandleMouseEvent ()
No symbol table info available.
#34 0x01a39e79 in ImplWindowFrameProc ()
No symbol table info available.
#35 0x01a95a99 in -[SalFrameView sendMouseEventToFrame:button:eventtype:] ()
No symbol table info available.
#36 0x01a92b01 in -[SalFrameView mouseDown:] ()
No symbol table info available.
#37 0x99613a21 in -[NSWindow sendEvent:] ()
No symbol table info available.
#38 0x9960ea0f in -[NSApplication sendEvent:] ()
No symbol table info available.
#39 0x01a8676f in -[VCL_NSApplication sendEvent:] ()
No symbol table info available.
#40 0x01a4ae15 in AquaSalInstance::Yield ()
No symbol table info available.
#41 0x01717e04 in Application::Yield ()
No symbol table info available.
#42 0x0171926c in Application::Execute ()
No symbol table info available.
#43 0x00071d38 in desktop::Desktop::Main ()
No symbol table info available.
#44 0x0171f552 in ImplSVMain ()
No symbol table info available.
#45 0x01a49f01 in AquaSalInstance::handleAppDefinedEvent ()
No symbol table info available.
#46 0x01a8683b in -[VCL_NSApplication sendEvent:] ()
No symbol table info available.
#47 0x9952872c in -[NSApplication run] ()
No symbol table info available.
#48 0x994cb6f6 in NSApplicationMain ()
No symbol table info available.
#49 0x01a4aa17 in ImplSVMainHook ()
No symbol table info available.
#50 0x0171f611 in SVMain ()
No symbol table info available.
#51 0x000a0005 in soffice_main ()
No symbol table info available.
#52 0x00001f4e in main ()
No symbol table info available.
(gdb)
Comment 37 Alex Thurgood 2013-03-08 17:06:29 UTC
The connector is no longer building at all on OSX. The only changes I have made have been to make clean, pull, and restart the build.

It looks like someone is working on MariaDB integration, and this has hosed the build for me again.


I'm throwing in the towel.
Comment 38 Fridrich Strba 2013-03-11 09:44:04 UTC
Alex: don't throw the towel :) I replaced that mysql-client library with mariadb, the --with-mysql-path is not having any effect now. I tried to fix it on windows, where it somehow builds now, now I will have to fix the mac build, just my old G4 mac mini is very slow, so any help would be appreciated. Over weekend and this morning, there were some fixes that should clear some impossibility to get the connection, because the connector was trying to dlopen a wrong library. And since libmariadb is built as static library, I made it link it in directly.
Comment 39 Alex Thurgood 2013-03-13 14:13:15 UTC
Still crashing after rebuild with Fridrichs changes :

+0x00	pushl               %ebp
+0x01	movl                %esp, %ebp
+0x03	subl                $72, %esp
+0x06	movl                %ebx, -12(%ebp)
+0x09	movl                %esi, -8(%ebp)
+0x0c	movl                %edi, -4(%ebp)
+0x0f	calll               0x5
+0x14	popl                %ebx
+0x15	movl                8(%ebp), %esi
+0x18	leal                450092(%ebx), %eax
+0x1e	addl                $8, %eax
+0x21	movl                %eax, (%esi)
+0x23	movl                $0, 4(%esi)
+0x2a	movl                12(%ebp), %eax
+0x2d	movl                %eax, (%esp)
+0x30	calll               sql::mysql::NativeAPI::createNativeDriverWrapper(sql::SQLString const&)
+0x35	movl                4(%esi), %edx
+0x38	movl                %eax, 4(%esi)
+0x3b	testl               %edx, %edx
+0x3d	je                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x49
+0x3f	movl                (%edx), %eax
+0x41	movl                4(%eax), %eax
+0x44	movl                %edx, (%esp)
+0x47	calll               *%eax
+0x49	movl                -12(%ebp), %ebx
+0x4c	movl                -8(%ebp), %esi
+0x4f	movl                -4(%ebp), %edi
+0x52	leave               
+0x53	ret                 
+0x54	movl                %eax, %edi
+0x56	decl                %edx
+0x57	je                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x7d
+0x59	    movl                4(%esi), %edx
+0x5c	    testl               %edx, %edx
+0x5e	    je                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x6a
+0x60	    movl                (%edx), %eax
+0x62	    movl                4(%eax), %eax
+0x65	    movl                %edx, (%esp)
+0x68	    calll               *%eax
+0x6a	    movl                448100(%ebx), %eax
+0x70	    addl                $8, %eax
+0x73	    movl                %eax, (%esi)
+0x75	    movl                %edi, (%esp)
+0x78	    calll               DYLD-STUB$$_Unwind_Resume
+0x7d	    movl                %eax, (%esp)
+0x80	    calll               DYLD-STUB$$__cxa_begin_catch
+0x85	    movl                (%eax), %edx
+0x87	    movl                8(%edx), %edx
+0x8a	    movl                %eax, (%esp)
+0x8d	    calll               *%edx
+0x8f	    leal                -25(%ebp), %edx
+0x92	    movl                %edx, 8(%esp)
+0x96	    movl                %eax, 4(%esp)
+0x9a	    leal                -36(%ebp), %edi
+0x9d	    movl                %edi, (%esp)
+0xa0	    calll               DYLD-STUB$$std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
+0xa5	    movl                $16, (%esp)
+0xac	    calll               DYLD-STUB$$__cxa_allocate_exception
+0xb1	    movl                %eax, -44(%ebp)
+0xb4	    leal                -26(%ebp), %eax
+0xb7	    movl                %eax, 8(%esp)
+0xbb	    leal                375132(%ebx), %eax
+0xc1	    movl                %eax, 4(%esp)
+0xc5	    leal                -40(%ebp), %eax
+0xc8	    movl                %eax, -48(%ebp)
+0xcb	    movl                %eax, (%esp)
+0xce	    calll               DYLD-STUB$$std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
+0xd3	    movl                %edi, 4(%esp)
+0xd7	    movl                -44(%ebp), %edx
+0xda	    movl                %edx, (%esp)
+0xdd	    calll               DYLD-STUB$$std::runtime_error::runtime_error(std::string const&)
+0xe2	    movl                448060(%ebx), %eax
+0xe8	    addl                $8, %eax
+0xeb	    movl                -44(%ebp), %edx
+0xee	    movl                %eax, (%edx)
+0xf0	    movl                %edx, %eax
+0xf2	    addl                $8, %eax
+0xf5	    movl                -48(%ebp), %edx
+0xf8	    movl                %edx, 4(%esp)
+0xfc	    movl                %eax, (%esp)
+0xff	    calll               DYLD-STUB$$std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)
+0x104	    movl                -44(%ebp), %eax
+0x107	    movl                $0, 12(%eax)
+0x10e	    movl                -40(%ebp), %ecx
+0x111	    subl                $12, %ecx
+0x114	    movl                448032(%ebx), %edi
+0x11a	    cmpl                %edi, %ecx
+0x11c	    jne                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x184
+0x11e	        movl                448024(%ebx), %eax
+0x124	        addl                $8, %eax
+0x127	        movl                -44(%ebp), %edx
+0x12a	        movl                %eax, (%edx)
+0x12c	        movl                -36(%ebp), %ecx
+0x12f	        subl                $12, %ecx
+0x132	        cmpl                %ecx, %edi
+0x134	        jne                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x163
+0x136	            movl                463440(%ebx), %eax
+0x13c	            movl                %eax, 8(%esp)
+0x140	            movl                448056(%ebx), %eax
+0x146	            movl                %eax, 4(%esp)
+0x14a	            movl                -44(%ebp), %eax
+0x14d	            movl                %eax, (%esp)
+0x150	            calll               DYLD-STUB$$__cxa_throw
+0x155	            movl                %eax, %edi
+0x157	            calll               DYLD-STUB$$__cxa_end_catch
+0x15c	            jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x59
+0x161	        jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x155
+0x163	        leal                8(%ecx), %edx
+0x166	        movl                $4294967295, %eax
+0x16b	        lock                
+0x16c	        xaddl               %eax, (%edx)
+0x16f	        testl               %eax, %eax
+0x171	        jg                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x136
+0x173	    leal                -30(%ebp), %eax
+0x176	    movl                %eax, 4(%esp)
+0x17a	    movl                %ecx, (%esp)
+0x17d	    calll               DYLD-STUB$$std::string::_Rep::_M_destroy(std::allocator<char> const&)
+0x182	    jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x136
+0x184	    leal                8(%ecx), %edx
+0x187	    movl                $4294967295, %eax
+0x18c	    lock                
+0x18d	    xaddl               %eax, (%edx)
+0x190	    testl               %eax, %eax
+0x192	    jg                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x11e
+0x194	leal                -28(%ebp), %eax
+0x197	movl                %eax, 4(%esp)
+0x19b	movl                %ecx, (%esp)
+0x19e	calll               DYLD-STUB$$std::string::_Rep::_M_destroy(std::allocator<char> const&)
+0x1a3	jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x11e
+0x1a8	movl                %eax, %edi
+0x1aa	movl                -44(%ebp), %edx
+0x1ad	movl                %edx, (%esp)
+0x1b0	calll               DYLD-STUB$$std::runtime_error::~runtime_error()
+0x1b5	movl                -40(%ebp), %ecx
+0x1b8	subl                $12, %ecx
+0x1bb	movl                448032(%ebx), %eax
+0x1c1	movl                %eax, -52(%ebp)
+0x1c4	cmpl                %eax, %ecx
+0x1c6	jne                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x21b
+0x1c8	movl                -44(%ebp), %edx
+0x1cb	movl                %edx, (%esp)
+0x1ce	calll               DYLD-STUB$$__cxa_free_exception
+0x1d3	movl                -36(%ebp), %ecx
+0x1d6	subl                $12, %ecx
+0x1d9	cmpl                -52(%ebp), %ecx
+0x1dc	je                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x157
+0x1e2	leal                8(%ecx), %edx
+0x1e5	movl                $4294967295, %eax
+0x1ea	lock                
+0x1eb	xaddl               %eax, (%edx)
+0x1ee	testl               %eax, %eax
+0x1f0	jg                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x157
+0x1f6	leal                -29(%ebp), %eax
+0x1f9	movl                %eax, 4(%esp)
+0x1fd	movl                %ecx, (%esp)
+0x200	calll               DYLD-STUB$$std::string::_Rep::_M_destroy(std::allocator<char> const&)
+0x205	jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x157
+0x20a	movl                %eax, %edi
+0x20c	jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x1b5
+0x20e	movl                %eax, %edi
+0x210	movl                448032(%ebx), %eax
+0x216	movl                %eax, -52(%ebp)
+0x219	jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x1c8
+0x21b	leal                8(%ecx), %edx
+0x21e	movl                $4294967295, %eax
+0x223	lock                
+0x224	xaddl               %eax, (%edx)
+0x227	testl               %eax, %eax
+0x229	jg                  sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x1c8
+0x22b	leal                -27(%ebp), %eax
+0x22e	movl                %eax, 4(%esp)
+0x232	movl                %ecx, (%esp)
+0x235	calll               DYLD-STUB$$std::string::_Rep::_M_destroy(std::allocator<char> const&)
+0x23a	jmp                 sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)+0x1c8
+0x23c	nopl                (%eax)
Comment 40 Alex Thurgood 2013-03-13 14:17:27 UTC
With the new switch, the oxt file generayed is even smaller still. Copy of file attached.
Comment 41 Alex Thurgood 2013-03-13 14:19:14 UTC
Created attachment 76476 [details]
connector build from 20130311
Comment 42 Alex Thurgood 2013-03-13 14:22:11 UTC
# Self	% Calls	# Calls		Symbol Name
0	100	3	 	sql::mysql::MySQL_Driver::MySQL_Driver(sql::SQLString const&)
0	100	3	 	 __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*)
0	100	3	 	  __cxa_bad_typeid
0	100	3	 	   safe_handler_caller(void (*)())
0	100	3	 	    default_terminate()
0	100	3	 	     abort_message
0	33,3	1	 	      fwrite$UNIX2003
0	33,3	1	 	       __sfvwrite
0	33,3	1	 	        _swrite
1	33,3	1	 	         __write_nocancel
0	33,3	1	 	      vfprintf
0	33,3	1	 	       vfprintf_l
0	33,3	1	 	        __sflush
0	33,3	1	 	         _swrite
1	33,3	1	 	          __write_nocancel
0	33,3	1	 	      fputc
0	33,3	1	 	       __swbuf
0	33,3	1	 	        __sflush
0	33,3	1	 	         _swrite
1	33,3	1	 	          __write_nocancel
Comment 43 Fridrich Strba 2013-03-14 08:20:41 UTC
OK, the internal libmariadb was built until now without thread support on *nix. I enabled the thread support now. Alex, if you help to make it link on Mac, it is possible that the issue will be solved, but not sure.
Comment 44 Alex Thurgood 2013-03-21 10:03:42 UTC
Created attachment 76860 [details]
build failure of libmariadb on OSX
Comment 45 Fridrich Strba 2013-03-21 10:31:53 UTC
(In reply to comment #44)
> Created attachment 76860 [details]
> build failure of libmariadb on OSX

Any chance to help to debug. I am having locally only mac mini ppc with 10.5 and the sdk I build against is the 10.4 sdk. There is no way for me to check errors with 10.6 :(
Comment 46 Alex Thurgood 2013-03-21 11:34:51 UTC
(In reply to comment #45)
> (In reply to comment #44)
> > Created attachment 76860 [details]
> > build failure of libmariadb on OSX
> 
> Any chance to help to debug. I am having locally only mac mini ppc with 10.5
> and the sdk I build against is the 10.4 sdk. There is no way for me to check
> errors with 10.6 :(



If you give me pointers on how to do that, coz I have absolutely no idea :-) even where to start. Make files are anathema to me.

Alex
Comment 47 Fridrich Strba 2013-03-21 13:51:12 UTC
(In reply to comment #46)
> If you give me pointers on how to do that, coz I have absolutely no idea :-)
> even where to start. Make files are anathema to me.

Already, it would be interesting what is the line 101 of /Developer/SDKs/MacOSX10.6.sdk/usr/include/signal.h so that we can understand the error better.
Comment 48 Alex Thurgood 2013-03-21 14:56:15 UTC
(In reply to comment #47)

> 
> Already, it would be interesting what is the line 101 of
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/signal.h so that we can
> understand the error better.




99    int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict);
100   int sigrelse(int);
101   void (*sigset(int, void (*)(int)))(int);
102   int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);
Comment 49 Fridrich Strba 2013-03-21 15:08:42 UTC
(In reply to comment #48)
> 99    int sigprocmask(int, const sigset_t * __restrict, sigset_t *
> __restrict);
> 100   int sigrelse(int);
> 101   void (*sigset(int, void (*)(int)))(int);
> 102   int sigsuspend(const sigset_t *) __DARWIN_ALIAS_C(sigsuspend);

OK, what would clearly help here is to have the mariadb-native-client-1.0.0 unpacked, patched and then built using cmake standalone on mac and send me the my_config.h file that the cmake build produces. I will clearly have to prepare serveral of them and copy them over like clucene build does.
Comment 50 Fridrich Strba 2013-03-21 17:45:18 UTC
Alex, can you try to replace the libmariadb/my_config.h in your build tree with the attached file and see whether it passes?
Comment 51 Fridrich Strba 2013-03-21 17:46:31 UTC
Created attachment 76873 [details]
place this to libmariadb directory and try to "make libmariadb.all"
Comment 52 Alex Thurgood 2013-03-22 08:07:26 UTC
(In reply to comment #50)
> Alex, can you try to replace the libmariadb/my_config.h in your build tree
> with the attached file and see whether it passes?

Still no good, see aatached output.

Alex
Comment 53 Alex Thurgood 2013-03-22 08:08:13 UTC
Created attachment 76894 [details]
build log
Comment 54 Alex Thurgood 2013-03-22 08:13:35 UTC
Hmmm, surely the unpack step overwrites the my_config.h file ?
Comment 55 Alex Thurgood 2013-03-22 08:17:07 UTC
(In reply to comment #54)
> Hmmm, surely the unpack step overwrites the my_config.h file ?

No, but the build seems to take that file from

 UnpackedTarball/mariadb/include/my_config.h

instead.

Alex
Comment 56 Alex Thurgood 2013-03-22 08:33:10 UTC
Copied my_config.h to the  /workdir/unxmacxi.pro/UnpackedTarball/mariadb/include/

then ran

make libmariadb.all
make -j 2 -rs -f /Users/Shared/Repos/LO/core/Makefile.gbuild /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/Module/libmariadb /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/Module/check/libmariadb /Users/Shared/Repos/LO/core/workdir/unxmacxi.pro/Module/slowcheck/libmariadb
[build DEP] LNK:StaticLibrary/libmariadblib.a

Does this mean it has now built ?

Alex
Comment 57 Alex Thurgood 2013-03-22 08:48:02 UTC
Continuing on with complete build, I see this in mysqlcppconn (attached log)
Comment 58 Alex Thurgood 2013-03-22 08:49:11 UTC
Created attachment 76895 [details]
mysqlcppconn build log
Comment 59 Fridrich Strba 2013-03-22 09:16:47 UTC
(In reply to comment #56)
> Copied my_config.h to the 
> /workdir/unxmacxi.pro/UnpackedTarball/mariadb/include/

Since the sources were already unpacked, it worked too. What I wanted is to put it in the source tree as libmariadb/my_config.h temporarily, because the unpack of the sources copies that onver.

> Does this mean it has now built ?

From the log, the libmariadb static library built.

The warnings that you see are due to a recent addition of -Wundef flag in master. They are things that should be fixed in mariadb-native-client itself, but they don't bother us too much now.

Now, I will have to come with a way to conditionalize the different my_config.h files per platform.
Comment 60 Alex Thurgood 2013-03-22 14:58:45 UTC
Hi Fridrich,

Well the LO build completed successfully with that my_config.h file, with the connector extension being successfully integrated and functional !


Alex
Comment 61 Alex Thurgood 2013-03-22 14:59:12 UTC
Working build :
Version 4.1.0.0.alpha0+ (Build ID: edf57013463eff6d3b40d8d5d933577f0e6cf8e)
Comment 62 Alex Thurgood 2013-03-22 15:03:26 UTC
In one of my server registered views, I get a buffer allocate error with a rbind data type when scrolling through the list of tables in the UI Table Browser, I will open a separate bug report for that, so there could be an incompatibility between the mysql code and the libmariadb code (since I never got this error with the mysql connector). It is unfortunate because it is probably my second most used element of my database - sigh. Ah well, another day, another problem to solve :-))



Alex
Comment 63 Fridrich Strba 2013-03-22 15:16:46 UTC
Hello, Alex, let me close this one as resolved, since we are now able to build it. You can gladly add me and Lionel to the other bug. We will work it out at the end :)
Comment 64 Alex Thurgood 2013-03-22 16:37:12 UTC
(In reply to comment #63)
> Hello, Alex, let me close this one as resolved, since we are now able to
> build it. You can gladly add me and Lionel to the other bug. We will work it
> out at the end :)



Sure Fridrich, but the changes haven't gone in to master yet, or have they ?

Alex
Comment 65 Alex Thurgood 2013-03-22 16:38:29 UTC
(In reply to comment #63)
> Hello, Alex, let me close this one as resolved, since we are now able to
> build it. You can gladly add me and Lionel to the other bug. We will work it
> out at the end :)


And a big thank you from me from me for doing this :-))


Alex
Comment 66 Fridrich Strba 2013-03-22 18:09:08 UTC
(In reply to comment #64)
> Sure Fridrich, but the changes haven't gone in to master yet, or have they ?

Sure, they went in some hours ago, we have now a specific mac_my_config.h file that I crafted from cmake generated file on both ppc and intel. Then we have a linux_my_config.h file that works for both 32 and 64bit linux. They were generated on our release base-line. I hope that linux files will be working for many different Unix flavours, but if not, there is a way to generate them for the given platform and handle them similarly to what we do now in libmariadb/UnpackedTarball_mariadb.mk