(new Soapbox())->shout(array_map('strtoupper', $opinions)); //Shaun's blog

Me, elsewhere

Miscellaneous public code

A PHP API client for Reddit

I don't tweet much

XMPP chat
(Pidgin, Miranda, Swift, etc.)

Perfect is the enemy of good enough.

Resolving "fatal error: 'libintl.h' file not found" build error from p5-Locale-libintl on FreeBSD

Posted May 10, 2019 by shaun

When building p5-Locale-libintl on FreeBSD 11.2, I encountered the following error about a supposedly missing libintl.h file:

--- dynamic ---
--- subdirs ---
--- ../blib/arch/auto/Locale/gettext_xs/gettext_xs.bs ---
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- gettext_xs.bs ../blib/arch/auto/Locale/gettext_xs/gettext_xs.bs 644
--- linkext ---
--- subdirs ---
--- gettext_xs.o ---
gettext_xs.xs:25:10: fatal error: 'libintl.h' file not found
#include <libintl.h>
1 error generated.
*** [gettext_xs.o] Error code 1

make[2]: stopped in /usr/ports/devel/p5-Locale-libintl/work/libintl-perl-1.31/gettext_xs
1 error

make[2]: stopped in /usr/ports/devel/p5-Locale-libintl/work/libintl-perl-1.31/gettext_xs
*** [subdirs] Error code 2

make[1]: stopped in /usr/ports/devel/p5-Locale-libintl/work/libintl-perl-1.31
1 error

make[1]: stopped in /usr/ports/devel/p5-Locale-libintl/work/libintl-perl-1.31
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make: stopped in /usr/ports/devel/p5-Locale-libintl

The curious thing is that libintl.h definitely exists on this system. It's at /usr/local/include/libintl.h and was installed by the gettext-runtime port:

[root@host ~]# pkg which /usr/local/include/libintl.h
/usr/local/include/libintl.h was installed by package gettext-runtime-

For whatever reason, the p5-Locale-libintl port isn't looking there; it really wants the header file to be in /usr/include instead of /usr/local/include. Adding a symlink fixed the problem:

[root@host ~]# ln -s /usr/local/include/libintl.h /usr/include/libintl.h

Now, p5-Locale-libintl installs with no errors.

Thanks to "GreenReaper" for opening a bug against the p5-Locale-libintl port.

Recent articles

📰 Caveat with Vantec SATA/IDE to USB 2.0 Adapter and Macrium software

📰 Jay Niffley, Man of Mystery

📰 Compiling Doxygen on FreeBSD without LaTeX and Ghostscript

📰 Introducing Snuze, a PHP client for the Reddit API

📰 jisusaiche: Java's installer telemetry

📰 BIND client log error "query_find: query_getdb failed"

📰 Resolving "The lang/perl5.24 port has been deleted: Has expired" portmaster error

📰 Armagaddon2 interim fix for Firefox 56 and other old versions

📰 Strange DNS queries: qname "miep", qtype ANY

📰 Undeliverable as addressed: A massive broken spam campaign?

📰 Using WITH_META_MODE and ccache for FreeBSD build boosts

📰 Resolving subversion error E000013: Unable to create pristine install stream

📰 Enhancements to SmokePing's AnotherDNS probe

📰 Generating vanity DNSSEC key tags

📰 DDoS involving forged packets from

▲ Back to top | Permalink to this page