Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] cross-compile samba4

1,133 views
Skip to first unread message

Mike Howard

unread,
May 15, 2012, 5:50:02 AM5/15/12
to
Hi All,

Are there any good, up-to-date hints out there for cross compiling
Samba4 for Arm?

I've looked at http://wiki.samba.org/index.php/Waf#cross-compiling but
the info is a little dated it appears. I'm looking to build for the
dreamplug and based on the info on the wiki I've installed qemu and an
arm toolchain but 'cross-execute' appears to be ignored. At least that's
what it looks like to me.

The 'config' step fails complaining it can't find the python libraries
but I suspect the process is failing to run the created arm code.

Of course I could be way off of base with my assumtions. Maybe I'd be
better off not using waf? Either way, any hints on cross-compiling
samba4 greatly appreciated.

Cheers,
Mike.
--
Any question is easy if you know the answer!
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Andrew Bartlett

unread,
May 17, 2012, 8:10:01 AM5/17/12
to
On Tue, 2012-05-15 at 10:40 +0100, Mike Howard wrote:
> Hi All,
>
> Are there any good, up-to-date hints out there for cross compiling
> Samba4 for Arm?
>
> I've looked at http://wiki.samba.org/index.php/Waf#cross-compiling but
> the info is a little dated it appears. I'm looking to build for the
> dreamplug and based on the info on the wiki I've installed qemu and an
> arm toolchain but 'cross-execute' appears to be ignored. At least that's
> what it looks like to me.
>
> The 'config' step fails complaining it can't find the python libraries
> but I suspect the process is failing to run the created arm code.
>
> Of course I could be way off of base with my assumtions. Maybe I'd be
> better off not using waf? Either way, any hints on cross-compiling
> samba4 greatly appreciated.

Mike,

I've CC'ed Kai, who is our expert on Samba4 on ARM. Hopefully he can
help you out.

Andrew Bartlett

--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org

Kai Blin

unread,
May 18, 2012, 3:20:02 AM5/18/12
to
On 2012-05-17 14:06, Andrew Bartlett wrote:

Hi Mike,

> I've CC'ed Kai, who is our expert on Samba4 on ARM. Hopefully he can
> help you out.

I have to admit that so far I've resorted to building natively on the
ARM hardware I run things on. You need a target Python version in your
path, and cross-compiling Python has so far been a stumbling block for me.
The dreamplug is a Kirkwood-based ARMv5, right? With a reasonably fast
disk, I can build on similar hardware in ~2 hours, iirc. Make sure you
have enough RAM, the build takes > 128 megs.

HTH,
Kai

--
Kai Blin
Worldforge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/

Mike Howard

unread,
May 18, 2012, 3:50:02 AM5/18/12
to
On 18/05/2012 08:15, Kai Blin wrote:
> On 2012-05-17 14:06, Andrew Bartlett wrote:
>
> Hi Mike,
>
>> I've CC'ed Kai, who is our expert on Samba4 on ARM. Hopefully he can
>> help you out.
> I have to admit that so far I've resorted to building natively on the
> ARM hardware I run things on. You need a target Python version in your
> path, and cross-compiling Python has so far been a stumbling block for me.
> The dreamplug is a Kirkwood-based ARMv5, right? With a reasonably fast
> disk, I can build on similar hardware in ~2 hours, iirc. Make sure you
> have enough RAM, the build takes> 128 megs.
>
> HTH,
> Kai
>
Thanks guys, that's very helpful.

I have compiled natively on the dreamplug and it did take ~2hrs. In the
past I've usually had to compile numerous times and time is money as
they say :), so compiling on my desktop, at just under 5mins, would be a
boon.

Cheers,
Mike.

Kai Blin

unread,
May 18, 2012, 4:00:02 AM5/18/12
to
On 2012-05-18 09:45, Mike Howard wrote:

Hi Mike,

> I have compiled natively on the dreamplug and it did take ~2hrs. In the
> past I've usually had to compile numerous times and time is money as
> they say :), so compiling on my desktop, at just under 5mins, would be a
> boon.

The Archlinux|ARM folks have a guide on using distcc cross-compiling
guide on their website,
http://archlinuxarm.org/developers/distcc-cross-compiling

I haven't tried this myself yet, but it should be adaptable to your
set-up and allow you to launch ARM builds that are distributed to your
desktop machine.

HTH,
Kai

--
Kai Blin
Worldforge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/

Mike Howard

unread,
May 20, 2012, 3:00:02 PM5/20/12
to
On 18/05/2012 08:15, Kai Blin wrote:
> On 2012-05-17 14:06, Andrew Bartlett wrote:
>
> Hi Mike,
>
>> I've CC'ed Kai, who is our expert on Samba4 on ARM. Hopefully he can
>> help you out.
> I have to admit that so far I've resorted to building natively on the
> ARM hardware I run things on. You need a target Python version in your
> path, and cross-compiling Python has so far been a stumbling block for me.
> The dreamplug is a Kirkwood-based ARMv5, right? With a reasonably fast
> disk, I can build on similar hardware in ~2 hours, iirc. Make sure you
> have enough RAM, the build takes> 128 megs.
>
> HTH,
> Kai
>
Hi Kai,

