[KDE/Mac] Frameworks build error on Mavericks

Allen Winter winter at kde.org
Fri Apr 18 14:36:46 UTC 2014


On Friday, April 18, 2014 12:07:49 PM Harald Fernengel wrote:
> 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'
> 
Yep, that worked. thanks

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

PS. I am subscribed to the kde-mac mailing list now



More information about the kde-mac mailing list