[KDE/Mac] Frameworks build error on Mavericks

Harald Fernengel harryf at gmx.com
Fri Apr 18 10:13:06 UTC 2014


Hi,

On 18/04/14 03:43, Ian Wadham wrote:
>
> One problem I encountered building karchive is the following:
> [  5%] Building CXX object src/CMakeFiles/KF5Archive.dir/karchive.cpp.o
> /data/kde/src/5/frameworks/karchive/src/karchive.cpp:231:19: error: use of undeclared identifier 'readlink'
>        int len = readlink(encodedFileName.data(), s.data(), s.size() - 1);
>                  ^
> 1 error generated.
>
> seems that unistd.h isn't getting into  __DARWIN_C_LEVEL >= 200112L
> conditional compile that declares readlink().
>
> do you know what I'm doing wrong? or maybe there's a compile flag missing?
> I tried adding -ansi but that didn't help.

run CMake with

    -DCMAKE_CXX_FLAGS='-D_DARWIN_C_SOURCE'

to fix it. Check out my homebrew recipes at
https://github.com/haraldF/homebrew-kf5 for various other build tweaks.

Hope it helps,
Harald



More information about the kde-mac mailing list