On 28/11/2019 14:22, Kornel Benko wrote:
Am Thu, 28 Nov 2019 13:38:26 +0100
schrieb pdv <pdvissch...@edpnet.be>:

Right now the check for the presence of hunspell.hxx in
ConfigureChecks.cmake always fails for me (MacOS10.14, master build)
with the result `HAVE_HUNSPELL_CXXABI = FALSE`, although hunspell.hxx is
available. That's a minor issue since hunspell works anyway, but the
check seems useless now.

Where is it available? Here, on ubuntu, it is under 
/usr/include/hunspell/hunspell.hxx

I use the macports one /opt/local/include/hunspell
but it also works with the 3thparty one included with lyx.


To proceed the check should include a `LINK_LIBRARIES` entry in the
try_compile() step.

No, not needed, see below ...

Also the `hunspell` in the `#include
<hunspell/hunspell.hxx>` instruction in the test file should be removed.
It should be included in the `HUNSPELL_INCLUDE_DIR` definition.

Good point.

With these changes `HAVE_HUNSPELL_CXXABI = TRUE` (supposed hunspell.hxx
is present).

I don't understand the
"-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAND} echo not linking now...'"
entry which contained a typo anyway. It sounds like one wanted to avoid
the linking in which case the LINK_LIBRARIES is indeed not needed.


The try_compile() normally creates an executable (e.g. compile + link)
and we want to compile only here.

I thought so (and I suppose libhunspell is then also not needed by LyX, which I did not realize), but that doesn't work for me; without the LINK_LIBRARIES the build fails:

Undefined symbols for architecture x86_64:
"Hunspell::stem(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      _main in hunspelltest.o
"Hunspell::Hunspell(char const*, char const*, char const*)", referenced from:
      _main in hunspelltest.o
  "Hunspell::~Hunspell()", referenced from:
      _main in hunspelltest.o
ld: symbol(s) not found for architecture x86_64

It has been reported that this trick does not work with XCode:
https://cmake.org/pipermail/cmake/2010-May/037132.html



Patrick

        Kornel




--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to