#439 hunspell include under macOS

Undefined
open
nobody
None
Bug_Report
2016-11-24
2016-11-23
No

Hi.

First off - I've no idea how your project works internally, so I wont be the one to fix this issue.
The file 'src/plugins/contrib/SpellChecker/HunspellInterface.cpp' tries to include 'hunspell/hunspell.hxx', wich would be fine if it would add '/usr/local/lib' (in my case) to the include paths, where 'hunspell' is located, instead of '/usr/lib/hunspell'. I resolved the issue by copying hunspell to the directory.
This has to be something platform dependend, as it probably works under linux & windows just fine (I didn't find anyone stating something different), and does something weird und macOS.

I am using macOS Sierra (that's the newest version).

Discussion

  • Dorian Black

    Dorian Black - 2016-11-23

    A little addition: Installing with homebrew or installing manually doesn't make a difference. But I don't think that this is important for resolving the issue.

     
  • Franko F

    Franko F - 2016-11-24

    Hi!
    This issue is with Your installation of hunspell.

    How did You install hunspell?

    Check installed hunspell like this:

    $ pkg-config --exists "hunspell"
    $ echo $?
    0
    $ pkg-config --cflags --libs "hunspell"
    -I/usr/local/Cellar/hunspell/1.4.1_1/include/hunspell -L/usr/local/Cellar/hunspell/1.4.1_1/lib -lhunspell-1.4

    check config.log in codeblocks for hunspell

    pkg_cv_HUNSPELL_CFLAGS=-I/usr/local/Cellar/hunspell/1.4.1_1/include/hunspell
    pkg_cv_HUNSPELL_LIBS='-L/usr/local/Cellar/hunspell/1.4.1_1/lib -lhunspell-1.4'

    regards
    frankofrank

     
  • Dorian Black

    Dorian Black - 2016-11-24

    It does output roughly the same it outputs for you, just in another directory. I installed it using

    $ wget ...
    $ tar -xzf ...
    $ cd hunspell
    $ ./configure
    $ make
    $ sudo make install

    The problem is that it tries to include "hunspell/hunspell.hxx", which would work with just '/usr/local/include' added to the include paths, but that simply isn't the case.

     
  • Franko F

    Franko F - 2016-11-24

    Ok. But check again config.log in codeblocks, autoconf adds include directory and libs for hunspell, if finds installed package.

    In codeblocks check options for configure:
    ./configure --help

    Some influential environment variables:
    ...
    HUNSPELL_CFLAGS
    C compiler flags for HUNSPELL, overriding pkg-config
    HUNSPELL_LIBS
    linker flags for HUNSPELL, overriding pkg-config

    so You can configure codebloks like this:
    HUNSPELL_CFLAGS=-I/usr/local/lib HUNSPELL_LIBS=-lhunspell ./configure

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks