Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
Last active April 16, 2025 01:45

Revisions

  1. lidgnulinux revised this gist Apr 16, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Build-gettex-and-libintl.so-on-musl.md
    Original file line number Diff line number Diff line change
    @@ -41,6 +41,6 @@ $ ls -lh /usr/lib/libintl.so
    ```
    # Notes.
    ## Notes.
    - After build, there is an error when we build at-spi2-core. We need to add libintl linker using LDFLAGS="-lintl".
  2. lidgnulinux revised this gist Apr 16, 2025. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Build-gettex-and-libintl.so-on-musl.md
    Original file line number Diff line number Diff line change
    @@ -39,3 +39,8 @@ After did some trials and errors I found a way to build gettext library + its li
    ```
    $ ls -lh /usr/lib/libintl.so
    ```
    # Notes.
    - After build, there is an error when we build at-spi2-core. We need to add libintl linker using LDFLAGS="-lintl".
  3. lidgnulinux revised this gist Apr 14, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Build-gettex-and-libintl.so-on-musl.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ## Gettext with libintl.so.

    After do some trials and errors I found a way to build gettext library + its libintl.so library on musl. I need the library so cosmic-files will work properly. Before I finally built gettext + libintl.so, everytime I build gettext I only get libgnuintl.so instead of libintl.so. Turns out, the solution is pretty simple. I just need to rename libintl.h header file from musl build and boom, gettext build will produce libintl.so instead of libgnuintl.so.
    After did some trials and errors I found a way to build gettext library + its libintl.so library on musl. I need the library so cosmic-files will work properly. Before I finally built gettext + libintl.so, everytime I build gettext I only get libgnuintl.so instead of libintl.so. Turns out, the solution is pretty simple. I just need to rename libintl.h header file from musl build and boom, gettext build will produce libintl.so instead of libgnuintl.so.

    ## Prepare.

  4. lidgnulinux created this gist Apr 14, 2025.
    41 changes: 41 additions & 0 deletions Build-gettex-and-libintl.so-on-musl.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    # How to build gettext and libintl.so on musl.

    ## Gettext with libintl.so.

    After do some trials and errors I found a way to build gettext library + its libintl.so library on musl. I need the library so cosmic-files will work properly. Before I finally built gettext + libintl.so, everytime I build gettext I only get libgnuintl.so instead of libintl.so. Turns out, the solution is pretty simple. I just need to rename libintl.h header file from musl build and boom, gettext build will produce libintl.so instead of libgnuintl.so.

    ## Prepare.

    - Musl (obviously).
    - gettext, I use 0.24 version.


    ## Steps.

    1. Download, extract the gettext source code and change to gettext directory !

    ```
    $ wget -c https://ftp.gnu.org/gnu/gettext/gettext-0.24.tar.xz
    $ tar -xf gettext-0.24.tar.xz
    $ cd gettext-0.24
    ```
    1. Rename libintl.h header file !
    ```
    $ sudo mv /usr/include/libintl.h /usr/include/libintl.h.back
    ```
    1. Build & install gettext !
    ```
    $ ./configure --prefix=/usr --disable-static --enable-shared
    $ make
    $ sudo make install
    ```
    1. Confirm if libintl.so is present !
    ```
    $ ls -lh /usr/lib/libintl.so
    ```