Bug 82847 - Build fail with MariaDb Mysqlcppconn on MacOs
Summary: Build fail with MariaDb Mysqlcppconn on MacOs
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.4.0
Keywords:
Depends on:
Blocks: 82336
  Show dependency treegraph
 
Reported: 2014-08-20 07:12 UTC by Julien Nabet
Modified: 2014-09-05 07:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2014-08-20 07:12:31 UTC
On MacOs 10.9.4 with master sources updated yesterday
commit 8957c9419af8a1bc56b7e6cb248dc3fd57708589
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date:   Tue Aug 19 07:32:26 2014 +0200

    error C2296: '<<' : illegal, left operand has type 'const char [28]'
   
    Change-Id: Ibc25771002bd8ac9b4a2aca9f3c2965b8da9014e

+ this autogen.input:
--enable-64-bit
--with-system-odbc
--enable-werror
--enable-debug
--enable-dbgutil
--enable-crashdump
--enable-dependency-tracking
--enable-online-update
--enable-ext-mariadb-connector
--without-system-mariadb
--enable-bundle-mariadb
--with-lang=ALL
--without-junit
--with-myspell-dicts

I've got this result:
[build DEP] LNK:Library/libmysqlcppconn.dylib
[build LNK] Library/libmysqlcppconn.dylib
Undefined symbols for architecture x86_64:
  "_hash_key", referenced from:
      _hashcmp in libmariadblib.a(hash.o)
      _hash_rec_mask in libmariadblib.a(hash.o)
     (maybe you meant: _ma_get_hash_key)
  "_iconv", referenced from:
      _mariadb_convert_string in libmariadblib.a(my_charset.o)
  "_iconv_close", referenced from:
      _mariadb_convert_string in libmariadblib.a(my_charset.o)
  "_iconv_open", referenced from:
      _mariadb_convert_string in libmariadblib.a(my_charset.o)
  "_rec_hashnr", referenced from:
      _hash_insert in libmariadblib.a(hash.o)
      _hash_delete in libmariadblib.a(hash.o)
      _hash_update in libmariadblib.a(hash.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [/Users/marylinevogel/lo/core/workdir/LinkTarget/Library/libmysqlcppconn.dylib] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build] Error 2
Comment 1 Julien Nabet 2014-08-20 07:13:40 UTC
Alex/Lionel: thought it could be useful to create a new bugtracker.
Any idea?
Comment 2 Alex Thurgood 2014-08-27 14:44:50 UTC
Hi Julien,

I can't reproduce your error because 

libmariadb doesn't build for me on OSX (or Linux for that matter) with :

--enable-ext-mariadb-connector
--without-system-mariadb

fails by complaining about the lack of cmake.

Since when did cmake become required to build the connector ?

I have added it to my linux box, so build now proceeding, but the Cmake app bundle isn't registered system wide and doesn't get picked up by the mk script. Shouldn't autogen.sh check whether cmake is in the path and bork before it attempts the build ?

Anyway, as I'm pretty much clueless about how to pass the cmake.app to the LO build script, I'm stuck at the moment.
Comment 3 Commit Notification 2014-09-04 06:27:29 UTC
Norbert Thiebaud committed a patch related to this issue.
It has been pushed to "master":

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

fdo#82847 mariadb patch out problematic 'inline' that result in link issue



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 4 Lionel Elie Mamane 2014-09-04 07:17:50 UTC
(In reply to comment #2)
> Since when did cmake become required to build the connector ?

Since 50 minutes, it is not anymore (thanks to Norbert Thiebaud for that).

Norbert also solved the link issues, so it should work now. Reopen if it does not.
Comment 5 Julien Nabet 2014-09-05 05:33:24 UTC
I updated my local repo and built from scratch, it works now.
Thank you Norbert and Lionel!