Horde3D http://www.horde3d.org/forums/ |
|
Editor by CMake http://www.horde3d.org/forums/viewtopic.php?f=6&t=1635 |
Page 2 of 2 |
Author: | tshannon [ 02.08.2012, 19:38 ] |
Post subject: | Re: Editor by CMake |
shd wrote: as for -fPIC: Linking CXX shared library libQTerrainNodeExtension.so /usr/bin/ld: ../HordeSceneEditorCore/libHordeSceneEditorCore.a(MaterialComboBox.cpp.o): relocation R_X86_64_32S against `vtable for MaterialComboBox' can not be used when making a shared object; recompile with -fPIC Tools/Horde3DEditor/src/HordeSceneEditor/GLWidget.cpp: GL/GLU.h should be GL/glu.h Tools/Horde3DEditor/src/HordeSceneEditor/CMakeLists.txt: should contain "${CMAKE_CURRENT_SOURCE_DIR}" I don't really know why sources have to be copied to Build (which would be nice to be 'build' since it's more convenient to type and standard name), but ui_HordeSceneEditor.h uses LuaController.h which isn't copied there. As for 'proper' configuration, you should think about it yourself, but after applying three changes above, editor configured and compiled completely on my x86_64 Arch Linux. I'm running into this error now like you: Code: Linking CXX shared library libHorde3D.so /usr/bin/ld: ../../../Extensions/Sound/Source/libHorde3DSound.a(sound_extension.cpp.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC ../../../Extensions/Sound/Source/libHorde3DSound.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[2]: *** [Horde3D/Horde3D/Source/Horde3DEngine/libHorde3D.so] Error 1 make[1]: *** [Horde3D/Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/all] Error 2 The only what I can get the whole editor to build is by commenting out all of the sound and terrain extensions and plugins in the CMakeList files. The problem is now I want to mess around with some of the plugins, so what exactly did you change to set -fPIC? I tried add a line like this to the CMakeList files in the appropriate directory, but it didn't work: Code: set(CMAKE_CXX_FLAGS "-fPIC")
|
Author: | tshannon [ 04.08.2012, 19:38 ] |
Post subject: | Re: Editor by CMake |
Figured it out. Volker, if you want to update the CMakeLists.txt, here's what I changed to get it to build the plugins properly on linux. In this file: http://mm-werkstatt.informatik.uni-augsburg.de/public/Horde3D/trunk/Tools/Horde3DEditor/src/QPropertyEditor/CMakeLists.txt I added a similar check to what you had in other plugin's cmake files: Code: if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") endif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64") endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
Author: | Volker [ 12.08.2012, 20:11 ] |
Post subject: | Re: Editor by CMake |
Thanks for sharing the solution. I added it to the SVN repository |
Page 2 of 2 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |