June 2007


gnulib is a collection of approximately 590 routines which allow programs to be built on a cross platform basis. These are files intended to be shared at the source level rather than being a library meant to be installed and linked against so, unlike most projects, Gnulib does not normally generate a source tarball distribution; instead, developers should just grab modules directly from the repository. (The full list of modules and their description can be found here.) If you are missing one of the modules, you will get an error along the lines of

./configure: gl_XALLOC: command not found

when running ./configure

There are several ways to get hold of a copy of the repository:

  1. If you have git installed, then use the command git clone git://git.sv.gnu.org/gnulib
  2. If you prefer the CVS-like frontend of ‘cogitocg clone git://git.sv.gnu.org/gnulib
  3. If you have tightly limited disk space and a fast network connection, then CVS checkouts are also supported:
    $ cvs -d :pserver:anoncvs@cvs.gnu.org:/cvsroot/gnulib login
    (Just hit Enter or Return when prompted for a password)
    $ cvs -d :pserver:anoncvs@cvs.gnu.org:/cvsroot/gnulib checkout gnulib
  4. Download a snapshot from GNU’s Savannah server using wget

Since Westhost’s platform has none of git, cogito or cvs installed by default, I used the final option to obtain a copy of gnulib.git-HEAD.tar.gz
In order to use gnulib, you will need to download the gnulib-tool script and then use this to install the required modules. Don’t forget that you will need to give gnulib-tool execution rights (chmod u+x gnulib-tool).
Add details on installing module here

