Closed snomos closed 8 years ago
This sounds something that was already fixed in fa86ef7c5f33505eea8056f826c44d179dbc8490. Please try running ./autogen.sh if you have not done that lately and see if that helps.
I am unable to find a combination of configure options that not either gives me that error:
clang: error: argument unused during compilation: '-pthread'
or the error:
CXXLD libvoikko.la
Undefined symbols for architecture x86_64:
"hfst_ol::Transducer::lookup[abi:cxx11](char*)", referenced from:
What configure options did you use when building first hfst-ospell and then libvoikko for OSX?
The configure options were
PKG_CONFIG_PATH=/Users/harri/inst64/lib/pkgconfig/ ./configure --prefix=/Users/harri/inst64 --enable-zhfst --with-tinyxml2 --without-libxmlpp --disable-hfst-ospell-office PKG_CONFIG_PATH=/Users/harri/inst64/lib/pkgconfig/ ./configure --prefix=/Users/harri/inst64 --with-dictionary-path=/Library/Spelling/voikko:/usr/local/share/voikko:/usr/share/voikko:/usr/local/lib/voikko
But I don't think that either of those errors are related to configuration. The first one is just a bug in configure script (that I thought was fixed already, can't reporoduce it myself on Linux so I have to see if it happens just on OS X). The second looks like that hfst-ospell has not been compiled with C++11 ABI. Not sure if it is a bug in hfst-ospell or just due to use of different compilers. I have seen that on Linux too when hfst-ospell was compiled with GCC and libvoikko with Clang.
Both hfst-ospell and libvoikko were compiled with the
CXXFLAGS="-std=gnu++11 -stdlib=libc++"
configuration, which should ensure compilation with the C++11 ABI, AFAIU. And the Undefined symbol error disappears with this configuration, so that should not be the issue. What is left is the clang error related to -pthread.
There were a couple of additional fixes made to ax_pthread.m4 within the last two months. I updated the macro to the latest version and tested (on OS X) that it fixed the error.
Thanks. I can confirm that now, with your latest ax_pthread.m4 update + me removing all CXX flags etc for both hfst-ospell and libvoikko, libvoikko compiles as it should again. :-)
Since upgrading to OSX 10.11 I have been unable to build libvoikko. I have compiled hfst-ospell with the following configuration:
Adding the CC, CXX and CXXFLAGS options was required to avoid libvoikko erring out on missing x86_64 symbols during linking. Then I configured libvoikko as follows:
I tried different variants for the CXXFLAGS, but irrespective of what I try, I always get the following error when linking voikko-spell:
According to what I have understood from a couple of people I have discussed this issue with, the actual error is just one of configuration: it should not be an error, only a warning. Would it be possible to change the configure.ac file such that clang on OSX will link the object files? Or is there something simple I can do on my end to avoid this error?