[ntp:questions] disable ac_cv_lib_intl_gettext for ARM cross-compile

Christopher L. Norris clnorris at ieee.org
Tue Oct 23 07:04:23 UTC 2018


Good evening,

I have recently migrated from an ancient version of ntp to ntp-4.2.8p12 on
an ARM board.

I am running ntpd from RAM in a uImage, so my file system needs an
extremely small footprint. Although my cross-compiler has gettext, I need
to avoid pulling in the gettext libs on my ARM target.

I'm trying to force the "checking for gettext in -lintl" test to report no,
but I haven't found an option to pass into configure that does the job.

I have played with the --disable-nls and --enable-nls=no options, but every
time I build, the resulting ntpd wants to pull in libintl.so.8:

# ldd ntpd
ldd: can't open cache '/etc/ld.so.cache'
        libm.so.0 => /lib/libm.so.0 (0x40017000)
        libintl.so.8 => not found
        libiconv.so.2 => not found
        libc.so.0 => /lib/libc.so.0 (0x40036000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x400ac000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
        libdl.so.0 => /lib/libdl.so.0 (0x400cf000)

The workaround to eliminate the extra dependencies from the link was to
insert a ac_cv_lib_intl_gettext=no line kind of high up in the configure
scripts, that way the "checking for gettext in -lintl" test is bypassed.

The resulting ntpd no longer has the -lintl for the link.  My ntpd on ARM
is back to being lean and mean:

# ldd ntpd
ldd: can't open cache '/etc/ld.so.cache'
        libm.so.0 => /lib/libm.so.0 (0x40017000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40036000)
        libc.so.0 => /lib/libc.so.0 (0x40059000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)
        libdl.so.0 => /lib/libdl.so.0 (0x400cf000)

I can live with the manual hack to my configure script for a while, but it
doesn't seem like the maintainable approach.

Am I missing an existing option that I could pass in to the the configure
script that would achieve ac_cv_lib_intl_gettext=no ?

Looking for some advice from the autotools wizards out there!

Thanks,

Chris Norris


More information about the questions mailing list