gnulib comprises the following routines and macros:
absolute-header, acl, alloca, alloca-opt, alloca-opt-tests, allocsa, allocsa-tests, announce-gen, arcfour, arcfour-tests, arctwo, arctwo-tests, argmatch, argmatch-tests, argp, argp-tests, argz, arpa_inet, arpa_inet-tests, array-list, array-list-tests, array-oset, array-oset-tests, assert, atexit, atexit-tests, autobuild, avltreehash-list, avltreehash-list-tests, avltree-list, avltree-list-tests, avltree-oset, avltree-oset-tests, backupfile, base64, bcopy, binary-io, binary-io-tests, bison-i18n, byteswap, byteswap-tests, calloc, canon-host, canonicalize, canonicalize-lgpl, canonicalize-lgpl-tests, carray-list, carray-list-tests, c-ctype, c-ctype-tests, chdir-long, chdir-safer, check-version, chown, classpath, clean-temp, clock-time, cloexec, closein, closein-tests, closeout, close-stream, config-h, configmake, copy-file, crc, crc-tests, crypto, csharpcomp, csharpcomp-script, csharpexec, csharpexec-script, c-stack, c-strcase, c-strcaseeq, c-strcasestr, c-strcasestr-tests, c-strcase-tests, c-strstr, c-strstr-tests, c-strtod, c-strtold, cycle-check, des, des-tests, dev-ino, diacrit, d-ino, dirfd, dirname, dirname-tests, double-slash-root, d-type, dummy, dup2, eealloc, elisp-comp, error, euidaccess, exclude, execute, exit, exitfail, extensions, fatal-signal, fbufmode, fbufmode-tests, fchdir, fcntl, fcntl-safer, fcntl-tests, fdl, fflush, fflush-tests, fileblocks, filemode, filename, filenamecat, file-type, findprog, flexmember, float, fnmatch, fnmatch-gnu, fnmatch-posix, fopen-safer, fpending, fpieee, fprintf-posix, fprintf-posix-tests, fprintftime, fpucw, fpurge, fpurge-tests, freadable, freadable-tests, freading, freading-tests, free, frexp, frexpl, frexpl-nolibm, frexpl-nolibm-tests, frexpl-tests, frexp-tests, fseek, fseeko, fseeko-tests, fseek-tests, fseterr, fseterr-tests, fsusage, ftell, ftello, ftello-tests, ftell-tests, ftruncate, fts, fts-lgpl, full-read, full-write, fwritable, fwritable-tests, fwriteerror, fwriting, fwriting-tests, gc, gc-arcfour, gc-arcfour-tests, gc-arctwo, gc-arctwo-tests, gcd, gc-des, gc-des-tests, gc-hmac-md5, gc-hmac-md5-tests, gc-hmac-sha1, gc-hmac-sha1-tests, gc-md2, gc-md2-tests, gc-md4, gc-md4-tests, gc-md5, gc-md5-tests, gc-pbkdf2-sha1, gc-pbkdf2-sha1-tests, gc-random, gc-rijndael, gc-rijndael-tests, gc-sha1, gc-sha1-tests, gc-tests, gendocs, getaddrinfo, getaddrinfo-tests, getcwd, getdate, getdelim, getdomainname, getgroups, gethostname, gethrxtime, getline, getloadavg, getlogin_r, getndelim2, getnline, getopt, getpagesize, getpass, getpass-gnu, getsubopt, gettext, gettext-h, gettime, gettimeofday, gettimeofday-tests, getugroups, getusershell, glob, gnupload, gpl, group-member, hard-locale, hash, hash-pjw, havelib, hmac-md5, hmac-md5-tests, hmac-sha1, hmac-sha1-tests, host-os, human, iconv, iconv_open, iconvme, iconv-tests, idcache, imaxabs, imaxdiv, inet_ntop, inet_pton, inline, intprops, inttostr, inttypes, inttypes-tests, i-ring, isapipe, isdir, isnanf-nolibm, isnanf-nolibm-tests, isnanl, isnanl-nolibm, isnanl-nolibm-tests, isnanl-tests, isnan-nolibm, isnan-nolibm-tests, javacomp, javacomp-script, javaexec, javaexec-script, javaversion, lchmod, lchown, ldd, ldexpl, ldexpl-tests, lgpl, lib-ignore, linebreak, linebuffer, linkedhash-list, linkedhash-list-tests, linked-list, linked-list-tests, link-follow, link-warning, list, localcharset, locale, locale-tests, lock, lock-tests, long-options, lseek, lseek-tests, lstat, maintainer-makefile, malloc, math, mathl, math-tests, mbchar, mbfile, mbiter, mbscasecmp, mbscasecmp-tests, mbscasestr, mbscasestr-tests, mbschr, mbschr-tests, mbscspn, mbscspn-tests, mbslen, mbsncasecmp, mbsncasecmp-tests, mbspbrk, mbspbrk-tests, mbspcasecmp, mbspcasecmp-tests, mbsrchr, mbsrchr-tests, mbssep, mbsspn, mbsspn-tests, mbsstr, mbsstr-tests, mbstok_r, mbswidth, mbuiter, md2, md2-tests, md4, md4-tests, md5, md5-tests, memcasecmp, memchr, memcmp, memcoll, memcpy, memmem, memmove, mempcpy, memrchr, memset, memxor, minmax, mkancesdirs, mkdir, mkdir-p, mkdtemp, mkstemp, mktime, modechange, mountlist, mpsort, nanosleep, netinet_in, netinet_in-tests, no-c++, obstack, openat, openat-die, openmp, oset, pagealign_alloc, pathmax, pathname, perl, physmem, phystemp, pipe, poll, posixtm, posixver, printf-frexp, printf-frexpl, printf-frexpl-tests, printf-frexp-tests, printf-posix, printf-posix-tests, printf-safe, progname, putenv, quote, quotearg, raise, rbtreehash-list, rbtreehash-list-tests, rbtree-list, rbtree-list-tests, rbtree-oset, rbtree-oset-tests, read-file, read-file-tests, readline, readlink, readtokens, readtokens0, readutmp, realloc, regex, regexprops-generic, relocatable, relocatable-lib, relocatable-lib-lgpl, relocatable-prog, relocatable-prog-wrapper, relocatable-script, rename, rename-dest-slash, rijndael, rijndael-tests, rmdir, rmdir-errno, rpmatch, safe-read, safe-write, same, same-inode, save-cwd, savedir, savewd, search, search-tests, setenv, settime, sha1, sh-quote, sig2str, signal, signbit, signbit-tests, sigprocmask, size_max, sleep, sleep-tests, snprintf, snprintf-posix, snprintf-posix-tests, snprintf-tests, socklen, sprintf-posix, sprintf-posix-tests, ssize_t, stat-macros, stat-time, stat-time-tests, stdarg, stdbool, stdbool-tests, stdint, stdint-tests, stdio, stdio-tests, stdlib, stdlib-safer, stdlib-tests, stpcpy, stpncpy, strcase, strcasestr, strcasestr-tests, strchrnul, strcspn, strdup, streq, strerror, strftime, striconv, striconveh, striconveha, striconveha-tests, striconveh-tests, striconv-tests, string, string-tests, strndup, strnlen, strnlen1, strpbrk, strptime, strsep, strtod, strtoimax, strtok_r, strtol, strtoll, strtoul, strtoull, strtoumax, strverscmp, sublist, sys_select, sys_select-tests, sys_socket, sys_socket-tests, sys_stat, sys_stat-tests, sys_time, sys_time-tests, sysexits, sysexits-tests, tempname, time, time_r, timegm, timespec, time-tests, tls, tls-tests, tmpdir, tmpfile, tmpfile-safer, tree | history, tree | history, tree | history, trim, tsearch, tsearch-tests, tzset, ucs4-utf16, ucs4-utf8, unicodeio, uniconv, unistd, unistd-safer, unistd-tests, unistr, unitypes, unlink-busy, unlinkdir, unlocked-io, uptime, userspec, utf16-ucs4, utf16-ucs4-unsafe, utf8-ucs4, utf8-ucs4-unsafe, utime, utimecmp, utimens, vararrays, vasnprintf, vasnprintf-posix, vasnprintf-posix-tests, vasnprintf-tests, vasprintf, vasprintf-posix, vasprintf-posix-tests, vasprintf-tests, verify, verror, version-etc, version-etc-fsf, vfprintf-posix, vfprintf-posix-tests, visibility, vprintf-posix, vprintf-posix-tests, vsnprintf, vsnprintf-posix, vsnprintf-posix-tests, vsnprintf-tests, vsprintf-posix, vsprintf-posix-tests, wait-process, wchar, wchar-tests, wctype, wctype-tests, wcwidth, winsz-ioctl, winsz-termios, write-any-file, xalloc, xalloc-die, xallocsa, xgetcwd, xgetdomainname, xgethostname, xmemcoll, xnanosleep, xreadlink, xreadlink-with-size, xsetenv, xsize, xstriconv, xstrndup, xstrtod, xstrtoimax, xstrtol, xstrtold, xstrtoumax, xvasprintf, xvasprintf-tests, yesno

