Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 20:11

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Editor by CMake
PostPosted: 02.08.2012, 19:38 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
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")


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 04.08.2012, 19:38 
Offline

Joined: 19.01.2012, 21:01
Posts: 55
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")


Top
 Profile  
Reply with quote  
 Post subject: Re: Editor by CMake
PostPosted: 12.08.2012, 20:11 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Thanks for sharing the solution. I added it to the SVN repository


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group