Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 14:11

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: 13.06.2008, 14:57 
Offline

Joined: 23.04.2008, 14:42
Posts: 6
Hi,

Suppose this is my first post on these forums, but I have been following the development of this engine for a while. As you may read from the title, I'm running Archlinux with GCC 4.3.0.

However I am experiencing some trouble building the engine.

1: I have to edit the sources to include the stuff that has been removed in the header dependency cleanup of GCC 4.3.0 ( see: http://gcc.gnu.org/gcc-4.3/porting_to.html ). I see that there is also a patch for it in this thread: http://www.horde3d.org/forums/viewtopic.php?f=3&t=363. This is not a big problem, but I wish the patch would be included in trunk.

2: I do not know what the following error is, but I get this if I do not add -msse3 to the definitions in trunk/Horde3D/Source/Horde3DEngine/CMakeLists.txt:
Code:
[gunnar@archlinux trunk]$ make
Scanning dependencies of target Horde3D
[  1%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimatables.o
[  3%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egAnimation.o
[  4%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egCamera.o
[  6%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egCom.o
[  8%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egGeometry.o
[  9%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egLight.o
[ 11%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egMain.o
[ 13%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egMaterial.o
[ 14%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egModel.o
[ 16%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egModules.o
[ 18%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egParticle.o
[ 19%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egPipeline.o
[ 21%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egRendererBase.o
[ 22%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egRenderer.o
[ 24%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egResource.o
[ 26%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egScene.o
[ 27%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egSceneGraphRes.o
[ 29%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egShader.o
[ 31%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/egTextures.o
[ 32%] Building CXX object Horde3D/Source/Horde3DEngine/CMakeFiles/Horde3D.dir/utImage.o
In file included from /home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp:97:
/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include/emmintrin.h:34:3: error: #error "SSE2 instruction set not enabled"
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp: In function ‘unsigned char* stbi_load_from_memory(const stbi_uc*, int, int*, int*, int*, int)’:
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp:241: warning: deprecated conversion from string constant to ‘char*’
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp: In function ‘float* stbi_loadf_from_memory(const stbi_uc*, int, int*, int*, int*, int)’:
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp:281: warning: deprecated conversion from string constant to ‘char*’
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp: In function ‘unsigned char* convert_format(unsigned char*, int, int)’:
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp:478: warning: deprecated conversion from string constant to ‘char*’
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp: In function ‘float* ldr_to_hdr(stbi_uc*, int, int, int)’:
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp:518: warning: deprecated conversion from string constant to ‘char*’
/home/gunnar/code/horde3d_svn/trunk/Horde3D/Source/Horde3DEngine/utImage.cpp: In function ‘stbi_uc* hdr_to_ldr(float*, int, int, int)’:


I do not know anything about SSE, is it a problem with utImage.cpp, or GCC 4.3.0? Why do I have to supply the -msse3 to get it to compile (have not tried other options tho..)?

EDIT: OT, but I really like what you are doing with this engine. Superclean and nice code, I am quickly able to read through the code and get an overview of whats going on. More projects should be coded like this. Kudos to everyone involved, you have done a smashing job!


Top
 Profile  
Reply with quote  
PostPosted: 16.06.2008, 08:15 
Offline

Joined: 08.06.2008, 06:52
Posts: 6
I'm an archlinux user. I've not tried compiling with sse3... but it works fine for me anyway.

However, looking at the error suggests its nothing to do with Horde3d.

I can only guess that by default the compiler on your system does not include SSE2 instructions by default.
Go and check your /etc/makepkg.conf and add -msse2 there.

On the other hand maybe horde3d requires sse2 and should force it?


Top
 Profile  
Reply with quote  
PostPosted: 16.06.2008, 08:22 
Offline

Joined: 08.06.2008, 06:52
Posts: 6
gunnar is indeed correct, Horde3d's build system relies on the compiler having sse2 instruction set enabled.
Hence, horde3d should pass -msse2 by default - as many systems may not have this enabled on the compiler by default. SSE2 was only available from Pentium-4 Class CPUs and above, while many distributions are i386, i586 or i686 - and hence may not include it by default.


Top
 Profile  
Reply with quote  
PostPosted: 16.06.2008, 09:32 
Offline

Joined: 23.04.2008, 14:42
Posts: 6
Aha, thank you for clarifying this. I have not edited the build flags on my system, that may have been the reason for why it failed. This also explains why horde3d wouldn't run on my "legacy" test system, 950mhz Athlon T-Bird + GF 6600GT => "Illegal Instruction". :)


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 16:23 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
I tried this on a non-arch linux and got the same. It didn't happen to me before, but the definition in CMakeLists.txt or something entioned earlier should be in the trunk IMO as well, as it fixed this.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 18:13 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
I currently don't have any GCC platform available. Can anyone tell me what has to be changed in the CMakeLists.txt files?


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 20:02 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
This part fixed it:

"-msse3 to the definitions in trunk/Horde3D/Source/Horde3DEngine/CMakeLists.txt"

line 58: "add_definitions(-DCMAKE)" to say "add_definitions(-DCMAKE -msse3)"

Although a previous poster said -msse2 should be the default... I'm not at the machine anymore where I was able to produce this behavior.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 20:16 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
This is to generic, the flag is not defined for the Visual Studio compiler. So we first have to check which compilers define the flag and create a specific CMAKE statement.


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 20:29 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
Volker wrote:
This is to generic, the flag is not defined for the Visual Studio compiler. So we first have to check which compilers define the flag and create a specific CMAKE statement.
Ja, this isn't needed on GCC 4.2 on Mac either.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
PostPosted: 14.07.2008, 21:21 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
I think it's related to g++-4.3, because where I normally use this I have 4.2.x and it works, and at the other place I had 4.3 and it didn't. Ok, I don't know where to put this flag but maybe I'll be able to find out some day if you don't.


Top
 Profile  
Reply with quote  
PostPosted: 15.07.2008, 20:28 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
@cantele: Could you please try if the sse2 (not sse3) flag does also work?


Top
 Profile  
Reply with quote  
PostPosted: 16.07.2008, 13:57 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
@marciano Yes, msse2 also works.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group