Am Samstag, 19. Dezember 2015 um 11:09:25, schrieb Georg Baum <b...@lyx.org>
> commit 5537d1a1f03bb969d22e0d42a81317735c41c233
> Author: Georg Baum <b...@lyx.org>
> Date:   Sat Dec 19 11:08:08 2015 +0100
>
>     Add 3rdparty to source package
>

Problem with cmake too. I get

/usr/src/lyx/lyx-git/3rdparty/libiconv/1.14/libcharset/lib/localcharset.c:136: 
undefined reference to `libcharset_relocate'
collect2: error: ld returned 1 exit status

The command line for the compilation shows
        -DENABLE_RELOCATABLE -Drelocate=libcharset_relocate
therefore the preprocessed c-file has (from relocatable.h)
        extern const char * libcharset_relocate (const char *pathname);


Searching for libcharset_relocate in created libiconv.a
        nm libiconv.a | grep libcharset_relocate
==>
        U libcharset_relocate

It is not defined.
        ar tv libiconv.a
==>
        rw-r--r-- 1027/1106 1252056 Dec 20 07:24 2015 iconv.c.o
        rw-r--r-- 1027/1106  27040 Dec 20 07:35 2015 localcharset.c.o

Seems like relocatable.c.o is missing, at least on linux.

OK, extended 3rdparty/libiconv/CMakeLists.txt
Looks good.

Checking created lyx executable for hunspell, iconv, zlib
        ldd bin/lyx2.2 | egrep 'zlib|iconv|hunspell'
==> Exit 1
which is good, so I am not using system libs.

Selecting hunspell-engine for spellchecker. NOT WORKING.
Hm, it turned out, I had to correct the path to hunspell dictionaries. It is 
working now.

Setting SRC_LIBCHARSET in the patch might be guarded by:
        if(UNIX AND NOT MINGW)
        endif()
But since I cannot test windows or Mac I don't commit.

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

diff --git a/3rdparty/libiconv/CMakeLists.txt b/3rdparty/libiconv/CMakeLists.txt
index e1c6e2c..4138990 100644
--- a/3rdparty/libiconv/CMakeLists.txt
+++ b/3rdparty/libiconv/CMakeLists.txt
@@ -42,7 +42,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} ${BINDIR}/include ${SRCDI
 add_definitions(-Dset_relocation_prefix=libcharset_set_relocation_prefix -Drelocate=libcharset_relocate -DHAVE_CONFIG_H -DINSTALLPREFIX=NULL -DNO_XMALLOC -DBUILDING_LIBCHARSET -DINSTALLDIR="" -DLIBDIR="" -DENABLE_RELOCATABLE=1 -DIN_LIBRARY)
 
 # libcharset
-set(SRC_LIBCHARSET ${SRCDIR}/libcharset/lib/localcharset.c)
+set(SRC_LIBCHARSET ${SRCDIR}/libcharset/lib/localcharset.c  ${SRCDIR}/libcharset/lib/relocatable.c)
 
 # libiconv
 set(SRC_LIBICONV ${SRCDIR}/lib/iconv.c)

Reply via email to