Galera on FreeBSD

460 views
Skip to first unread message

Ilias Bertsimas

unread,
Sep 25, 2012, 12:23:08 PM9/25/12
to codersh...@googlegroups.com
Hello,

I tried to compile galera on FreeBSD 9 and got an error wsrep_utils.cc:339:2: error: #error "OS not supported".
Is there a way around it and what kind of dependency is in place that only works on linux ?

Thanks.

Alex Yurchenko

unread,
Sep 25, 2012, 12:59:46 PM9/25/12
to codersh...@googlegroups.com
Ok.

To begin with, MySQL-wsrep + Galera also compile on Solaris 11 (at
least x86).

Secondly, if you look at the code around line 339 in wsrep_utils.cc you
will see that the problem there is trivial and requires 2 lines of code.

The real "dependency" is in Galera, which requires a modern GCC to
compile (boost).

And after you install modern GCC, FreeBSD headers seem to be so er...
incompatible that they cause issues even at ASIO library level which
Galera relies on, and which is supposed to be totally cross-platform...
So I figured it would require way too many patching and ifdefs to
bother. By contrast, porting to Solaris took about a day. Which, IMO,
makes FreeBSD a freak of nature.

Hope that helps,
Alex

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

Ilias Bertsimas

unread,
Sep 25, 2012, 1:41:07 PM9/25/12
to codersh...@googlegroups.com
Thank you Alexey,

yes I noticed it was about the ifconfig check and I bypassed it.
I am now trying to compile wsrep api provider and it seems to have some issues with pthreads.
Are there any plans to support FreeBSD in the future as it is a really good platform and ZFS is great for intensive i/o load.

Kind Regards,
Ilias.

Ilias Bertsimas

unread,
Sep 25, 2012, 2:06:08 PM9/25/12
to codersh...@googlegroups.com
Got this far.. 

/usr/local/include/boost/unordered/detail/fwd.hpp:235:   instantiated from 'typename A::value_type& boost::unordered_detail::hash_iterator_base<A, G>::operator*() const [with A = std::allocator<std::pair<const galera::TrxHandle::Transition, galera::FSM<galera::TrxHandle::State, galera::TrxHandle::Transition, galera::EmptyGuard, galera::EmptyAction>::TransAttr> >, G = boost::unordered_detail::ungrouped]'
/usr/local/include/boost/unordered/detail/fwd.hpp:752:   instantiated from 'typename A::value_type* boost::unordered_detail::hash_iterator<A, G>::operator->() const [with A = std::allocator<std::pair<const galera::TrxHandle::Transition, galera::FSM<galera::TrxHandle::State, galera::TrxHandle::Transition, galera::EmptyGuard, galera::EmptyAction>::TransAttr> >, G = boost::unordered_detail::ungrouped]'
galera/src/fsm.hpp:85:   instantiated from 'void galera::FSM<State, Transition, Guard, Action>::shift_to(State) [with State = galera::TrxHandle::State, Transition = galera::TrxHandle::Transition, Guard = galera::EmptyGuard, Action = galera::EmptyAction]'

Mihai Secasiu

unread,
Sep 25, 2012, 1:53:04 PM9/25/12
to codersh...@googlegroups.com
I had similar problems when trying to compile it on MacOSX Lion. I know
this OS is not a "real" server os but it was fun trying.

I ended up patching a lot of the code and in the end after I did manage
to make it run I could not get IST to work so every time the node went
down it had to do a SST to get back in sync. After awhile we gave up
and installed debian on the macminis :)

But if anyone is interested I can give you the diff ( against 5.5.23 I
think )
> Codership Oy, www.codership.com <http://www.codership.com>
> Skype: alexey.yurchenko, Phone: +358-400-516-011
>
> --
>
>

Alex Yurchenko

unread,
Sep 25, 2012, 3:07:11 PM9/25/12
to codersh...@googlegroups.com
On 2012-09-25 20:41, Ilias Bertsimas wrote:
> Thank you Alexey,
>
> yes I noticed it was about the ifconfig check and I bypassed it.
> I am now trying to compile wsrep api provider and it seems to have
> some
> issues with pthreads.
> Are there any plans to support FreeBSD in the future as it is a
> really good
> platform and ZFS is great for intensive i/o load.

It's simple: as soon as there will be sufficient demand to justify the
effort of supporting it. However I don't see that coming. As for the
ZFS, you have Solaris ;)

Alex Yurchenko

unread,
Sep 25, 2012, 3:20:18 PM9/25/12
to codersh...@googlegroups.com
On 2012-09-25 21:06, Ilias Bertsimas wrote:
> Got this far..

Most likely you are using either stock GCC and/or stock boost that
comes with FreeBSD. GCC needs to be >= 4.4.x, boost needs to be >= 1.41
(arbitrary values known to work).

Ilias Bertsimas

unread,
Sep 25, 2012, 5:42:20 PM9/25/12
to codersh...@googlegroups.com
Yes of course it makes sense the need to justify the effort.
Yes but solaris is abandoned now and ZFS lead platform is the FreeBSD now.

Thanks!

Shawn O'Connor

unread,
Jul 8, 2013, 9:32:14 PM7/8/13
to codersh...@googlegroups.com
Is there a developer willing to work on porting it to FreeBSD? If so, how much would it cost (roughly). I don't really want to port our DBs to Linux.

Thanks,

Shawn

Alex Samorukov

unread,
Jul 9, 2013, 10:09:21 AM7/9/13
to codersh...@googlegroups.com


On Tuesday, July 9, 2013 3:32:14 AM UTC+2, Shawn O'Connor wrote:
Is there a developer willing to work on porting it to FreeBSD? If so, how much would it cost (roughly). I don't really want to port our DBs to Linux.

 As FreeBSD user and developer i can take a look on this. Its hard to estimate any cost before actually trying this but i don`t believe it would be something > 3-7 days at max.

P.S. I`m already maintaining xtrabackup in FreeBSD ports tree, and i do have Galera in my todo porting list, but no idea when i will have a time to look on this. If you interested to contact me, use samm [at] os2.kiev.ua email.
Reply all
Reply to author
Forward
0 new messages