Hi all,
[This is a followup to a rather old mail, probably beating a dead horse
anyway (as apparently noone besides me wants to use Intel 7.1 on Linux
with recent snapshots) so feel free to ignore. :-)]
On Mon, 23 May 2005, Gerrit Voss wrote:
On Mon, 2005-05-23 at 11:38 +0200, Akos Balazs wrote:
Hi Gerrit,
On Mon, 23 May 2005, Gerrit Voss wrote:
hmm, it was set compiler dependent from the makefiles. The last compiler
with troubles I know of were IIRC intel 7.0x compilers on linux. I'm not
quite sure if they are still in use anywhere. Anyway is it so hard to
keep for now ?.
If icc 7.x is the only thing keeping you from removing it, you may as well
go ahead: last time I tried to compile a recent dailybuild with icc 7.1
(Intel(R) C++ Compiler for 32-bit applications, Version 7.1 Build
20040901Z) it didn't work for me at all. :-\ It might be because of my
ancient RH8 box, but AFAIR I tried it on FC2 and that didn't work either.
If you're interested, I can try again on both distros.
hmm does not sound to good. The last linux intel I tried was 8.1 on IA64
and this looked reasonable ok (at least everything seems to be running)
;-).
I haven't had to much time lately but hope to spend some of the upcoming
on OpenSG again, probably I give it a try but maybe after going over the
different new gcc compiler (like 4.0.0)
I've tried compiling again on FC2 with the daily snapshot tarball from
yesterday (opensg_dailybuild.050621.source.tgz) and the last release of
the Intel compiler 7.1:
[EMAIL PROTECTED] OpenSG]$ icc -V
Intel(R) C++ Compiler for 32-bit applications, Version 7.1 Build 20040901Z
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
(which interestingly I wasn't able to actually download from Intel
anymore.)
...and it didn't work ofcourse. After a lot of fiddling around with dummy
testprograms, compiler options and what have you, I came to the following:
1) You have to change OSGConfig.h and add a line that defines
OSG_STDEXCEPTION_NAMESPACE as std.
2) You have to change common.i686-pc-linux-gnu-icc.in and omit the
'-ansi' switch to the compiler.
Here are the diffs:
-----------------------------------------------------------------------
[EMAIL PROTECTED] OpenSG]$ diff -u Source/Base/Base/OSGConfig.h.orig
Source/Base/Base/OSGConfig.h
--- Source/Base/Base/OSGConfig.h.orig 2005-06-22 17:24:57.804172841 +0200
+++ Source/Base/Base/OSGConfig.h 2005-06-22 17:25:20.852012127 +0200
@@ -408,6 +408,7 @@
// icc >=8.1 uses gnu headers anyway, use gnu defines set above
#if __INTEL_COMPILER_VERSION < 810
# define OSG_STDEXTENSION_NAMESPACE std
+# define OSG_STDEXCEPTION_NAMESPACE std
#endif
# define OSG_STL_HAS_HASH_MAP
[EMAIL PROTECTED] OpenSG]$ diff -u CommonConf/common.i686-pc-linux-gnu-icc.in.orig CommonConf/common.i686-pc-linux-gnu-icc.in
--- CommonConf/common.i686-pc-linux-gnu-icc.in.orig 2005-06-22 20:24:23.351674465 +0200
+++ CommonConf/common.i686-pc-linux-gnu-icc.in 2005-06-22 20:24:23.351674465
+0200
@@ -110,7 +110,7 @@
ifeq ($(COMPILERMAJORVERSION),8)
COMPILER = -fpic -Kc++eh -Krtti -ansi
else
-COMPILER = -Tnoauto -KPIC -Kc++eh -Krtti -ansi
+COMPILER = -Tnoauto -KPIC -Kc++eh -Krtti #-ansi
endif
### Optimize / Debug ###############################################
[EMAIL PROTECTED] OpenSG]$
-----------------------------------------------------------------------
I'm fairly happy with the first change, it seems it was just forgotten
when the OSG_STDEXCEPTION_NAMESPACE define was introduced (BTW, is it ever
defined to be something other than std?).
I'm not so happy with the second change, as requiring ANSI strictness is
IMHO a good thing, but it seems to be necessary to be able to compile
self-referencing classes inside classes like:
class Master
{
public:
private:
class B;
class A
{
B *bp;
};
class B
{
A *ap;
B *bp1;
B *bp2;
};
class C
{
B *bp1;
B *bp2;
};
class D
{
B *bp;
};
};
This is actually a simplified example from
Source/System/NodeCores/Drawables/Geometry/OSGHalfEdgeGraph.h, but there
are other such examples, like OSGBalancedMultiWindow.h or
OSGDepthFirstStateAction.h. I'm by no means a C++ expert, so I can't tell
if this construct is legal according to the standard, if icc 8.x really
allows it then my guess would be that it is. :)
Using the '-ansi' switch also had problems with
.../Geometry/OSGExtrusionGeometry.cpp, with the overloaded function
subdivide() but I couldn't figure that one out. However, removing the
switch seems to solve the problem.
Yours,
Akos
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users