can't build MyGUI under gcc 4.7.0?

Everything about development and the OpenMW source code.
Post Reply
User avatar
artorius
Posts: 46
Joined: 08 Mar 2012, 13:59
Location: VA, USA

can't build MyGUI under gcc 4.7.0?

Post by artorius »

Hey all, I thought I would ask here in case any of you guys know of a workaround for this.

I have no troubles building MyGUI 3.2.0 on Fedora 16, which uses GCC 4.6.1. However, I'm trying to do some test builds on Fedora 17 (to prepare for packaging for that platform for 0.15.0+), which has GCC 4.7.0, and it fails. Here's the last bit of the output from the compilation:

Code: Select all

CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::LayoutManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::LayoutManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::Gui>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::Gui>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::Gui>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::Gui>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::msInstance'
CMakeFiles/Demo_Gui.dir/ColourWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::SkinManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::SkinManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/EditorWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::WidgetManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::WidgetManager>::msInstance'
CMakeFiles/Demo_Gui.dir/EditorWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::WidgetManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::WidgetManager>::mClassTypeName'
CMakeFiles/Demo_Gui.dir/InformationWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::InputManager>::getInstancePtr()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:61: undefined reference to `MyGUI::Singleton<MyGUI::InputManager>::msInstance'
CMakeFiles/Demo_Gui.dir/InformationWindow.cpp.o: In function `MyGUI::Singleton<MyGUI::InputManager>::getClassTypeName()':
/home/makerpm/rpmbuild/BUILD/mygui-3.2.0/MyGUIEngine/include/MyGUI_Singleton.h:66: undefined reference to `MyGUI::Singleton<MyGUI::InputManager>::mClassTypeName'
../../lib64/libMyGUI.OgrePlatform.so: undefined reference to `MyGUI::Singleton<MyGUI::DataManager>::msInstance'
../../lib64/libMyGUI.OgrePlatform.so: undefined reference to `MyGUI::Singleton<MyGUI::DataManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::LayerManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::RenderManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::PointerManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::RenderManager>::msInstance'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::LayerManager>::mClassTypeName'
../../lib64/libCommon.so: undefined reference to `MyGUI::Singleton<MyGUI::PointerManager>::mClassTypeName'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/Demo_Gui] Error 1
make[2]: Leaving directory `/home/makerpm/rpmbuild/BUILD/mygui-3.2.0'
make[1]: *** [Demos/Demo_Gui/CMakeFiles/Demo_Gui.dir/all] Error 2
make[1]: Leaving directory `/home/makerpm/rpmbuild/BUILD/mygui-3.2.0'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.UA0cEO (%build)
The %build bit you see towards the end is just part of the RPM process, the section where the actual make instruction comes from, so you can ignore that.

What it looks like to me is some incompatibility between the newer GCC and MyGUI. Since it does build on the slightly older version of GCC, does anyone know of a way that I can work around this? Maybe some modification to the make instruction? As in, some flag I could use?
User avatar
scrawl
Posts: 2152
Joined: 18 Feb 2012, 11:51

Re: can't build MyGUI under gcc 4.7.0?

Post by scrawl »

This topic could be related, there's a flag mentioned that should help. http://openmw.org/forum/viewtopic.php?f=6&t=685
User avatar
artorius
Posts: 46
Joined: 08 Mar 2012, 13:59
Location: VA, USA

Re: can't build MyGUI under gcc 4.7.0?

Post by artorius »

scrawl wrote:This topic could be related, there's a flag mentioned that should help. http://openmw.org/forum/viewtopic.php?f=6&t=685
Ah, crap, can't believe that I missed that (it's only about 4 posts down :oops: ).

Thanks, I'll give that a try.

UPDATE: yep, that sed line was the fix. Thanks again.
Post Reply