+++ date = "2017-02-11T09:30:45+01:00" title = "Documentation"
+++
Compiling uClibc-ng requires Linux kernel header files. uClibc-ng will be compiled to match the interfaces available in the provided version of the Linux kernel headers. Linux kernel versions 2.6.x/3.x/4.x are supported. Its also helpful to have a working version of GNU binutils, and GNU gcc -- using excessively old versions of these packages can cause very strange errors that are difficult to find and fix.
Users must have a valid configuration file to compile uClibc-ng. Do not skip this step. New configuration options are added in each release, and odd configuration options are sometimes removed. To configure uClibc-ng, you can run:
make menuconfig
or
make config
If you have an existing .config file, you can update this file using the
make oldconfig
command, which will only ask you about new configuration options.
Available configuration commands are:
"make config" Text based configuration, no menus or colors.
"make menuconfig" Text based color menus, radiolists & dialogs.
"make oldconfig" Default all questions based on the contents of
your existing ./.config file.
"make defconfig" Use defaults for all options.
"make randconfig" Use random values for all options.
"make allyesconfig" Set all values to "yes" for all options.
"make allnoconfig" Set all values to "no" for all options.
uClibc-ng does not have proper dependancy checking so if you change your uClibc-ng configuration, you must current rebuild the entire library, by first running
make clean
Once you have a valid configuration file, just run
make
to compile uClibc-ng. or if you are cross compiling, you would instead run something like:
make CROSS_COMPILE=arm-linux-
As root, if necessary, run something like:
make PREFIX=<some path> install
This will install the uClibc-ng runtime and development system (i.e. all the header files, libraries, etc) into the directories defined within your .config file.
To compile programs with uClibc-ng you will need a complete toolchain (i.e. binutils, gcc and uClibc-ng) that was built expressly for use with uClibc-ng.
You have following choices at the moment:
For internationalization / localization support in open source software projects under Linux libintl is used. This means that the text output of the application might be translated to different languages. It handles both internationalization (i18n) and localization (l10n). See http://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html
The stub implementation included in uClibc-ng is gettext-tiny. You can use gettext with uClibc-ng systems, but need to enable locale support to have translation support on your system.
You could also use gettext: https://www.gnu.org/software/gettext
Header: libintl.h Functions: *gettext(), bindtextdomain(), textdomain()
For a working internationalization / localization support you need locale support in your C library. The environment variables LC_ALL, LC_xxx, LANGUAGE and LANG are used to set-up the localization of the user environment.
Header: locale.h Functions: setlocale()/localeconv(), newlocale()/freelocale()/uselocale()/duplocale()
Standard programming API to convert between different character encodings. https://en.wikipedia.org/wiki/Iconv
The iconv implementation in uClibc-ng is based on libiconv-tiny. Only conversion from and to UTF-8 are supported.
You could also use libiconv: https://www.gnu.org/software/libiconv/
Header: iconv.h Functions: iconv_open(), iconv(), iconv_close()
See https://en.wikipedia.org/wiki/Internationalized_domain_name
There are two different implementations for IDN under Linux. libidn and libidn2. And it seems libidn is deprecated.
The C library might provide support for IDN in getnameinfo() and getaddrinfo().