master does not compile

Everything about development and the OpenMW source code.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: master does not compile

Post by Zini »

Then I am out of ideas for now.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: master does not compile

Post by jhooks1 »

I am also having linker errors on windows with Zini's master.
swick
Posts: 96
Joined: 06 Aug 2011, 13:00

Re: master does not compile

Post by swick »

the good news are that my machine is not likely broken , the bad ones are that we have to find a bug in the cmake system...
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: master does not compile

Post by Zini »

Could you try to build OpenMW with cmake running in verbose mode?

Code: Select all

make VERBOSE=1
This should at least print out the linker command that fails.
swick
Posts: 96
Joined: 06 Aug 2011, 13:00

Re: master does not compile

Post by swick »

ah, the verbose switch <3

Code: Select all


[ 66%] Building CXX object extern/mygui_3.0.1/MyGUIEngine/CMakeFiles/MyGUIEngine.dir/src/MyGUI_DataFileStream.cpp.o
cd /home/sebastian/prog/OpenMW/Build/extern/mygui_3.0.1/MyGUIEngine && /usr/bin/c++   -DMYGUI_OGRE_PLATFORM -DMYGUI_STATIC -DMYGUI_USE_FREETYPE -DMYGUI_BUILD -I/home/sebastian/prog/OpenMW/openmw/. -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/OGRE/Ogre -I/usr/local/include/OGRE/OGRE -I/usr/include/OIS -I/home/sebastian/prog/OpenMW/openmw/extern/caelum/include -I/home/sebastian/prog/OpenMW/openmw/extern/mygui_3.0.1/MyGUIEngine/include -I/home/sebastian/prog/OpenMW/openmw/extern/mygui_3.0.1/OgrePlatform/include -I/usr/include/AL -I/home/sebastian/prog/OpenMW/openmw/libs -I/usr/include/freetype2    -o CMakeFiles/MyGUIEngine.dir/src/MyGUI_DataFileStream.cpp.o -c /home/sebastian/prog/OpenMW/openmw/extern/mygui_3.0.1/MyGUIEngine/src/MyGUI_DataFileStream.cpp
../../components/libcomponents.a(configurationmanager.cpp.o): In function `Cfg::ConfigurationManager::readConfiguration(boost::program_options::variables_map&, boost::program_options::options_description&)':
configurationmanager.cpp:(.text+0x4df): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
configurationmanager.cpp:(.text+0x512): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
configurationmanager.cpp:(.text+0x545): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
../../components/libcomponents.a(configurationmanager.cpp.o): In function `Cfg::ConfigurationManager::loadConfig(boost::filesystem3::path const&, boost::program_options::variables_map&, boost::program_options::options_description&)':
configurationmanager.cpp:(.text+0x6af): undefined reference to `boost::program_options::basic_parsed_options<char> boost::program_options::parse_config_file<char>(std::basic_istream<char, std::char_traits<char> >&, boost::program_options::options_description const&, bool)'
configurationmanager.cpp:(.text+0x6cd): undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)'
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [omwlauncher] Fehler 1
make[2]: Verlasse Verzeichnis '/home/sebastian/prog/OpenMW/Build'
make[1]: *** [apps/launcher/CMakeFiles/omwlauncher.dir/all] Fehler 2
make[1]: /usr/bin/cmake -E cmake_progress_report /home/sebastian/prog/OpenMW/Build/CMakeFiles 
*** Warte auf noch nicht beendete Prozesse...
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: master does not compile

Post by Zini »

Strange. I was expecting to see the linker command that results in the error. But it isn't there. You are not build multi-threaded, are you? Because that is very unhelpful for debugging.
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: master does not compile

Post by Zini »

This is a shot in the dark, but try my linkorder branch. Don't merge it into your master and use a separate branch instead, since it is very well possible that it is completely bogus.
swick
Posts: 96
Joined: 06 Aug 2011, 13:00

Re: master does not compile

Post by swick »

EDIT: Yes! It compiles with your linkorder bransh!
Zini wrote:You are not build multi-threaded, are you? Because that is very unhelpful for debugging.
woops...
old command: make -j4 VERBOSE=1
new command: make VERBOSE=1

Code: Select all

[100%] Building CXX object apps/launcher/CMakeFiles/omwlauncher.dir/moc_pluginsview.cxx.o
cd /home/sebastian/prog/OpenMW/Build/apps/launcher && /usr/bin/c++   -DMYGUI_STATIC -DCAELUM_STATIC -DQT_GUI_LIB -DQT_CORE_LIB -I/home/sebastian/prog/OpenMW/openmw/. -I/usr/local/include -I/usr/local/include/OGRE -I/usr/local/include/OGRE/Ogre -I/usr/local/include/OGRE/OGRE -I/usr/include/OIS -I/home/sebastian/prog/OpenMW/openmw/extern/caelum/include -I/home/sebastian/prog/OpenMW/openmw/extern/mygui_3.0.1/MyGUIEngine/include -I/home/sebastian/prog/OpenMW/openmw/extern/mygui_3.0.1/OgrePlatform/include -I/usr/include/AL -I/home/sebastian/prog/OpenMW/openmw/libs -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore    -Wall -o CMakeFiles/omwlauncher.dir/moc_pluginsview.cxx.o -c /home/sebastian/prog/OpenMW/Build/apps/launcher/moc_pluginsview.cxx
Linking CXX executable ../../omwlauncher
cd /home/sebastian/prog/OpenMW/Build/apps/launcher && /usr/bin/cmake -E cmake_link_script CMakeFiles/omwlauncher.dir/link.txt --verbose=1
/usr/bin/c++       CMakeFiles/omwlauncher.dir/datafilespage.cpp.o CMakeFiles/omwlauncher.dir/graphicspage.cpp.o CMakeFiles/omwlauncher.dir/lineedit.cpp.o CMakeFiles/omwlauncher.dir/main.cpp.o CMakeFiles/omwlauncher.dir/maindialog.cpp.o CMakeFiles/omwlauncher.dir/naturalsort.cpp.o CMakeFiles/omwlauncher.dir/playpage.cpp.o CMakeFiles/omwlauncher.dir/pluginsmodel.cpp.o CMakeFiles/omwlauncher.dir/pluginsview.cpp.o CMakeFiles/omwlauncher.dir/qrc_resources.cxx.o CMakeFiles/omwlauncher.dir/moc_combobox.cxx.o CMakeFiles/omwlauncher.dir/moc_datafilespage.cxx.o CMakeFiles/omwlauncher.dir/moc_graphicspage.cxx.o CMakeFiles/omwlauncher.dir/moc_lineedit.cxx.o CMakeFiles/omwlauncher.dir/moc_maindialog.cxx.o CMakeFiles/omwlauncher.dir/moc_playpage.cxx.o CMakeFiles/omwlauncher.dir/moc_pluginsmodel.cxx.o CMakeFiles/omwlauncher.dir/moc_pluginsview.cxx.o  -o ../../omwlauncher -rdynamic -L/usr/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lpthread -lOgreMain -lpthread -lQtGui -lQtCore -lpng ../../components/libcomponents.a -lOgreMain -lQtGui -lQtCore -lpng -Wl,-rpath,/usr/local/lib: 
../../components/libcomponents.a(configurationmanager.cpp.o): In function `Cfg::ConfigurationManager::readConfiguration(boost::program_options::variables_map&, boost::program_options::options_description&)':
configurationmanager.cpp:(.text+0x4df): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
configurationmanager.cpp:(.text+0x512): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
configurationmanager.cpp:(.text+0x545): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'
../../components/libcomponents.a(configurationmanager.cpp.o): In function `Cfg::ConfigurationManager::loadConfig(boost::filesystem3::path const&, boost::program_options::variables_map&, boost::program_options::options_description&)':
configurationmanager.cpp:(.text+0x6af): undefined reference to `boost::program_options::basic_parsed_options<char> boost::program_options::parse_config_file<char>(std::basic_istream<char, std::char_traits<char> >&, boost::program_options::options_description const&, bool)'
configurationmanager.cpp:(.text+0x6cd): undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)'
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [omwlauncher] Fehler 1
make[2]: Verlasse Verzeichnis '/home/sebastian/prog/OpenMW/Build'
make[1]: *** [apps/launcher/CMakeFiles/omwlauncher.dir/all] Fehler 2
make[1]: Verlasse Verzeichnis '/home/sebastian/prog/OpenMW/Build'
make: *** [all] Fehler 2
User avatar
Zini
Posts: 5538
Joined: 06 Aug 2011, 15:16