m4 Auto Configure macros:
AC_C_FLEXIBLE_ARRAY_MEMBER, AC_C_VARARRAYS, AC_CHECK_FUNCS_ONCE([stpcpy]), AC_CHECK_FUNCS_ONCE([strdup]), AC_CONFIG_FILES([csharpcomp.sh:build-aux/csharpcomp.sh.in]), AC_CONFIG_FILES([csharpexec.sh:build-aux/csharpexec.sh.in]), AC_CONFIG_FILES([javacomp.sh:build-aux/javacomp.sh.in]), AC_CONFIG_FILES([javaexec.sh:build-aux/javaexec.sh.in]), AC_CONFIG_FILES([ldd.sh:build-aux/ldd.sh.in]), AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.]), AC_FUNC_ACL, AC_FUNC_CALLOC, AC_FUNC_CANONICALIZE_FILE_NAME, AC_FUNC_MALLOC, AC_FUNC_OBSTACK, AC_FUNC_REALLOC, AC_OPENMP, AC_PROG_MKDIR_P, AC_REPLACE_FUNCS(bcopy), AC_REPLACE_FUNCS(raise), AC_REQUIRE([AC_C_BIGENDIAN]), AC_REQUIRE([gl_RELOCATABLE_NOP]), AC_REQUIRE([gt_CSHARPCOMP]), AC_SUBST([LIBINTL]), AC_SUBST([LTLIBINTL]), AC_SUBST_FILE([relocatable_sh])

