[PolyORB-users] Error building polyorb-1.0p on FreeBSD 5.1 and 4.7 using gnat-3.15p

Jerome Hugues hugues@infres.enst.fr
Fri, 28 Nov 2003 09:03:49 +0100


Hello,

T. Kurt Bond (tkb@tkb.mpl.com):

> Has anybody else seen this?
> 
>   /bin/sh ../libtool --mode=compile ../support/adacompiler -c -g -O2 -gnatfy -gnatwae -gnatpn -gnatg -I. -I. polyorb-profiles-ravenscar.ads
>   ../support/adacompiler -c -g -O2 -gnatfy -gnatwae -gnatpn -gnatg -I. -I. polyorb-profiles-ravenscar.ads -o polyorb-profiles-ravenscar.o
>   +===========================GNAT BUG DETECTED==============================+
>   | 3.15p  (20020523) (i386-unknown-freebsd5.1) Assert_Failure expander.adb:83|
>   | Error detected at polyorb-utils-chained_lists.adb:44:4 [polyorb-utils-strings-lists.ads:44:4]|
>   | Please submit bug report by email to report@gnat.com. |
>   | Use a subject line meaningful to you and us to track the bug. |
>   | (include your customer number #nnn in the subject line). |
>   | Include the entire contents of this bug box in the report. |
>   | Include the exact gcc or gnatmake command that you entered. |
>   | Also include sources listed below in gnatchop format |
>   | (concatenated together with no headers between files). |
>   | (use plain ASCII or MIME attachment, or FTP to your customer directory). |
>   | See README.GNATPRO for full info on procedure for submitting bugs. |
>   +==========================================================================+

This problem seems related to the inlining of some functions accross
units, as it is made by GNAT 3.15p.

* A first solution is to compile PolyORB with debug enabled, this will
turn inlining off. Run configure with the following option.

	./configure --enable-debug  

However, this will turn off several optimizations and add overhead for
debug information.

* Another solution is to apply the following modification to configure.in

@@ -246,7 +235,7 @@
   BARGS=-E
   debug=true])
 define(NODEBUG_OPTIONS, [dnl
-  GNATFLAGS="-g -O2 -gnatfy -gnatwae -gnatpn"
+  GNATFLAGS="-g -O2 -gnatfy -gnatwae -gnatp"
   BARGS=
   debug=false])
 
then run support/reconfig from PolyORB's root directory to regenerate
Makefile.in and configure.

This modification only turns off inlining accross units.

Best regards,

Jerome