pinba-engine compilation woes on centos 6.3

167 views
Skip to first unread message

gggeek

unread,
Dec 12, 2012, 3:20:41 PM12/12/12
to pinba-...@googlegroups.com
I did not want to install the rpm available from the main pinba website, as it would force me to upgrade to mysql 5.5.
So I tried compiling using the stock mysql from centos (5.1.66), plus Judy and protobufs from the EPEL repo.

But no luck so far:
1. most mysql headers seem to be in a dir structure which configure does not like (fixed more or less)
2. had to remove by hand the define for having mysql 5.5 from the generated pinba_config.h file
3. there seems to be no trace of the file mysql_priv.h onboard. Even seraching using yum whatprovides gave me no clue...

Any tip?

Thanks
Gaetano

Antony Dovgal

unread,
Dec 13, 2012, 4:00:10 AM12/13/12
to pinba-...@googlegroups.com
On 2012-12-13 00:20, gggeek wrote:
> I did not want to install the rpm available from the main pinba website, as it would force me to upgrade to mysql 5.5.
> So I tried compiling using the stock mysql from centos (5.1.66), plus Judy and protobufs from the EPEL repo.

To do this you need to get it's sources, configure them the way they were configured in the rpm and then build Pinba using these sources.

> But no luck so far:
> 1. most mysql headers seem to be in a dir structure which configure does not like (fixed more or less)
> 2. had to remove by hand the define for having mysql 5.5 from the generated pinba_config.h file

Eh?
What exactly did yoy do?

> 3. there seems to be no trace of the file mysql_priv.h onboard. Even seraching using yum whatprovides gave me no clue...

The headers required to build a MySQL storage engine/plugin are not provided by any packages, so I doubt yum would be able to find them.
That's exactly the reason this dancing around the sources is required.

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

Heinz Wiesinger

unread,
Dec 13, 2012, 4:25:50 AM12/13/12
to pinba-...@googlegroups.com
You could also try switching to the MariaDB packages provided here:

https://downloads.mariadb.org/mariadb/5.5.28a/#os_group=linux_package

They include the private headers necessary to compile the engine without
requiring the sources.

Attached you can find a spec file I use to compile the pinba storage engine
against those packages. I'm not very proficient in writing spec's, so there is
most likely some improvements to be made, but it works for me.

Grs,
Heinz
MariaDB-plugin-pinba.spec
signature.asc

Gaetano Giunta

unread,
Dec 13, 2012, 5:19:28 AM12/13/12
to pinba-...@googlegroups.com
Antony Dovgal wrote:
> On 2012-12-13 00:20, gggeek wrote:
>> I did not want to install the rpm available from the main pinba website, as it would force me to upgrade to mysql 5.5.
>> So I tried compiling using the stock mysql from centos (5.1.66), plus Judy and protobufs from the EPEL repo.
>
> To do this you need to get it's sources, configure them the way they were configured in the rpm and then build Pinba using these sources.

{assuming you are referring to mysql} I would have expected the mysql-devel packages to be sufficient, containing the header files necessary to link to the
mysql libs. I guess it was a simplistic expectation :-)

>
>> But no luck so far:
>> 1. most mysql headers seem to be in a dir structure which configure does not like (fixed more or less)
>> 2. had to remove by hand the define for having mysql 5.5 from the generated pinba_config.h file
>
> Eh?
> What exactly did you do?

a. got errors during execution of "configure" because of missing mysql headers
b. tried to patch "configure" file to look for mysql headers not in $mysql_dir/include and $mysql_dir/include/sql but directly in $mysql_dir (as on centos
they're all in /usr/include/mysql)
c. figured out my autotools skillz are below decency, simply copied .h files 3 times on disk, creating the expected dir structure
d. ran again "configure" => ok
e. ran "make", found out that pinba_config.h defined a mysql5_5 constant, simply removed those 3 lines from it as it was easier than patching "configure"
f. ran "make" again, stumbled on the missing header file mentioned below

>
>> 3. there seems to be no trace of the file mysql_priv.h onboard. Even searching using "yum whatprovides" gave me no clue...
>
> The headers required to build a MySQL storage engine/plugin are not provided by any packages, so I doubt yum would be able to find them.
> That's exactly the reason this dancing around the sources is required.
>
I see.
Any chance to have anyone provide a build of Pinba linked against the stock mysql from centos then?

Bye
Gaetano

Antony Dovgal

unread,
Dec 13, 2012, 6:01:19 AM12/13/12
to pinba-...@googlegroups.com
On 2012-12-13 14:19, Gaetano Giunta wrote:
> {assuming you are referring to mysql} I would have expected the mysql-devel packages to be sufficient, containing the header files necessary to link to the
> mysql libs. I guess it was a simplistic expectation :-)

I kinda expected it too =), but I was wrong - they only contain mysql client headers, the necessary server headers are missing.

> a. got errors during execution of "configure" because of missing mysql headers
> b. tried to patch "configure" file to look for mysql headers not in $mysql_dir/include and $mysql_dir/include/sql but directly in $mysql_dir (as on centos
> they're all in /usr/include/mysql)
> c. figured out my autotools skillz are below decency, simply copied .h files 3 times on disk, creating the expected dir structure
> d. ran again "configure" => ok
> e. ran "make", found out that pinba_config.h defined a mysql5_5 constant, simply removed those 3 lines from it as it was easier than patching "configure"
> f. ran "make" again, stumbled on the missing header file mentioned below

Yeah, well, that isn't going to work - you really need MySQL sources to compile Pinba or any other storage plugin.

> I see.
> Any chance to have anyone provide a build of Pinba linked against the stock mysql from centos then?

Should be possible to do it using openSUSE Build Service.
I'll give it a look today.

Александр Сахарчук

unread,
Dec 13, 2012, 7:29:29 AM12/13/12
to pinba-...@googlegroups.com
At russian group you can find short manual for install on CentOS 5.7 - https://groups.google.com/forum/#!topic/pinba-engine-ru/u15HGaeFP6M
You may adapt commands for your version of MySQL.

четверг, 13 декабря 2012 г., 13:01:19 UTC+2 пользователь tony2001 написал:
Reply all
Reply to author
Forward
0 new messages