MySQL Native Connector for 32 bit LibreOffice on Ubuntu 12.04

I have a 32 bit laptop running Ubuntu 12.04. On it I have installed LO 3.6.5.2 and 4.0.0.3.
      This evening I was going to built LO 4.0.0 with the native connector for MySQL. In the process I had to download some files needed for autogen.sh to work properly. Among these are two groups.
      These were the ones that autogen.sh had to have before it stopped with an error message at line 201: libgnomevfs2-common, libgnomevfs2-bin, libgnomevfs2-0, libgnomevfs2-dev, libgnomevfs2-extra, libgnomevfs2-0-dbg.
      Prior to downloading the master build, I installed two files that Alex Thurgood suggested: libmysqlclient18 and libmysqlcppconn5 using synaptic. I also noticed these files were available: libmysqlclient-dev and libmysqlcppconn-dev. So I installed these also.
      I had run autogen.sh a couple of times with an error stopping it at line 201. The error led me to the first group of files which I also installed using synaptic. Then I ran (at Alex' suggestion):
autogen.sh --with-ext-mysql-connector --with-system-mysql. (It should have also had an option containing the path to the external mysql connector.) So, it ignored the first option I gave it.
      Since then, I have installed the MySQL Native Connector that I had downloaded from AOO a couple of months ago. I did this to both LO 3.6.5.2 and 4.0.0.3. I have a Base file which I use to connect to my MySQL server using the native connector. Now I can access MySQL using this file with both 3.6.5.2 and 4.0.0.3.
      So the reason for this email including the QA people is that I would like a simple test done by someone with a 32 bit Debian system and MySQL server. Please install the AOO MySQL native connector. Also install these two files: libmysqlclient18 and libmysqlcppconn5. With these installed, can you connect to MySQL? If so, part of our problem is solved.
      Tomorrow, I am going to run autogen.sh with the three needed options. Hopefully, I will build a native connector for LibreOffice.

--Dan

Hi Dan,

     These were the ones that autogen.sh had to have before it stopped
with an error message at line 201: libgnomevfs2-common,
libgnomevfs2-bin, libgnomevfs2-0, libgnomevfs2-dev, libgnomevfs2-extra,
libgnomevfs2-0-dbg.

These unfortunately are a pain in the backside when building LO on
Ubuntu based distros, especially if you are not using Gnome as the
desktop UI, but they have nothing to do with the connector itself. This
gnomevfs lark is a problem with the build-deps not pulling in the
required libraries, for whatever reason, I haven't managed to fathom
that out.

     Prior to downloading the master build, I installed two files that
Alex Thurgood suggested: libmysqlclient18 and libmysqlcppconn5 using
synaptic. I also noticed these files were available: libmysqlclient-dev
and libmysqlcppconn-dev. So I installed these also.
     I had run autogen.sh a couple of times with an error stopping it at
line 201. The error led me to the first group of files which I also
installed using synaptic. Then I ran (at Alex' suggestion):
autogen.sh --with-ext-mysql-connector --with-system-mysql. (It should
have also had an option containing the path to the external mysql
connector.) So, it ignored the first option I gave it.

You shouldn't neeed to point to the mysql dev libraries if you have the
client and source installed on your system. I only use the
--with-libmysql-path option when building on Mac OSX, as the headers for
MySQL are not included in a default OSX installation.

Alex

This is what I suggested to Heinrich when I pointed him to my 32bit
connector download on Dropbox.

Alex

Thursday night: Having installed the MySQL Native Connector in LO 4.0.0.3 and noticed it worked now, I ran autogen.sh --with-ext-mysql-connector --with-system-mysql. This time it ran without an error message, and this time it did not ignore the first option. So, I ran make.
      Friday morning: Make has completed during the night with this comment in the terminal:

"=============
(1/1) Building module instsetoo_native

Hi Dan,

     What I am going to do is run make again. This time I will use the
following so I have a log of the process: |||||
make 2>&1 | tee build.log

You have a successful LO build, congratulations.

You can now setup the build as a developer install with :

make dev-install

Upon successful completion, you will get a line that says something
about being able to set up the working environment to run the dev
version, using /.../.../ooenv. The ooenv script file is created
non-executable so you have to chmod +x it. Then you can launch ooenv
script, it doesn't do anything visible, just sets up your environment to
point to the LO-dev install tree (and probably some other magic I
haven't understood yet, like a separate configuration folder). Then you
can start LO-dev with the equivalent soffice script from the same folder
as ooenv.

Alex

I ran into a problem: it would not install the build. Here are the error messages that I found at the end of the make dev-install:

ERROR: ERROR: Missing files at /home/dan/Downloads/LO-Build/libo/solenv/bin/modules/installer/scriptitems.pm line 1280

The other area with two errors at the end of a long line of "SUCCESS ..." beginning with the last two SUCCESS lines:

SUCCESS: Source for services.rdb: /home/dan/Downloads/LO-Build/libo/solver/unxlngi6.pro/xml/services.rdb
: SUCCESS: Source for libsvgiolo.so: /home/dan/Downloads/LO-Build/libo/solver/unxlngi6.pro/lib/libsvgiolo.so
:
: ERROR: Removing file pythonscript.py from file list.
: ERROR: Removing file scriptproviderforpython.rdb from file list.
:
: Removing directory /tmp/ooopackaging/i_21631361472263
:
: Thu Feb 21 13:44:23 2013 (00:00 min.)
: ######################################################
: Command line arguments:
: ######################################################

      So, what do I do now?

--Dan

PS: I was able to run the queries for Bug # 61166 by clicking the SQL icon (Run SQL command directly) when using LO 4.0.0.3.

Hmm, looks like something changed in your build second time around as .
Did you pull any recent changes via "git pull" before starting your make
dev-install build ?

Can you run this script from a the console in the git libo folder
(assuming it is even there) ?

/solver/unxlngi6.pro/installation/opt/program/ooenv

and then

/solver/unxlngi6.pro/installation/opt/program/soffice

Does your build.log have any other error messages in it ?

You might have to repeat your make dev-install again, or clean the whole
build with make.clean and start all over again with a fresh make. I
don't know enough about the packaging process to tell.

Alex

Hello,
Just to confuse things a bit...
When I installed LO 4.0.0.3 on my Debian-Wheezy system, the native connector
worked fine from the beginning. It does NOT work on Mint-Nadia or Windows/Vista.
Both are 32-bit systems.

Obviously - as somebody posted earlier - the connector is VERY "sensitive"
to the underlying OS, MySQL and LO-versions. I suspect it must be a nightmare
to maintain so as to make it work "independent" of which OS etc you use...

By the way, I tried "reverting" to ODBC/JDBC - not really usable for connecting
with LO. E.g., when entering new tuples into a table, default values are not
shown as defined (in create/alter table). However, when selecting the tuple
thereafter espectially so as to see what has happened, the values are shown
correctly (in SOME cases, not so in others). Under an ODBC connection, after
a while of working with Base, the CPU consumption increases considerably.
It becomes "normal" again only after saving LO/Base. So, at this point in time
there really is no choice but to get the native connector going.

I can try to install libmysqlclient18 and libmysqlcppconn5 on my Mint-system
and see what happens. Where did you download the AOO-native connector from
and which version? The version I found is from 2011.
Regards
H.S.

Heinrich ,

Trie to install the connector with the latest working version
then update this version to 4.0.... and with a bit of luck you end up with a working connector in 4.0

hope it helps

BUT: we need to find a solution for this problem, for aOO there is also a connector, it works fine with LO 3.6 , for using it in LO 4.0 we need to re-compile the extension using the SDK and not the whole code base who looks a less complex task

Greetz

Fernand

Hi Fernand,

BUT: we need to find a solution for this problem, for aOO there is also
a connector, it works fine with LO 3.6 , for using it in LO 4.0 we need
to re-compile the extension using the SDK and not the whole code base
who looks a less complex task

This approach does not work at the moment, judging from my discussions
on the dev list. Something to do with automatically included extra
function code that the mysql connector extension code doesn't know how
to deal with following changes in OUString code introduced into LO's
code tree.

Alex