gl_AC_FUNC_LINK_FOLLOWS_SYMLINK, gl_ALLOCSA, gl_ARCFOUR, gl_ARCTWO, gl_ARGMATCH, gl_ARGP, gl_ASSERT, gl_BACKUPFILE, gl_BYTESWAP, gl_C_STACK, gl_C_STRTOD, gl_C_STRTOLD, gl_CANON_HOST, gl_CANONICALIZE_LGPL, gl_CANONICALIZE_LGPL_SEPARATE, gl_CHDIR_SAFER, gl_CHECK_TYPE_STRUCT_DIRENT_D_INO, gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE, gl_CHECK_VERSION, gl_CLOCK_TIME, gl_CLOEXEC, gl_CLOSE_STREAM, gl_CLOSEIN, gl_CLOSEOUT, gl_CONFIG_H, gl_COPY_FILE, gl_CRC, gl_CYCLE_CHECK, gl_DES, gl_DIRNAME, gl_DOUBLE_SLASH_ROOT, gl_EEALLOC, gl_ERROR, gl_EXCLUDE, gl_EXECUTE, gl_EXITFAIL, gl_FATAL_SIGNAL, gl_FCNTL_H, gl_FCNTL_SAFER, gl_FILE_NAME_CONCAT, gl_FILE_TYPE, gl_FILEBLOCKS, gl_FILEMODE, gl_FINDPROG, gl_FLOAT_H, gl_FOPEN_SAFER, gl_FPRINTFTIME, gl_FSUSAGE, gl_FUNC_ALLOCA, gl_FUNC_ARGZ, gl_FUNC_ATEXIT, gl_FUNC_BASE64, gl_FUNC_CHDIR_LONG, gl_FUNC_CHOWN, gl_FUNC_DIRFD, gl_FUNC_DUP2, gl_FUNC_EUIDACCESS, gl_FUNC_FBUFMODE, gl_FUNC_FCHDIR, gl_FUNC_FFLUSH, gl_FUNC_FNMATCH_GNU, gl_FUNC_FNMATCH_POSIX, gl_FUNC_FPENDING, gl_FUNC_FPRINTF_POSIX, gl_FUNC_FPURGE, gl_FUNC_FREADABLE, gl_FUNC_FREADING, gl_FUNC_FREE, gl_FUNC_FREXP, gl_FUNC_FREXPL, gl_FUNC_FREXPL_NO_LIBM, gl_FUNC_FSEEK, gl_FUNC_FSEEKO, gl_FUNC_FTELL, gl_FUNC_FTELLO, gl_FUNC_FTRUNCATE, gl_FUNC_FTS, gl_FUNC_FTS_LGPL, gl_FUNC_FWRITABLE, gl_FUNC_FWRITING, gl_FUNC_GEN_TEMPNAME, gl_FUNC_GETCWD, gl_FUNC_GETDELIM, gl_FUNC_GETDOMAINNAME, gl_FUNC_GETGROUPS, gl_FUNC_GETHOSTNAME, gl_FUNC_GETLINE, gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU, gl_FUNC_GETSUBOPT, gl_FUNC_GETTIMEOFDAY, gl_FUNC_GETUSERSHELL, gl_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_GNU_STRFTIME, gl_FUNC_GROUP_MEMBER, gl_FUNC_ICONV_OPEN, gl_FUNC_IMAXABS, gl_FUNC_IMAXDIV, gl_FUNC_ISNAN_NO_LIBM, gl_FUNC_ISNANF_NO_LIBM, gl_FUNC_ISNANL, gl_FUNC_ISNANL_NO_LIBM, gl_FUNC_LCHMOD, gl_FUNC_LCHOWN, gl_FUNC_LDEXPL, gl_FUNC_LONG_DOUBLE_MATH, gl_FUNC_LSEEK, gl_FUNC_LSTAT, gl_FUNC_MBSCASECMP, gl_FUNC_MBSCASESTR, gl_FUNC_MBSCHR, gl_FUNC_MBSCSPN, gl_FUNC_MBSLEN, gl_FUNC_MBSNCASECMP, gl_FUNC_MBSPBRK, gl_FUNC_MBSPCASECMP, gl_FUNC_MBSRCHR, gl_FUNC_MBSSEP, gl_FUNC_MBSSPN, gl_FUNC_MBSSTR, gl_FUNC_MBSTOK_R, gl_FUNC_MEMCHR, gl_FUNC_MEMCMP, gl_FUNC_MEMCPY, gl_FUNC_MEMMEM, gl_FUNC_MEMMOVE, gl_FUNC_MEMPCPY, gl_FUNC_MEMRCHR, gl_FUNC_MEMSET, gl_FUNC_MKDIR_TRAILING_SLASH, gl_FUNC_MKSTEMP, gl_FUNC_MKTIME, gl_FUNC_NANOSLEEP, gl_FUNC_OPENAT, gl_FUNC_POLL, gl_FUNC_PRINTF_FREXP, gl_FUNC_PRINTF_FREXPL, gl_FUNC_PRINTF_POSIX, gl_FUNC_PUTENV, gl_FUNC_READ_FILE, gl_FUNC_READLINE, gl_FUNC_READLINK, gl_FUNC_READLINK_SEPARATE, gl_FUNC_RENAME, gl_FUNC_RENAME_TRAILING_DEST_SLASH, gl_FUNC_RMDIR, gl_FUNC_RMDIR_NOTEMPTY, gl_FUNC_RPMATCH, gl_FUNC_SETENV, gl_FUNC_SETENV_SEPARATE, gl_FUNC_SIG2STR, gl_FUNC_SLEEP, gl_FUNC_SNPRINTF, gl_FUNC_SNPRINTF_POSIX, gl_FUNC_SPRINTF_POSIX, gl_FUNC_STPCPY, gl_FUNC_STPNCPY, gl_FUNC_STRCASESTR, gl_FUNC_STRCHRNUL, gl_FUNC_STRCSPN, gl_FUNC_STRDUP, gl_FUNC_STRERROR, gl_FUNC_STRERROR_SEPARATE, gl_FUNC_STRNDUP, gl_FUNC_STRNLEN, gl_FUNC_STRPBRK, gl_FUNC_STRPTIME, gl_FUNC_STRSEP, gl_FUNC_STRTOD, gl_FUNC_STRTOIMAX, gl_FUNC_STRTOK_R, gl_FUNC_STRTOL, gl_FUNC_STRTOLL, gl_FUNC_STRTOUL, gl_FUNC_STRTOULL, gl_FUNC_STRTOUMAX, gl_FUNC_STRVERSCMP, gl_FUNC_TIMEGM, gl_FUNC_TSEARCH, gl_FUNC_TZSET_CLOBBER, gl_FUNC_UNLINK_BUSY_TEXT, gl_FUNC_UNSETENV, gl_FUNC_UTIME, gl_FUNC_VASNPRINTF, gl_FUNC_VASNPRINTF_POSIX, gl_FUNC_VASPRINTF, gl_FUNC_VASPRINTF_POSIX, gl_FUNC_VFPRINTF_POSIX, gl_FUNC_VPRINTF_POSIX, gl_FUNC_VSNPRINTF, gl_FUNC_VSNPRINTF_POSIX, gl_FUNC_VSPRINTF_POSIX, gl_FUNC_WCWIDTH, gl_GC, gl_GC_ARCFOUR, gl_GC_ARCTWO, gl_GC_DES, gl_GC_HMAC_MD5, gl_GC_HMAC_SHA1, gl_GC_MD2, gl_GC_MD4, gl_GC_MD5, gl_GC_PBKDF2_SHA1, gl_GC_RANDOM, gl_GC_RIJNDAEL, gl_GC_SHA1, gl_GETADDRINFO, gl_GETDATE, gl_GETHRXTIME, gl_GETLOADAVG([$gl_source_base]), gl_GETLOGIN_R, gl_GETNDELIM2, gl_GETNLINE, gl_GETOPT, gl_GETPAGESIZE, gl_GETTIME, gl_GETUGROUPS, gl_GLOB, gl_HARD_LOCALE, gl_HASH, gl_HEADER_ARPA_INET, gl_HEADER_NETINET_IN, gl_HEADER_STRING_H, gl_HEADER_SYS_SELECT, gl_HEADER_SYS_SOCKET, gl_HEADER_SYS_STAT_H, gl_HEADER_SYS_TIME_H, gl_HEADER_TIME_H, gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H, gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, gl_HMAC_MD5, gl_HMAC_SHA1, gl_HOST_OS, gl_HUMAN, gl_I_RING, gl_ICONV_H, gl_IDCACHE, gl_IGNORE_UNUSED_LIBRARIES, gl_INET_NTOP, gl_INET_PTON, gl_INLINE, gl_INTTOSTR, gl_INTTYPES_H, gl_INTTYPES_MODULE_INDICATOR([imaxabs]), gl_INTTYPES_MODULE_INDICATOR([imaxdiv]), gl_INTTYPES_MODULE_INDICATOR([strtoimax]), gl_INTTYPES_MODULE_INDICATOR([strtoumax]), gl_ISAPIPE, gl_ISDIR, gl_LDD, gl_libdeps=”$gl_libdeps $LIBGCRYPT”, gl_libdeps=”$gl_libdeps $LIBICONV”, gl_LINEBREAK, gl_LIST, gl_list.m4, gl_LOCALCHARSET, gl_LOCALE_H, gl_LOCK, gl_LONG_OPTIONS, gl_ltlibdeps=”$gl_ltlibdeps $LTLIBGCRYPT”, gl_ltlibdeps=”$gl_ltlibdeps $LTLIBICONV”, gl_MATH_H, gl_MATH_MODULE_INDICATOR([frexp]), gl_MATH_MODULE_INDICATOR([frexpl]), gl_MATH_MODULE_INDICATOR([ldexpl]), gl_MATH_MODULE_INDICATOR([signbit]), gl_MBCHAR, gl_MBFILE, gl_MBITER, gl_MBSWIDTH, gl_MD2, gl_MD4, gl_MD5, gl_MEMCASECMP, gl_MEMCOLL, gl_MEMXOR, gl_MINMAX, gl_MKANCESDIRS, gl_MKDIR_PARENTS, gl_MODECHANGE, gl_MODULE_INDICATOR([canonicalize]), gl_MODULE_INDICATOR([close-stream]), gl_MODULE_INDICATOR([fcntl-safer]), gl_MODULE_INDICATOR([fopen-safer]), gl_MODULE_INDICATOR([fts]), gl_MODULE_INDICATOR([fwriteerror]), gl_MODULE_INDICATOR([gc-arcfour]), gl_MODULE_INDICATOR([gc-arctwo]), gl_MODULE_INDICATOR([gc-des]), gl_MODULE_INDICATOR([gc-hmac-md5]), gl_MODULE_INDICATOR([gc-hmac-sha1]), gl_MODULE_INDICATOR([gc-md2]), gl_MODULE_INDICATOR([gc-md4]), gl_MODULE_INDICATOR([gc-md5]), gl_MODULE_INDICATOR([gc-random]), gl_MODULE_INDICATOR([gc-rijndael]), gl_MODULE_INDICATOR([gc-sha1]), gl_MODULE_INDICATOR([unistr/u16-mbtouc]), gl_MODULE_INDICATOR([unistr/u16-mbtoucr]), gl_MODULE_INDICATOR([unistr/u16-mbtouc-unsafe]), gl_MODULE_INDICATOR([unistr/u16-uctomb]), gl_MODULE_INDICATOR([unistr/u32-mbtouc]), gl_MODULE_INDICATOR([unistr/u32-mbtoucr]), gl_MODULE_INDICATOR([unistr/u32-mbtouc-unsafe]), gl_MODULE_INDICATOR([unistr/u32-uctomb]), gl_MODULE_INDICATOR([unistr/u8-mbtouc]), gl_MODULE_INDICATOR([unistr/u8-mbtoucr]), gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe]), gl_MODULE_INDICATOR([unistr/u8-uctomb]), gl_MOUNTLIST, gl_MPSORT, gl_PAGEALIGN_ALLOC, gl_PATHMAX, gl_PERL, gl_PHYSMEM, gl_PIPE, gl_POSIXTM, gl_POSIXVER, gl_QUOTE, gl_QUOTEARG, gl_READTOKENS, gl_READUTMP, gl_REGEX, gl_RELOCATABLE([$gl_source_base]), gl_RELOCATABLE_LIBRARY, gl_RELOCATABLE_LIBRARY_SEPARATE, gl_RIJNDAEL, gl_SAFE_READ, gl_SAFE_WRITE, gl_SAME, gl_SAVE_CWD, gl_SAVEDIR, gl_SAVEWD, gl_SEARCH_H, gl_SEARCH_MODULE_INDICATOR([tsearch]), gl_SETTIME, gl_SHA1, gl_SIGNAL_H, gl_SIGNAL_MODULE_INDICATOR([sigprocmask]), gl_SIGNALBLOCKING, gl_SIGNBIT, gl_SIZE_MAX, gl_STAT_BIRTHTIME, gl_STAT_TIME, gl_STDARG_H, gl_STDINT_H, gl_STDIO_H, gl_STDIO_MODULE_INDICATOR([fflush]), gl_STDIO_MODULE_INDICATOR([fprintf-posix]), gl_STDIO_MODULE_INDICATOR([fseek]), gl_STDIO_MODULE_INDICATOR([fseeko]), gl_STDIO_MODULE_INDICATOR([ftell]), gl_STDIO_MODULE_INDICATOR([ftello]), gl_STDIO_MODULE_INDICATOR([printf-posix]), gl_STDIO_MODULE_INDICATOR([snprintf]), gl_STDIO_MODULE_INDICATOR([sprintf-posix]), gl_STDIO_MODULE_INDICATOR([vasprintf]), gl_STDIO_MODULE_INDICATOR([vfprintf-posix]), gl_STDIO_MODULE_INDICATOR([vprintf-posix]), gl_STDIO_MODULE_INDICATOR([vsnprintf]), gl_STDIO_MODULE_INDICATOR([vsprintf-posix]), gl_STDLIB_H, gl_STDLIB_MODULE_INDICATOR([getsubopt]), gl_STDLIB_MODULE_INDICATOR([mkdtemp]), gl_STDLIB_MODULE_INDICATOR([mkstemp]), gl_STDLIB_SAFER, gl_STRCASE, gl_STRING_MODULE_INDICATOR([mbscasecmp]), gl_STRING_MODULE_INDICATOR([mbscasestr]), gl_STRING_MODULE_INDICATOR([mbschr]), gl_STRING_MODULE_INDICATOR([mbscspn]), gl_STRING_MODULE_INDICATOR([mbslen]), gl_STRING_MODULE_INDICATOR([mbsncasecmp]), gl_STRING_MODULE_INDICATOR([mbspbrk]), gl_STRING_MODULE_INDICATOR([mbspcasecmp]), gl_STRING_MODULE_INDICATOR([mbsrchr]), gl_STRING_MODULE_INDICATOR([mbssep]), gl_STRING_MODULE_INDICATOR([mbsspn]), gl_STRING_MODULE_INDICATOR([mbsstr]), gl_STRING_MODULE_INDICATOR([mbstok_r]), gl_STRING_MODULE_INDICATOR([memmem]), gl_STRING_MODULE_INDICATOR([mempcpy]), gl_STRING_MODULE_INDICATOR([memrchr]), gl_STRING_MODULE_INDICATOR([stpcpy]), gl_STRING_MODULE_INDICATOR([stpncpy]), gl_STRING_MODULE_INDICATOR([strcasestr]), gl_STRING_MODULE_INDICATOR([strchrnul]), gl_STRING_MODULE_INDICATOR([strdup]), gl_STRING_MODULE_INDICATOR([strndup]), gl_STRING_MODULE_INDICATOR([strnlen]), gl_STRING_MODULE_INDICATOR([strpbrk]), gl_STRING_MODULE_INDICATOR([strsep]), gl_STRING_MODULE_INDICATOR([strtok_r]), gl_SYS_PROC_UPTIME, gl_SYSEXITS, gl_TIME_R, gl_TIMESPEC, gl_TLS, gl_TMPFILE, gl_TMPFILE_SAFER, gl_TYPE_SOCKLEN_T, gl_UNICODEIO, gl_UNISTD_H, gl_UNISTD_MODULE_INDICATOR([chown]), gl_UNISTD_MODULE_INDICATOR([dup2]), gl_UNISTD_MODULE_INDICATOR([fchdir]), gl_UNISTD_MODULE_INDICATOR([ftruncate]), gl_UNISTD_MODULE_INDICATOR([getcwd]), gl_UNISTD_MODULE_INDICATOR([getlogin_r]), gl_UNISTD_MODULE_INDICATOR([lseek]), gl_UNISTD_MODULE_INDICATOR([readlink]), gl_UNISTD_MODULE_INDICATOR([sleep]), gl_UNISTD_SAFER, gl_UNLINKDIR, gl_USERSPEC, gl_UTIMECMP, gl_UTIMENS, gl_VISIBILITY, gl_WAIT_PROCESS, gl_WCHAR_H, gl_WCTYPE_H, gl_WINSIZE_IN_PTEM, gl_WRITE_ANY_FILE, gl_XALLOC, gl_XGETCWD, gl_XNANOSLEEP, gl_XSIZE, gl_XSTRNDUP, gl_XSTRTOD, gl_XSTRTOL, gl_XSTRTOLD, gl_XVASPRINTF, gl_YESNO

