On Sat, 19 Jan 2013 15:59:32 +0100, Treeve Jelbert wrote:
# grep LIBINTL CMakeCache.txt
LIBINTL_INCLUDE_DIR:PATH=/usr/include
//ADVANCED property for variable: LIBINTL_INCLUDE_DIR
LIBINTL_INCLUDE_DIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LIBINTL_LIBC_HAS_DGETTEXT
LIBINTL_LIBC_HAS_DGETTEXT-ADVANCED:INTERNAL=1
LIBINTL_LIBC_HAS_DGETTEXT:INTERNAL=1


$ ls -l /usr/lib/libintl.*
-rw-r--r-- 1 root root 110934 Jan 18 20:51 /usr/lib/libintl.a
-rw-r--r-- 1 root root    915 Jan 18 20:51 /usr/lib/libintl.la
lrwxrwxrwx 1 root root     16 Jan 18 20:52 /usr/lib/libintl.so ->
libintl.so.8.1.2
lrwxrwxrwx 1 root root     16 Jan 18 20:52 /usr/lib/libintl.so.8 ->
libintl.so.8.1.2
-rw-r--r-- 1 root root  58924 Jan 18 20:51 /usr/lib/libintl.so.8.1.2


I am using glibc-2.17


FAILED: : && /var/lib/sorcery/build/c++  -fPIC -march=native
-mtune=native -m64 -pipe  -funroll-loops -O3  -Wnon-virtual-dtor
-Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W
-Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS
-fno-check-new -fno-common -Woverloaded-virtual
-fno-threadsafe-statics -Werror=return-type -fvisibility=hidden
-fvisibility-inlines-hidden -fvisibility=hidden
-fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG
-Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc
-Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc -s
-shared -Wl,-soname,libki18n.so.5 -o
staging/ki18n/src/libki18n.so.5.0.0
staging/ki18n/src/CMakeFiles/ki18n.dir/klocalizedstring.cpp.o
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o
staging/ki18n/src/CMakeFiles/ki18n.dir/kuitformats.cpp.o
staging/ki18n/src/CMakeFiles/ki18n.dir/kuitsemantics.cpp.o
staging/ki18n/src/CMakeFiles/ki18n.dir/common_helpers.cpp.o
staging/ki18n/src/CMakeFiles/ki18n.dir/ki18n_automoc.cpp.o
/opt/qt5/lib/libQt5Core.so.5.1.0
/opt/qt5/lib/libQt5Concurrent.so.5.1.0 /opt/qt5/lib/libQt5Xml.so.5.1.0
/opt/qt5/lib/libQt5Core.so.5.1.0 -Wl,-rpath,/opt/qt5/lib:::::::::::::
&& :
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalog::KCatalog(QString const&, QString const&)':
kcatalog.cpp:(.text+0x67f): undefined reference to
`libintl_bind_textdomain_codeset'
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalogPrivate::setupGettextEnv()':
kcatalog.cpp:(.text+0xd1a): undefined reference to `libintl_bindtextdomain'
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalog::translate(QByteArray const&) const':
kcatalog.cpp:(.text+0xe68): undefined reference to `libintl_dgettext'
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalog::translate(QByteArray const&, QByteArray const&) const':
kcatalog.cpp:(.text+0xfd8): undefined reference to `libintl_dcgettext'
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalog::translate(QByteArray const&, QByteArray const&, unsigned
long long) const':
kcatalog.cpp:(.text+0x10de): undefined reference to `libintl_dngettext'
staging/ki18n/src/CMakeFiles/ki18n.dir/kcatalog.cpp.o: In function
`KCatalog::translate(QByteArray const&, QByteArray const&, QByteArray
const&, unsigned long long) const':
kcatalog.cpp:(.text+0x1272): undefined reference to `libintl_dcngettext'
collect2: error: ld returned 1 exit status



The following small patch solved it for me


forgot the patch!


commit 1f4d953f7e54fae7f74885d11f25ce3661789dce
Author: Treeve Jelbert <tre...@sourcemage.org>
Date:   Sun Jan 20 09:36:33 2013 +0100

    fix libintl detection and usage

diff --git a/cmake/modules/FindLibintl.cmake b/cmake/modules/FindLibintl.cmake
index 52ae647..f74ae70 100644
--- a/cmake/modules/FindLibintl.cmake
+++ b/cmake/modules/FindLibintl.cmake
@@ -29,8 +29,8 @@ if(LIBINTL_INCLUDE_DIR)
   check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT)

   if (LIBINTL_LIBC_HAS_DGETTEXT)
-    set(LIBINTL_LIBRARIES)
-    set(LIBINTL_LIB_FOUND TRUE)
+    set(LIBINTL_LIBRARIES "intl")
+    set(LIBINTL_LIB_FOUND)
   else (LIBINTL_LIBC_HAS_DGETTEXT)
     find_library(LIBINTL_LIBRARIES NAMES intl libintl )
     if(LIBINTL_LIBRARIES)
diff --git a/staging/ki18n/src/CMakeLists.txt b/staging/ki18n/src/CMakeLists.txt
index 9278ee5..c01a780 100644
--- a/staging/ki18n/src/CMakeLists.txt
+++ b/staging/ki18n/src/CMakeLists.txt
@@ -9,7 +9,7 @@ set(libki18n_SRCS
 add_library(ki18n ${libki18n_SRCS})
 generate_export_header(ki18n)

-target_link_libraries(ki18n LINK_PUBLIC  ${QT_QTCORE_LIBRARY}
+target_link_libraries(ki18n LINK_PUBLIC ${QT_QTCORE_LIBRARY} ${LIBINTL_LIBRARIES}
                             LINK_PRIVATE ${QT_QTXML_LIBRARY})

set_target_properties(ki18n PROPERTIES VERSION ${KI18N_VERSION_STRING}



Regards, Treeve



_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to