https://bugs.kde.org/show_bug.cgi?id=365917

            Bug ID: 365917
           Summary: ki18n fails to link on musl libc due to
                    _nl_msg_cat_cntr
           Product: frameworks-ki18n
           Version: 5.24.0
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: caslav.i...@gmx.net
          Reporter: awil...@adelielinux.org
                CC: kdelibs-b...@kde.org

We're trying to package KDE Plasma 5 for our new distribution Adélie Linux,
based on the musl libc.  The musl libc provides libintl (similar to glibc) but
does not use the same internals, so even though we are using the GNU gettext
(__USE_GNU_GETTEXT = 1), the libintl included with the libc does not define
_nl_msg_cat_cntr (nor does it need it).

There is no preprocessor definition for musl (as it is an attempt to be a
strictly compliant POSIX C library - see
http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F for info)
so it should likely be a CMake test to determine if the symbol is available.

Reproducible: Always

Steps to Reproduce:
1. Use musl libc.
2. Attempt to build ki18n.


Actual Results:  
/usr/src/kde-frameworks/ki18n-5.24.0/work/ki18n-5.24.0/src/kcatalog.cpp:177:
undefined reference to `_nl_msg_cat_cntr'

Expected Results:  
Successful build.

Relevant configure output:

-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Looking for dngettext
-- Looking for dngettext - found
-- libintl is part of libc, no extra library is required.
-- Found LibIntl: /usr/include  
-- Found Gettext: /usr/bin/msgmerge (found version "0.19.7") 


Relevant build log output:

CMakeFiles/KF5I18n.dir/kcatalog.cpp.o: In function
`KCatalogPrivate::setupGettextEnv()':
/usr/src/kde-frameworks/ki18n-5.24.0/work/ki18n-5.24.0/src/kcatalog.cpp:177:
undefined reference to `_nl_msg_cat_cntr'
collect2: error: ld returned 1 exit status
src/CMakeFiles/KF5I18n.dir/build.make:276: recipe for target
'src/libKF5I18n.so.5.24.0' failed

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to