Bookmark this article

Glib is available from GTK by FTP. At the time of writing, the current version is 2.12.12

Download the source code

  • Connect to your server using PuTTY or some other SSH client
  • Connect to GTK’s FTP server by typing the command ftp ftp.gtk.org
  • Login using the username anonymous and password anon@
  • Change to the directory where the source code is stored cd /pub/glib/2.12/
  • Change the mode to binary by entering the command binary
  • Download the file using the command get glib-2.12.12.tar.gz
  • Also download the md5 checksum to verify the veracity of your download get glib-2.12.12.tar.gz.md5
  • Close your FTP session by typing quit
  • Having downloaded the source code, extract the files into a new directory by entering the command gunzip -c glib-2.12.12.tar.gz|tar x

Install dependencies

We need to download and install the libiconv and gettext libraries before we can build GLib. Also, since we do not have root access at Westhost, we need to tell all Linux packages to install to a different directory other than /usr/local. We do this by specifying

./configure --prefix=/usr/mylocal
NOTE: Create the directory /usr/mylocal if it does not already exist

Library Command Download Location
libiconv wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz
libiconv wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz.sig
gettext ftp ftp://mirrors.usc.edu/pub/gnu/gettext/gettext-0.16.tar.gz
gettext ftp ftp://mirrors.usc.edu/pub/gnu/gettext/gettext-0.16.tar.gz.sig

