Created attachment 64698 [details] mysqlcppconn build failure log On Mac OSX 10.6.8, using the following autogen switches : --enable-ext-mysql-connector --with-system-mysql My build fails in mysqlcppconn. Attached is the log output.
So, from what I can gather (and I have rudimentary understanding of the C/C++ programming language) : mysql_client_api.h includes mysql_private_interface.h at line 28, which itself includes errmsg.h at line 60, the latter not being present in the mysqlcppconn libraries that the LO build fetches/includes (at least I couldn't find them in a search on my disk, nor do they appear to be present by default in Mac OSX. Of course, the errmsg.h *is* present in the MySQL "C" library sources, which is why if I reference them "--with-libmysql-path" in the build, I don't get this error (or the subsequent ones I imagine). Alex
Lionel, Assigning this to you, but if you feel it is someone else's ball park, please re-assign or reset the default. Alex
Forgot to mention that it can't find the mysql.h header either (which was obvious from the error message, but whatever). On OSX 10.7.4, these headers can be found on Mac OSX here, if the mysql client/server has been installed via the PORTS tree : /opt/local/include/mysql5/mysql/mysql.h /opt/local/include/mysql55/mysql/mysql.h /opt/local/include/mysql5/mysql/errmsg.h /opt/local/include/mysql55/mysql/errmsg.h Or here if you use the binary DMG provided by MySQL : /usr/local/mysql-5.5.25a-osx10.6-x86_64/include/mysql.h /usr/local/mysql-5.5.25a-osx10.6-x86_64/include/errmsg.h Alex
Please show the output of the following commands: $ which mysql_config $ mysql_config $ mysql_config --include $ mysql_config --cflags
(In reply to comment #4) > Please show the output of the following commands: > > > $ which mysql_config > $ mysql_config > $ mysql_config --include > $ mysql_config --cflags On OSX 10.7.4, with ports tree and MySQL official (64bit) binary : which mysql_config5 /opt/local/bin/mysql_config5 mysql_config5 Usage: /opt/local/bin/mysql_config5 [OPTIONS] Options: --cflags [-I/opt/local/include/mysql5/mysql -pipe -fPIC -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL] --include [-I/opt/local/include/mysql5/mysql] --libs [-L/opt/local/lib -L/opt/local/lib/mysql5/mysql -lmysqlclient -L/opt/local/lib -lz -lm -L/opt/local/lib/ -lssl -lcrypto] --libs_r [-L/opt/local/lib -L/opt/local/lib/mysql5/mysql -lmysqlclient_r -L/opt/local/lib -lz -lm -L/opt/local/lib/ -lssl -lcrypto] --plugindir [/opt/local/lib/mysql5/mysql/plugin] --socket [/opt/local/var/run/mysql5/mysqld.sock] --port [0] --version [5.1.63] --libmysqld-libs [-L/opt/local/lib -L/opt/local/lib/mysql5/mysql -lmysqld -ldl -L/opt/local/lib -lz -lm -L/opt/local/lib/ -lssl -lcrypto] The default on Mac OSX 10.6.8 Snow Leopard appears to be : Usage: /usr/bin/mysql_config [OPTIONS] Options: --cflags [-I/usr/include -fno-omit-frame-pointer -pipe -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT] --include [-I/usr/include] --libs [-pipe -L/usr/lib -lmysqlclient -lz -lm] --libs_r [-pipe -L/usr/lib -lmysqlclient_r -lz -lm] --socket [/var/mysql/mysql.sock] --port [0] --version [5.0.92] --libmysqld-libs [-pipe -L/usr/lib -lmysqld -lz -lm]
(In reply to comment #5) > (In reply to comment #4) > > Please show the output of the following commands: >> $ which mysql_config >> $ mysql_config >> $ mysql_config --include >> $ mysql_config --cflags > On OSX 10.7.4, with ports tree and MySQL official (64bit) binary : > which mysql_config5 > /opt/local/bin/mysql_config5 mysql_config5 won't be found by the LibO ./configure script in "--with-system-mysql", it is looking only for mysql_config; we could as a fall-back look for mysql_config5 I suppose. But as this is not the system on which you have the current bug, I'll skip that from the discussion for now. > The default on Mac OSX 10.6.8 Snow Leopard appears to be : > Usage: /usr/bin/mysql_config [OPTIONS] > Options: > --include [-I/usr/include] This says that the mysql include headers are in /usr/include, but you report that they are in one of: /opt/local/include/mysql5/mysql /opt/local/include/mysql55/mysql /usr/local/mysql-5.5.25a-osx10.6-x86_64/include/ Either you have multiple (partial/full) copies of MySQL client libraries/libs on your system, or the distributor of your MySQL misconfigured its packaging. If you have multiple partial/full copies of MySQL, then the problem is (most probably) that you are trying to mix different ones. "--with-system-mysql" means "use what the first mysql_config in the PATH tells you to". It tells us the find the MySQL headers in /usr/include, but they are not there. So either: - install the headers part of the MySQL distribution that furnishes /usr/bin/mysql_config (on GNU/Linux, this is often a "FOO-dev" or "FOO-devel" package) This should install (among others) /usr/include/errmsg.h; if not, it is a bug in the MySQL distribution you are using. - point LibO ./configure to whichever complete copy of client libs and headers that you wish it to use. You can do that by passing --with-libmysql-path=/foo/bar/qux to ./autogen.sh or run in in an environment where you have done export MYSQLCONFIG=/foo/bar/qux/bin/mysql-config If you have only one copy of MySQL client libs then: - install the headers part of the MySQL distribution that furnishes /usr/bin/mysql_config (on GNU/Linux, this is often a "FOO-dev" or "FOO-devel" package) This should install (among others) /usr/include/errmsg.h; if not, it is a bug in the MySQL distribution you are using.
(In reply to comment #6) > mysql_config5 won't be found by the LibO ./configure script in > "--with-system-mysql", it is looking only for mysql_config; we could as a > fall-back look for mysql_config5 I suppose. But as this is not the system on > which you have the current bug, I'll skip that from the discussion for now. Agreed, anyway it is a symbolic link to : /opt/local/lib/mysql5/bin/mysql_config so this particular link results from a ports install. I only mentioned my OSX 10.7.4 configuration for comparison to my 10.6.8, which is "pristine" to all intents and purposes, since I don't have the ports tree installed on the Snow Leopard system. > > > The default on Mac OSX 10.6.8 Snow Leopard appears to be : > > Usage: /usr/bin/mysql_config [OPTIONS] > > Options: > > --include [-I/usr/include] > > This says that the mysql include headers are in /usr/include, but you report > that they are in one of: > /opt/local/include/mysql5/mysql > /opt/local/include/mysql55/mysql > /usr/local/mysql-5.5.25a-osx10.6-x86_64/include/ > Ah yes, I've just realised that I reported that in error for OSX 10.6, because I was searching on my 10.7 machine and not the 10.6 machine (the Mac Finder does not follow links to shared server resources apparently), hence I led you astray with that, sorry. > If you have multiple partial/full copies of MySQL, then the problem is (most > probably) that you are trying to mix different ones. "--with-system-mysql" > means "use what the first mysql_config in the PATH tells you to". It tells us > the find the MySQL headers in /usr/include, but they are not there. So either: By default, Apple does not provide any mysql headers with its own default installation of mysql... > > - install the headers part of the MySQL distribution that furnishes > /usr/bin/mysql_config > (on GNU/Linux, this is often a "FOO-dev" or "FOO-devel" package) > This should install (among others) /usr/include/errmsg.h; > if not, it is a bug in the MySQL distribution you are using. Not possible on Mac OSX, Apple don't provide them. > > - point LibO ./configure to whichever complete copy of client libs and headers > that you > wish it to use. You can do that by passing > --with-libmysql-path=/foo/bar/qux This is what I have been doing for the past x months. However, that has recently led to bug https://bugs.freedesktop.org/show_bug.cgi?id=52275 which is why I was attempting to build once more with system-mysql. Alex
(In reply to comment #7) > (In reply to comment #6) >>> The default on Mac OSX 10.6.8 Snow Leopard appears to be : >>> Usage: /usr/bin/mysql_config [OPTIONS] >>> Options: >>> --include [-I/usr/include] >> This says that the mysql include headers are in /usr/include >> - install the headers part of the MySQL distribution that furnishes >> /usr/bin/mysql_config >> (on GNU/Linux, this is often a "FOO-dev" or "FOO-devel" package) >> This should install (among others) /usr/include/errmsg.h; >> if not, it is a bug in the MySQL distribution you are using. > Not possible on Mac OSX, Apple don't provide them. There is a link in http://support.apple.com/kb/HT4006, but it is marked for "Mac OS X *Server* 10.6". No clue if it is appropriate for the Desktop version of MacOS X, too. If you really cannot get the headers from the same source as the mysql_config executable, then you can't compile with this mysql library, period. You need to download/install another one, and properly point LibO's ./configure to it.