Everything seems fine. Maybe you have somewhere another scriptmanager.h which is included accidentally?
Ah, um, well...
You might be on to something.
There is another scriptmanager.h on the system, installed by the tdelibs package. :)
/opt/trinity/include/scriptmanager.h
GIT sources: tdelibs/interfaces/kscript/scriptmanager.h
So how do I edit CMakeLists.txt, or amarokdcophandler.cpp or amarokdcophandler.h to use the local scriptmanager.h and not the one installed in /opt/trinity/include?
This seems to be the problem. I temporarily renamed /opt/trinity/include/scriptmanager.h. Thereafter amarok built without failure. The package size and contents look sane.
I don't know what cmake or gcc tricks are needed. I suppose one option is in amarok to rename scriptmanager.h and scriptmanager.cpp, or rename the same in tdelibs (and all Trinity *.h/*.cpp files calling that header file).
Grepping the entire Trinity source tree reveals the following calls to "scriptmanager.h":
./applications/koffice/kexi/formeditor/scripting/formscript.cpp:21:#include "scriptmanager.h" ./applications/koffice/kexi/formeditor/scripting/scriptmanager.cpp:20:#include "scriptmanager.h"
./applications/amarok/amarok/src/playlist.cpp:40:#include "scriptmanager.h" ./applications/amarok/amarok/src/scriptmanager.cpp:31:#include "scriptmanager.h" ./applications/amarok/amarok/src/collectiondb.cpp:36:#include "scriptmanager.h" ./applications/amarok/amarok/src/playlistwindow.cpp:38:#include "scriptmanager.h" ./applications/amarok/amarok/src/contextbrowser.cpp:34:#include "scriptmanager.h" ./applications/amarok/amarok/src/amarokcore/amarokdcophandler.cpp:42:#include "scriptmanager.h" ./applications/amarok/amarok/src/mediabrowser.cpp:37:#include "scriptmanager.h" ./applications/amarok/amarok/src/app.cpp:45:#include "scriptmanager.h" ./applications/amarok/amarok/src/deviceconfiguredialog.cpp:21:#include "scriptmanager.h"
./applications/konversation/konversation/src/konversationmainwindow.cpp:53:#include <scriptmanager.h>
./tdelibs/interfaces/kscript/scriptmanager.cpp:1:#include "scriptmanager.h"
I thought using quotation marks indicates a local header file and using brackets meant using a system header file.
I don't know why commit 477d071b causes this name clash or why reversing the commit avoids the name clash. I suspect we'll have more of these types of bugs in the future as more packages are converted to cmake. Thus, I hope we find a universal solution.
Any ideas how to fix?
Darrell