Horde3D http://horde3d.org/forums/ |
|
Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread http://horde3d.org/forums/viewtopic.php?f=3&t=375 |
Page 1 of 1 |
Author: | gunnar [ 13.06.2008, 14:57 ] |
Post subject: | Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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! |
Author: | Raedwulf [ 16.06.2008, 08:15 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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? |
Author: | Raedwulf [ 16.06.2008, 08:22 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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. |
Author: | gunnar [ 16.06.2008, 09:32 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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". |
Author: | cantele [ 14.07.2008, 16:23 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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. |
Author: | Volker [ 14.07.2008, 18:13 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
I currently don't have any GCC platform available. Can anyone tell me what has to be changed in the CMakeLists.txt files? |
Author: | cantele [ 14.07.2008, 20:02 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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. |
Author: | Volker [ 14.07.2008, 20:16 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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. |
Author: | swiftcoder [ 14.07.2008, 20:29 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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.
|
Author: | cantele [ 14.07.2008, 21:21 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
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. |
Author: | marciano [ 15.07.2008, 20:28 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
@cantele: Could you please try if the sse2 (not sse3) flag does also work? |
Author: | cantele [ 16.07.2008, 13:57 ] |
Post subject: | Re: Another GNU/Linux (ArchLinux) + GCC 4.3.0 thread |
@marciano Yes, msse2 also works. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |