Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is libintl.h and where can I get it?

Tags:

git

osx-lion

Trying to do a make install of git from source, and it keep kicking up the error:

 make install
* new build flags or prefix
CC credential-store.o
In file included from credential-store.c:1:
In file included from ./cache.h:8:
./gettext.h:17:11: fatal error: 'libintl.h' file not found
#       include <libintl.h>
            ^
1 error generated.
make: *** [credential-store.o] Error 1

No amount of Googling has turned up anything on lib.intl.h. What is this elusive library, and how can I get it so I can finally install git?

like image 408
Adam Templeton Avatar asked Jul 06 '12 22:07

Adam Templeton


3 Answers

FWIW on OSX with El Capitan and homebrew, I did a:

1) I wasn't sure if the El Capitan upgrade had broken something, so first I made sure I had the latest gettext:

$ brew reinstall gettext

Then I had to re-link by doing:

$ brew unlink gettext && brew link gettext --force

After that, other tools were able to find it, and life went back to normal.

like image 184
rotten Avatar answered Nov 06 '22 07:11

rotten


Depending on the system, it's probably part of the GNU C library (glibc).

Note that just installing the file libintl.h isn't likely to do you any good.

On Debian-based systems (including Debian, Ubuntu, and Linux Mint), it's part of the libc6-dev package, installed with:

sudo apt-get install libc6-dev

Since you're using Mac OS X, a Google search for "libintl.h OSX" shows a lot of people having similar problems. According to the INSTALL file in the Git sources:

Set NO_GETTEXT to disable localization support and make Git only use English. Under autoconf the configure script will do this automatically if it can't find libintl on the system.

like image 37
Keith Thompson Avatar answered Nov 06 '22 08:11

Keith Thompson


I learned libintl comes from libgettext. If you already installed gettext by Homebrew, you would see:

$ locate libintl
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.8.dylib
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.a
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.dylib
<..snip..>

and the following works for me on the issue of "library not found for -lintl"

ln -s /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.* /usr/local/lib/
like image 25
ronnefeldt Avatar answered Nov 06 '22 09:11

ronnefeldt