EditWYSIWYGAttachPrintable
r4 - 2007-12-21 - 14:42:27 - SteveKosteckeYou are here: NTP >  Dev Web > PortingIssues > Cross-compilingNTP
NTP users are strongly urged to take immediate action to ensure that their NTP daemons are not susceptible to being used in distributed denial-of-service (DDoS) attacks. Please also take this opportunity to defeat denial-of-service attacks by implementing Ingress and Egress filtering through BCP38.

ntp-4.2.8p13 was released on 07 March 2019. It addresses 1 medium-severity security issue in ntpd, and provides 17 non-security bugfixes and 1 other improvements over 4.2.8p12.

Please see the NTP Security Notice for vulnerability and mitigation details.

Are you using Autokey in production? If so, please contact Harlan - he's got some questions for you.

Cross-compiling NTP

warning The configure script uses the cpu-vendor-os string to make decisions on a number of configurable items. While in a 'regular' build we can, for example, compile and run a test program to determine some of this information we can compile but we cannot run a test program that is being cross-compiled. In these cases, you should look at the configure.ac file to for hints on how you should proceed.

Please submit reports at http://bugs.ntp.org to improve the ability to cross-compile ntp.

Basic Cross-compile instructions

If you are using a GNU toolchain and the cross-compile tools have been installed under "proper" names, this is pretty easy.

Get the CPU-Vendor-OS strings for the build and host machines. In GNU AutoConf parlance, the build machine is the machine you will be compiling on, and the host machine is where you expect the binaries to run.

 build> config.guess
 bCpu-Vendor-Os
 build>

 host> config.guess
 hCpu-Vendor-Os
 host>

In a "proper" cross-compile environment, there will be named toolchains for a variety of platforms, including the build environment and at least one host environment. On a sparc-sun-solaris2.10 machine that has a cross-compile environment for i386-unknown-freebsd6.2, you should find the following executables on your system:

  • gcc (which is probably symlinked to sparc-sun-solaris2.10-gcc )
  • sparc-sun-solaris2.10-gcc
  • i386-unknown-freebsd6.2-gcc

To build a FreeBSD version of ntp on the Solaris machine you could:

 > cd ntp-dev
 > mkdir A.i386-unknown-freebsd6.2
 > cd A.i386-unknown-freebsd6.2
 > ../configure --host=i386-unknown-freebsd6.2 --build=sparc-sun-solaris2.10
 > make
 > make DESTDIR=`pwd`/:Built install

and you will have all of the pieces ready to be installed under the A.i386-unknown-freebsd6.2/:Built/ subdirectory.

If you do not have a GNU cross-compile toolchain installed, it's still pretty easy. In this case, I recommend installing symlinks to the needed tools using the naming style described above. In most cases the Vendor part of the "triple" is not significant, so you can use whatever name works for you in that case in the above examples.

Building for VxWorks

Building ntp for VxWorks used to be easy. Please see VxWorksPortingIssues for more information.

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions...
 
SSL security by CAcert
Get the CAcert Root Certificate
This site is powered by the TWiki collaboration platform
IPv6 Ready
Copyright & 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding the site? Send feedback