Re: master does not compile

Post by Zini »

The reason is pretty obvious: The link order of some static libraries was wrong. But I am still mystified why cmake gave you the wrong order at first, while everyone else got the right one.

Anyway, problem solved. I will merge linkorder into master.
jhooks1
Posts: 780
Joined: 06 Aug 2011, 21:34

Re: master does not compile

Post by jhooks1 »

I am getting the following:
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getRuntimeDataPath(void)const " (?getRuntimeDataPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getGlobalDataPath(void)const " (?getGlobalDataPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getLocalDataPath(void)const " (?getLocalDataPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getRuntimeConfigPath(void)const " (?getRuntimeConfigPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getGlobalConfigPath(void)const " (?getGlobalConfigPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>components.lib(configurationmanager.obj) : error LNK2019: unresolved external symbol "public: class boost::filesystem2::basic_path<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct boost::filesystem2::path_traits> __thiscall Files::WindowsPath::getLocalConfigPath(void)const " (?getLocalConfigPath@WindowsPath@Files@@QBE?AV?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@XZ) referenced in function "public: __thiscall Files::Path<struct Files::WindowsPath>::Path<struct Files::WindowsPath>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$Path@UWindowsPath@Files@@@Files@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
2>C:\g\openmw\new3\Release\omwlauncher.exe : fatal error LNK1120: 6 unresolved externals

looks like it can't find boost filesystem2
Post Reply