[ntp:questions] status information after ntpd -q

Harlan Stenn stenn at ntp.org
Wed Feb 12 00:35:11 UTC 2014

joeri delvoy writes:
> Hello,
> just to be clear about how i compile the source code:
> 1. when i try out the program on my PC (Ubuntu) the code works just fine:
>> ./configure in the downloaded ntp-4.2.7p418 folder 
>> then : make install DESTDIR=/tmp/ntp
>> within /tmp/ntp/usr/local/bin/ i can execute the sntp program without
>> errors.
> 2. when i try to compile it for my arm device: first of all: this code
> ALSO works on my Ubuntu PC, so it seems like the code seems not
> compiled for arm.  And when i copy the program "sntp" to my device,
> and execute it there, i get these weird errors

What does your "configure" line look like in that case?

If you have any desire to build for both your local machine and the ARM
device from the same source tree, I recommend you do your PC builds in an
A.ubuntu/ subdir (cd there and ../configure ...), and your ARM builds in
A.arm5tejl, doing "../configure --host=arm5tejl

You want --host, not --target, and ideally you'd be using a
CPU-Vendor-OS triple instead of the names you are using, especially if
you need to make any changes to configure.ac or our macros to better
handle cross-compiling.  If you're open to sending any patches, please
do so.

> 3. i have an armv5tejl, and i tried 2x to compile with other target name, but
>  it failed 2x on my device (but the program worked on my Ubuntu as said):
> 3a.
> >make destclean
> >./configure --target=armv5tejl --build=x86_64 --program-prefix=armv5te
> >make install DESTDIR=/tmp/ntp
> >copy the file armv5tesntp to device and try to execute it.
> and 
> 3b.
> >make destclean
> >./configure --target=arm --build=x86_64 --program-prefix=armv5te
> >make install DESTDIR=/tmp/ntp
> >copy the file armv5tesntp to device and try to execute it.

According to:


you want to use --host, not --target.

A.subdir builds are your friend, in my experience.  Much easier to clean
up and test, especially when trying to build multiple targets (even an
"optimized" and "debug" target for the current machine).

And in my experience, one can get this to work using "simpler" names for
the build and host systems, but once you get more than a couple of these
it's tons easier to use the full-on CPU-Vendor-Host triple and make sure
that the config.sub/config.guess maintainers have those patches as well.

Also note that a group of folks decided that many linux systems really
needed a 4-part CPU-usuallyunknown-linux-LIBC beast, which to me is
incredibly useless.  So NTP uses sntp/scripts/cvo.sh to convert this
into a form I find to be much more useful.  We use this more useful
format in configure.ac, our macros, and in sntp/scripts/genLocInfo .


More information about the questions mailing list