{"action":"closed","issue":{"url":"https://api.github.com/repos/OGRECave/ogre/issues/204","repository_url":"https://api.github.com/repos/OGRECave/ogre","labels_url":"https://api.github.com/repos/OGRECave/ogre/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/OGRECave/ogre/issues/204/comments","events_url":"https://api.github.com/repos/OGRECave/ogre/issues/204/events","html_url":"https://github.com/OGRECave/ogre/issues/204","id":167206863,"number":204,"title":"[OGRE-501] Ogre does not build with gcc-5.2.0","user":{"login":"paroj","id":4941802,"avatar_url":"https://avatars.githubusercontent.com/u/4941802?v=3","gravatar_id":"","url":"https://api.github.com/users/paroj","html_url":"https://github.com/paroj","followers_url":"https://api.github.com/users/paroj/followers","following_url":"https://api.github.com/users/paroj/following{/other_user}","gists_url":"https://api.github.com/users/paroj/gists{/gist_id}","starred_url":"https://api.github.com/users/paroj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paroj/subscriptions","organizations_url":"https://api.github.com/users/paroj/orgs","repos_url":"https://api.github.com/users/paroj/repos","events_url":"https://api.github.com/users/paroj/events{/privacy}","received_events_url":"https://api.github.com/users/paroj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OGRECave/ogre/labels/gcc-5","name":"gcc-5","color":"5c416e"},{"url":"https://api.github.com/repos/OGRECave/ogre/labels/Ogre%20Core","name":"Ogre Core","color":"3b71f1"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-23T22:35:11Z","updated_at":"2016-07-23T22:35:54Z","closed_at":"2016-07-23T22:35:54Z","body":"<b>[reporter=\"Yamakuzure\", created=\"Thu, 3 Sep 2015 06:07:02 +0100\"]</b>\n<p>Compiling the MeshUpgrader fails with the following message:</p>\n\n\n<div class=\"code panel\" style=\"border-width: 1px;\"><div class=\"codeContent panelContent\">\n<pre class=\"code-java\">\ncd /home/portage/dev-games/ogre-1.9.0-r1/work/ogre-1.9.0_build/Tools/MeshUpgrader && /usr/bin/cmake -E cmake_link_script CMakeFiles/OgreMeshUpgrader.dir/link.txt -\n-verbose=1\n/usr/bin/x86_64-pc-linux-gnu-g++   -march=<span class=\"code-keyword\">native</span> -pipe -ggdb -O2 -ftree-vectorize  -msse -Wall -Winit-self -Wno-overloaded-virtual -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-<span class=\"code-object\">long</span>-<span class=\"code-object\">long</span> -Wno-unused-but-set-parameter   -Wl,-O1 -Wl,--as-needed CMakeFiles/OgreMeshUpgrader.dir/src/main.cpp.o  -o ../../bin/OgreMeshUpgrader  -L/usr/lib64/x86_64-linux-gnu -rdynamic ../../lib/libOgreMain.so.1.9.0 /usr/lib64/x86_64-linux-gnu/libSM.so /usr/lib64/x86_64-linux-gnu/libICE.so /usr/lib64/x86_64-linux-gnu/libX11.so /usr/lib64/x86_64-linux-gnu/libXext.so /usr/lib64/x86_64-linux-gnu/libXt.so /usr/lib64/x86_64-linux-gnu/libXaw.so -lpthread -ldl /usr/lib64/x86_64-linux-gnu/libtbb.so /usr/lib64/x86_64-linux-gnu/libfreeimage.so /usr/lib64/x86_64-linux-gnu/libzzip.so -lz -latomic -Wl,-rpath,/home/portage/dev-games/ogre-1.9.0-r1/work/ogre-1.9.0_build/lib:/usr/lib64/x86_64-linux-gnu: \n../../lib/libOgreMain.so.1.9.0: undefined reference to `void Ogre::ProgressiveMeshGenerator::addIndexDataImpl<unsigned <span class=\"code-object\">short</span>>(unsigned <span class=\"code-object\">short</span>*, unsigned <span class=\"code-object\">short</span> <span class=\"code-keyword\">const</span>*, std::vector<Ogre::ProgressiveMeshGenerator::PMVertex*, Ogre::STLAllocator<Ogre::ProgressiveMeshGenerator::PMVertex*, Ogre::CategorisedAllocPolicy<(Ogre::MemoryCategory)0> > >&, unsigned <span class=\"code-object\">short</span>)'\ncollect2: error: ld returned 1 exit status\nTools/MeshUpgrader/CMakeFiles/OgreMeshUpgrader.dir/build.make:96: recipe <span class=\"code-keyword\">for</span> target 'bin/OgreMeshUpgrader' failed\nmake[2]: *** [bin/OgreMeshUpgrader] Error 1\n</pre>\n</div></div>\n\n<p>The reason is, that the <tt>ProgressiveMeshGenerator::addIndexDataImpl()</tt> template is only declared in the header, but defined in the compilation unit.</p>\n\n<p>Normally this would be fine, but the instantiations (one for short int, one for int) are used in the compilation unit for the QueuedProgressiveMeshGenerator, which is no longer legal.</p>\n\n<p>Each instantiation must be done in place, so the definition must be moved to the header.</p>\n\n<p>I have created a patch to build ogre-1.9.0 successfully on gentoo. It simply covers the definition in <tt>OgreMain/src/OgreProgressiveMeshGenerator.cpp</tt> with <tt>#if 0/#endif</tt> and adds the definition to <tt>OgreMain/include/OgreProgressiveMeshGenerator.h</tt> so it becomes visible to <tt>OgreMain/src/OgreQueuedProgressiveMeshGenerator.cpp</tt>.</p>"}}
{"actor":{"display_login":"paroj"}}