Opened 11 years ago

Closed 11 years ago

#40498 closed defect (fixed)

nepomuk-core fails to build

Reported by: mkae (Marko Käning) Owned by: NicosPavlov
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: astrofitz (Michael Fitzgerald), cooljeanius (Eric Gallager)
Port: nepomuk-core

Description

The recept update of KDE to 4.11.1 has trouble with nepomuk for some reason:

:info:build In file included from /opt/local/include/QtCore/QThread:1,
:info:build                  from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_nepomuk-core/nepomuk-core/work/nepomuk-core-4.11.1/tools/nepomukctl/main.cpp:39:
:info:build /opt/local/include/QtCore/qthread.h:115: error: declaration does not declare anything
:info:build make[2]: *** [tools/nepomukctl/CMakeFiles/nepomukctl.dir/main.cpp.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_nepomuk-core/nepomuk-core/work/build'
:info:build make[1]: *** [tools/nepomukctl/CMakeFiles/nepomukctl.dir/all] Error 2
:info:build make[1]: *** Waiting for unfinished jobs....

Attachments (2)

main.log.gz (22.4 KB) - added by mkae (Marko Käning) 11 years ago.
patch-nepomukctl.diff (356 bytes) - added by NicosPavlov 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by mf2k (Frank Schima)

FYI on Mac OS X 10.8.5. Xcode 4.6.3.

$ port installed nepomuk-core
The following ports are currently installed:
  nepomuk-core @4.11.1_0 (active)

You should attach the complete main.log after cleaning the port.

Changed 11 years ago by mkae (Marko Käning)

Attachment: main.log.gz added

comment:2 Changed 11 years ago by mkae (Marko Käning)

I am here on 10.6.8!

comment:3 in reply to:  description Changed 11 years ago by NicosPavlov

Replying to mk@…:

> :info:build                  from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_kde_nepomuk-core/nepomuk-core/work/nepomuk-core-4.11.1/tools/nepomukctl/main.cpp:39:
> :info:build /opt/local/include/QtCore/qthread.h:115: error: declaration does not declare anything

Yes, the issue seems specific to 10.6 (the bots on 10.7 and 10.8 build fine). This also means that I have less capability of testing the issue not having this system, specially for a case where the problem seems to relate to Qt. Typically, the line 115 of qthread.h on my system declares a sleep() function, for which I don't see how it could generate the error above.

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

A Google search for "declaration does not declare anything" suggests the problem is that whatever variable or function is being declared (in this case "sleep") is being #defined to nothing somewhere else. And I see that's the case in nepomuk-core's main.cpp where it says:

#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

I'd call it an upstream bug.

comment:5 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

It seems checking for __unix__ is insufficient. This Stack Overflow post recommends checking for __unix__ or __unix or __APPLE__ or __MACH__.

comment:6 Changed 11 years ago by NicosPavlov

Thanks for pointing that out, it indeed seems as a very likely culprit. Interesting that this issue arises only on SL.

In this case, hopefully the patch attached could solve the issue, but I would prefer if someone could confirm it, instead of me playing trial and error with the buildbots. If that works, I agree that this should also be reported upstream. I also have other things which went wrong when upgrading ports to 4.11.1 that I have to report anyway.

Changed 11 years ago by NicosPavlov

Attachment: patch-nepomukctl.diff added

comment:7 Changed 11 years ago by astrofitz (Michael Fitzgerald)

Cc: astrofitz@… added

Cc Me!

comment:8 Changed 11 years ago by mkae (Marko Käning)

Herewith I verify that this patch works on SL.

Committed in r111240.

This issue could be closed after reporting this upstream.

comment:9 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:10 Changed 11 years ago by NicosPavlov

Resolution: fixed
Status: newclosed

Thanks for the confirmation and the commit. I reported the bug upstream at: https://bugs.kde.org/show_bug.cgi?id=325058

Note: See TracTickets for help on using tickets.