Installation fails on OS X using Homebrew

204 views
Skip to first unread message

Gergo Erdosi

unread,
May 9, 2012, 2:17:35 PM5/9/12
to percona-d...@googlegroups.com
Hi,

I'm trying to install Percona Server on OS X using Homebrew, however
unable to compile it. Please see this ticket for details:
https://github.com/mxcl/homebrew/issues/12075

I managed to fix some of the errors, however there is one that I
couldn't solve yet:

[ 97%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
Linking CXX executable mysqld
Undefined symbols for architecture x86_64:
"__increment_page_get_statistics", referenced from:
_buf_page_get_gen in libinnobase.a(buf0buf.c.o)
_buf_page_optimistic_get in libinnobase.a(buf0buf.c.o)
_buf_page_get_known_nowait in libinnobase.a(buf0buf.c.o)
ld: symbol(s) not found for architecture x86_64

The formula uses these flags:

args = std_cmake_parameters.split + [
".",
"-DMYSQL_DATADIR=#{var}/percona",
"-DINSTALL_MANDIR=#{man}",
"-DINSTALL_DOCDIR=#{doc}",
"-DINSTALL_INFODIR=#{info}",
# CMake prepends prefix, so use share.basename
"-DINSTALL_MYSQLSHAREDIR=#{share.basename}",
"-DWITH_SSL=yes",
"-DDEFAULT_CHARSET=utf8",
"-DDEFAULT_COLLATION=utf8_general_ci",
"-DSYSCONFDIR=#{etc}",
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
]

Can anybody tell me what could be the source of this error? You can
reply on Github too in the ticket. Thanks in advance!

Gergo Erdosi

Alexey Kopytov

unread,
May 10, 2012, 3:05:59 AM5/10/12
to percona-d...@googlegroups.com
Hi Gergo,

On Wed, 9 May 2012 20:17:35 +0200, Gergo Erdosi wrote:
> Hi,
>
> I'm trying to install Percona Server on OS X using Homebrew, however
> unable to compile it. Please see this ticket for details:
> https://github.com/mxcl/homebrew/issues/12075
>
> I managed to fix some of the errors, however there is one that I
> couldn't solve yet:
>
> [ 97%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
> Linking CXX executable mysqld
> Undefined symbols for architecture x86_64:
> "__increment_page_get_statistics", referenced from:
> _buf_page_get_gen in libinnobase.a(buf0buf.c.o)
> _buf_page_optimistic_get in libinnobase.a(buf0buf.c.o)
> _buf_page_get_known_nowait in libinnobase.a(buf0buf.c.o)
> ld: symbol(s) not found for architecture x86_64
>

The reason is the differences in the default inline semantics between
GCC and Clang. I have reported it as
https://bugs.launchpad.net/percona-server/+bug/997496

The workaround is to build with GCC. And the fix is to change
_increment_page_get_statistics() to a static inline function:

@@ -57,7 +57,7 @@
/* prototypes for new functions added to ha_innodb.cc */
trx_t* innobase_get_trx();

-inline void _increment_page_get_statistics(buf_block_t* block, trx_t* trx)
+static inline void _increment_page_get_statistics(buf_block_t* block,
trx_t* trx)
{
ulint block_hash;
ulint block_hash_byte;

Best regards,
Alexey.

Gergo Erdosi

unread,
May 10, 2012, 4:29:33 AM5/10/12
to Percona Discussion
Hi Alexey,

Thanks, that was the problem! I was able to compile Percona Server
now. Homebrew is able to patch packages, so I decided to fix it
instead of the workaround. I'll remove the patch when a new release of
Percona Server comes out with the fix. Thanks for your help!

Gergo Erdosi


On May 10, 9:05 am, Alexey Kopytov <alexey.kopy...@percona.com> wrote:
> Hi Gergo,
>
> On Wed, 9 May 2012 20:17:35 +0200, Gergo Erdosi wrote:
> > Hi,
>
> > I'm trying to install Percona Server on OS X using Homebrew, however
> > unable to compile it. Please see this ticket for details:
> >https://github.com/mxcl/homebrew/issues/12075
>
> > I managed to fix some of the errors, however there is one that I
> > couldn't solve yet:
>
> > [ 97%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o
> > Linking CXX executable mysqld
> > Undefined symbols for architecture x86_64:
> >   "__increment_page_get_statistics", referenced from:
> >       _buf_page_get_gen in libinnobase.a(buf0buf.c.o)
> >       _buf_page_optimistic_get in libinnobase.a(buf0buf.c.o)
> >       _buf_page_get_known_nowait in libinnobase.a(buf0buf.c.o)
> > ld: symbol(s) not found for architecture x86_64
>
> The reason is the differences in the default inline semantics between
> GCC and Clang. I have reported it ashttps://bugs.launchpad.net/percona-server/+bug/997496
Reply all
Reply to author
Forward
0 new messages