Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to install GNU gettext on MAC OSX
  1. Wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext...t-0.12.1.tar.gz
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.
  4. You can remove the program binaries and object files from the source code directory by typing make clean. To also remove the files that configure created (so you can compile the package for a different kind of computer), type make distclean. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution.

source

There might be an issue when running step 4, do the following if you get the error and restart from step 4:

stpncpy.c:34: error: expected declaration specifiers or ‘...’ before numeric constant
stpncpy.c:34: error: expected ‘)’ before ‘!=’ token
stpncpy.c:34: error: expected ‘)’ before ‘?’ token
make[4]: *** [stpncpy.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

In the 34 line of .//gettext-tools/gnulib-lib/stpncpy.c:

Modify __stnpcpy (char *dest, const char *src, size_t n) to __stpcpy (char *dest, const char *src, size_t n)

source

@leekaiinthesky

This comment has been minimized.

Copy link

commented Nov 30, 2012

Worked for me, thanks!

@LorenaPressiani

This comment has been minimized.

Copy link

commented Apr 27, 2013

excelente

@zagros

This comment has been minimized.

Copy link

commented Sep 3, 2013

had the issue with _stnpcpy vs stpcy on OSX

thanks it worked

@dasilvacontin

This comment has been minimized.

Copy link

commented Dec 23, 2013

No such file ‘gettext...t-0.12.1.tar.gz’.

@ytwguru

This comment has been minimized.

@mr-stateradio

This comment has been minimized.

Copy link

commented Jan 15, 2014

Thanks for the gist!

@jrm2k6

This comment has been minimized.

Copy link

commented Jun 2, 2014

@demkinmaxim

This comment has been minimized.

Copy link

commented Jun 28, 2014

Here is the list of all version (grab the last one): http://ftp.gnu.org/pub/gnu/gettext/

@chadwithuhc

This comment has been minimized.

Copy link

commented Sep 30, 2014

configure: error: in `/Users/USERNAME/Downloads/gettext-0.19.2/gettext-runtime':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure: error: ./configure failed for gettext-runtime

any idea what would cause this?

@DrewMcArthur

This comment has been minimized.

Copy link

commented Sep 4, 2016

@camaleaun

This comment has been minimized.

Copy link

commented May 11, 2018

Or curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-latest.tar.gz. Also if wget is not installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.