libiconv and gettext depend on each other, so we need to build libiconv then gettext and the rebuild libiconv.

Build libiconv

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.11.tar.gz.sig
gunzip -c libiconv-1.11.tar.gz | tar x
cd libiconv-1.11
./configure --prefix=/usr/mylocal >log.config 2>err.config
Check err.config for errors
make >log.make 2>err.make
This will build with errors, so do not check err.make for errors
make install >log.install 2>err.install
cd ..

Build gettext

ftp mirrors.usc.edu
anonymous
anon@
cd pub/gnu/gettext
mode image
passive
get gettext-0.16.tar.gz
get gettext-0.16.tar.gz.sig
quit
gunzip -c gettext-0.16.tar.gz |tar x
cd gettext-0.16
./configure --prefix=/usr/mylocal >log.config 2>err.config
Check err.config for errors
make>log.make 2>err.make
Check err.make for errors
make install> log.install 2>err.install
Check err.install for errors

Rebuild libiconv

cd ../libiconv-1.11
make distclean
./configure --prefix=/usr/mylocal >log.config 2>err.config
Check err.config for errors
make>log.make 2>err.make
Check err.make for errors
make install> log.install 2>err.install
Check err.install for errors
libtool --dry-run --finish /usr/mylocal/lib
libtool --finish /usr/mylocal/lib
cd ..

Build the GLib library

  • Change into the new directory cd glib-2.12.12
  • Run autoconfigure to determine the build parameters ./configure --with-libiconv --prefix=/usr/mylocal >log.config 2>err.config
  • Check the err.config file for any errors
  • Build the library make >log.make 2>err.make
  • Check err.make for errors
  • Install the library make install >log.install 2>err.install

Errors we encountered

#error GNU libiconv not in use but included iconv.h is from libiconv

Added --with-libiconv to ./configure

warning: passing arg 2 of `g_async_queue_push’ discards qualifiers from pointer target type

This is only a warning and so can be ignored

Bookmark this article