[KDE/Mac] Frameworks build error on Mavericks

Ian Wadham iandw.au at gmail.com
Sat Apr 19 03:07:17 UTC 2014


Hi Allen, Harald and Nicos,

On 19/04/2014, at 12:36 AM, Allen Winter wrote:
> On Friday, April 18, 2014 12:07:49 PM Harald Fernengel wrote:
>> 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

This is wonderful to see:  KDE, MacPorts and Homebrew guys helping
each other.  Long may it continue!!!

All the best, Ian W.




More information about the kde-mac mailing list