[PolyORB-users] Troubles compiling PolyORB
Tero Koskinen
tero.koskinen at iki.fi
Wed May 7 19:39:07 CEST 2008
Hello,
On Wed, 07 May 2008 16:34:38 +0200 xavier grave wrote:
> Hi,
>
> First idea : polyorb-gpl-2007 should be compiled with gnat-gpl-2007.
In my experiences, it has been somewhat tricky to compile Polyorb with
various GNAT versions. Polyorb-gpl-2007 + gnat-gpl-2007 is probably the
safest pair.
You can compile some versions of Polyorb with GCC 4.[23], but usually
only the corba personality compiles.
Another issue is the GNAT memory usage. For example, when compiling
corba-repository_root-abstractinterfacedef-skel.adb or
corba-repository_root-helper.adb GNAT uses over 1G memory. Some systems
have hard limit of 1G (OpenBSD/x86 for example), so one needs to turn
off optimization for those files.
> That will ease your evaluation in my humble opinion.
> Second thought : what about evaluating polyorb on this linux box you
> mentioned ? This way you will have a more "standard" platform and may be
> a more robust gnat 4.4 or you can even use gnat-gpl/polyorb-gpl couple,
> that should compile and run without too much problem I think.
Yeah, testing gnat-gpl+polyorb-gpl on Linux will make your life much
easier. Personally, I use OpenBSD and have been able to compile Polyorb
on it, so it should be possible on OS X also, but it probably takes
few iterations with different versions of GNAT and Polyorb and a lot
of patience. :)
Here is my patch to turn off optimizations for the files mentioned
above. It is something like 3-6 months old, so I am not 100% does
it work the the current SVN sources. (You need to regen autotools/
configure scripts after applying the patch.)
Index: projects/cos_ir.gpr
===================================================================
--- projects/cos_ir.gpr (revision 124601)
+++ projects/cos_ir.gpr (working copy)
@@ -49,6 +49,10 @@
for Default_Switches ("Ada")
use Common.Compiler'Default_Switches ("Ada");
+ for Switches ("corba-repository_root-abstractinterfacedef-skel.adb")
+ use Common.Compiler'Default_Switches ("Ada") & "-O0";
+ for Switches ("corba-repository_root-helper.adb")
+ use Common.Compiler'Default_Switches ("Ada") & "-O0";
end Compiler;
Index: projects/common.gpr
===================================================================
--- projects/common.gpr (revision 124601)
+++ projects/common.gpr (working copy)
@@ -71,6 +71,7 @@
for Default_Switches ("Ada") use
Base_Ada_Compiler_Switches &
("-gnatp", -- Suppress all checks
+ "-O2", -- Optimization
"-gnatn"); -- Enable inlining
when "DEBUG" =>
Index: configure.ac
===================================================================
--- configure.ac (revision 124601)
+++ configure.ac (working copy)
@@ -142,7 +142,7 @@
AC_PROG_CC
if test "${ADAFLAGS-unset}" = unset; then
- ADAFLAGS="${CFLAGS} ${DEFAULT_ADAFLAGS}"
+ ADAFLAGS="${DEFAULT_ADAFLAGS}"
fi
AC_PROG_INSTALL
--
Tero Koskinen <tero.koskinen at iki.fi>
More information about the PolyORB-users
mailing list