I thought I'd give the cross-compile route a further try. To that end,
I've a cross-compiled python and so have it available to put in my path.
However, If I put the 'arm' version at the head of my path, configure
fails immediately as it tries to use it and if I put it at the tail of
my path, then during the configure process, configure finds the native
python and tries to use it, which fails.

Is/are there any configure options to specify which python to use and
when? I guess not.

The configure doesn't want to play nice with distcc either, again due to
the python issue I guess.

Regards,
Mike.

--

Mike Howard

unread,
May 28, 2012, 12:10:02 PM5/28/12
to
On 18/05/2012 08:54, Kai Blin wrote:
> On 2012-05-18 09:45, Mike Howard wrote:
>
> Hi Mike,
>
>> I have compiled natively on the dreamplug and it did take ~2hrs. In the
>> past I've usually had to compile numerous times and time is money as
>> they say :), so compiling on my desktop, at just under 5mins, would be a
>> boon.
> The Archlinux|ARM folks have a guide on using distcc cross-compiling
> guide on their website,
> http://archlinuxarm.org/developers/distcc-cross-compiling
>
> I haven't tried this myself yet, but it should be adaptable to your
> set-up and allow you to launch ARM builds that are distributed to your
> desktop machine.
>
>
Hello again Kai,

As previously mentioned, distcc turned out not to be of any improvement
over my initial cross compile attempts.

I also tried qemu which wasn't much of an improvement over compiling
natively on my ARM device.

I have eventually succeeded in cross compiling on my x86_64 desktop and
although it's not as fast as a 5 minute native compile, I'll settle for
14 minutes as opposed to over 2 hours.

Thanks for the input.

Cheers,
Mike.

Andrew Bartlett

unread,
May 28, 2012, 6:10:01 PM5/28/12
to
On Mon, 2012-05-28 at 17:07 +0100, Mike Howard wrote:
> On 18/05/2012 08:54, Kai Blin wrote:
> > On 2012-05-18 09:45, Mike Howard wrote:
> >
> > Hi Mike,
> >
> >> I have compiled natively on the dreamplug and it did take ~2hrs. In the
> >> past I've usually had to compile numerous times and time is money as
> >> they say :), so compiling on my desktop, at just under 5mins, would be a
> >> boon.
> > The Archlinux|ARM folks have a guide on using distcc cross-compiling
> > guide on their website,
> > http://archlinuxarm.org/developers/distcc-cross-compiling
> >
> > I haven't tried this myself yet, but it should be adaptable to your
> > set-up and allow you to launch ARM builds that are distributed to your
> > desktop machine.
> >
> >
> Hello again Kai,
>
> As previously mentioned, distcc turned out not to be of any improvement
> over my initial cross compile attempts.
>
> I also tried qemu which wasn't much of an improvement over compiling
> natively on my ARM device.
>
> I have eventually succeeded in cross compiling on my x86_64 desktop and
> although it's not as fast as a 5 minute native compile, I'll settle for
> 14 minutes as opposed to over 2 hours.
>
> Thanks for the input.

Great news! I'm pretty sure you are the first person to have
cross-compiled Samba4, or if not, the first person to have done it in a
long time. (The ability was there, but you know the difference between
theory and practice).

Could you write up in the wiki what you needed to do, and if there are
any small changes we could make to the build system to make it easier
next time?

Andrew Bartlett

--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org

Mike Howard

unread,
May 29, 2012, 8:00:03 AM5/29/12
to
On 28/05/2012 23:07, Andrew Bartlett wrote:
>
> Great news! I'm pretty sure you are the first person to have
> cross-compiled Samba4, or if not, the first person to have done it in a
> long time. (The ability was there, but you know the difference between
> theory and practice).
>
> Could you write up in the wiki what you needed to do, and if there are
> any small changes we could make to the build system to make it easier
> next time?
>
> Andrew Bartlett
>
Sure, I can do that.

I assume I just need to create an account?

Cheers,
Mike.
--
Any question is easy if you know the answer!

Andrew Bartlett

unread,
May 29, 2012, 6:30:02 PM5/29/12
to
On Tue, 2012-05-29 at 12:52 +0100, Mike Howard wrote:
> On 28/05/2012 23:07, Andrew Bartlett wrote:
> >
> > Great news! I'm pretty sure you are the first person to have
> > cross-compiled Samba4, or if not, the first person to have done it in a
> > long time. (The ability was there, but you know the difference between
> > theory and practice).
> >
> > Could you write up in the wiki what you needed to do, and if there are
> > any small changes we could make to the build system to make it easier
> > next time?
> >
> > Andrew Bartlett
> >
> Sure, I can do that.
>
> I assume I just need to create an account?

Yes, Then let me know the name, so I can add you as approved.

Andrew Bartlett

--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org

0 new messages