On some system (OS X 10.6 was identified as for the address attached), the nepomuk-core fails to compile with the error: > from [snip]/nepomuk-core/work/nepomuk-core-4.11.1/tools/nepomukctl/main.cpp:39: > /opt/local/include/QtCore/qthread.h:115: error: declaration does not declare anything A preprocessor conditional part of code seem to be at fault in this case, in nepomukctl/main.cpp: > #ifdef __unix__ > #include <unistd.h> > #elif defined _WIN32 > #include <windows.h> > static inline void sleep(unsigned int x) { Sleep(1000 * x); }; > #else > #define sleep(x) > #endif In some OS X systems, testing for __unix__ seems to be unsufficient, so that sleep() is defined at the preprocessor level, conflicting with Qt headers. A patch provided in the attached URL, which tests for __APPLE__ as well as __unix__, makes it possible to compile the package properly. Reproducible: Always Steps to Reproduce: 1. Extract nepomuk-core archive 2. Run cmake with relevant variables 3. Run make Actual Results: The compilation fails with: > from [snip]/nepomuk-core/work/nepomuk-core-4.11.1/tools/nepomukctl/main.cpp:39: > /opt/local/include/QtCore/qthread.h:115: error: declaration does not declare anything Expected Results: The package builds. The error occurs only on some OS X versions. According to my tests, 10.7 and 10.8 seem to build fine.
Created attachment 82392 [details] Patch to fix the bug on OS X To be complete, I also attach the patch which solves the issue on the relevant platforms.
Hi, thanks for the bugreport and providing a patch! Please head to https://git.reviewboard.kde.org/ and post it there for others to review it, or it might get lost here :-(
Nicolas, can you take care of submitting your patch to KDE's reviewboard?
Submitted as review request #112852
Git commit 5288d60943b10c93a663b8484e23fe59197f2950 by Vishesh Handa, on behalf of Nicolas Pavillon. Committed on 04/10/2013 at 10:44. Pushed by vhanda into branch 'KDE/4.11'. Enable compilation of nepomuk-core on mac REVIEW: 112852 M +1 -1 tools/nepomukctl/main.cpp http://commits.kde.org/nepomuk-core/5288d60943b10c93a663b8484e23fe59197f2950