[ntp:questions] Help with cross-compiling NTP for the Raspberry Pi requested

Per Hedeland per at hedeland.org
Fri Mar 7 21:50:17 UTC 2014

In article <lfcomm$at5$1 at dont-email.me> David Taylor <david-taylor at blueyonder.co.uk.invalid> writes:
>There's a discrepancy here I am unsure about.  When I run the script:
>    sntp/libevent/build-aux/config.guess
>on the Raspberry Pi, for "host" I get:
>   armv6l-unknown-linux-gnueabihf
>but, as you will see, the prefix above is:
>   arm-bcm2708hardfp-linux-gnueabi-

You don't need to worry a whole lot about that, these names/prefixes are
somewhat arbitrary.

>I did try adding the directory in front of the existing PATH, but I 
>still got the wrong sized executables.  Let me try with:
>   --host=arm-bcm2708hardfp-linux-gnueabi-

Did you actually manage a successful run of 'configure' with that
argument? I don't have a Linux cross-compilation environment for RPi,
but I happen to have a FreeBSD one (for FreeBSD on RPi of course:-) - it
doesn't use the prefix you have but I arranged that, downloaded the
"stable" ntp-4.2.6p5, and ran

  ./configure --host=arm-bcm2708hardfp-linux-gnueabi-

with the result:

checking host system type... Invalid configuration `arm-bcm2708hardfp-linux-gnueabi-': machine `arm-bcm2708hardfp-linux-gnueabi' not recognized
configure: error: /bin/sh ./config.sub arm-bcm2708hardfp-linux-gnueabi- failed

Obviously, at this point it is futile to try to run 'make'. The correct
--host option for your case is


- note the absence of the trailing '-'. When I use that with 'configure'
and my "tweaked" cross-compilation environment, it succeeds. The
subsequent 'make' fails when building 'tickadj', I haven't tried to look
into why, but 'ntpd' was sucessfully built (on a x86 host):

$ file ntpd/ntpd
ntpd/ntpd: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for FreeBSD 10.0 (1000510), not stripped

I haven't tried running it though, since my Pi currently runs Linux...

--Per Hedeland

More information about the questions mailing list