Bug 115216

Summary: ADA devel/florist exit_process program doesn't compile due to internal error
Product: Ports & Packages Reporter: Douglas Wells <sysmaint>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: sysmaint
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Douglas Wells 2007-08-05 15:10:00 UTC
	A simple Ada program using devel/florist to access POSIX
	process primitives encounters the error:

		px_true.adb:2:06: file "posix-implementation-ok_signals.ads" not found
		px_true.adb:2:06: "px_true (body)" depends on "posix.process_primitives (spec)"
		px_true.adb:2:06: "posix.process_primitives (spec)" depends on "posix.signals (spec)"
		px_true.adb:2:06: "posix.signals (spec)" depends on "posix.implementation.ok_signals (spec)"
		gnatmake: "px_true.adb" compilation error

	Note that posix-implementation-ok_signals.ads is internal
	to florist.

Fix: 

The problem arises because the configuration process has somehow
	become confused about the use of threads.  If, after running
	"make configure", the Makefile is altered so that the line (~26):
		SIGNALS_GENERATED =
	is changed to:
		SIGNALS_GENERATED = posix-implementation-ok_signals.ads
	the resulting system properly creates and installs the
	file posix-implementation-ok_signals.ads, but this results in
	a system with errors due to duplicate signal values.  This problem,
	in turn, seems to arise because several BSD signals are only
	defined in XSI mode or if a later version of POSIX is assumed.

	If pconfig.h is then changed to include:
		#define #define __XSI_VISIBLE   1
	near the top, the resulting system properly compiles and
	executes this program and several others with the command:
		gnatmake -I/usr/local/lib/florist -gnato px_true.adb \
		  -L/usr/local/lib -largs -lflorist && ./px_true 

	Note that there is clearly an underlying problem in the
	configuration mechanism that this workaround does not
	address.

	Also note that if the compilation is changed to include the
	"-gnato" flag, execution of the program results in the error:
		raised CONSTRAINT_ERROR : posix-signals.adb:1167 overflow check failed
	which is also some form of internal error for which I have
	not determined a workaround.
How-To-Repeat: 	Use the command:
		gnatmake -I/usr/local/lib/florist px_true.adb
	with this test program:
	------------------------- px_true.adb ------------------------
	with POSIX.Process_Primitives;
	procedure px_true is
		package PPP renames POSIX.Process_Primitives;
	begin
		PPP.Exit_Process (0);
	end px_true;
	----------------------- end px_true.adb ----------------------
Comment 1 Alejandro Pulver freebsd_committer freebsd_triage 2007-09-30 21:24:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->alepulver

I'll take it.
Comment 2 Alejandro Pulver freebsd_committer freebsd_triage 2007-09-30 23:49:51 UTC
State Changed
From-To: open->suspended

The
Comment 3 Alejandro Pulver freebsd_committer freebsd_triage 2007-09-30 23:58:25 UTC
State Changed
From-To: suspended->open

Ops, wrong message (quotes removed by 'ssh').
Comment 4 Alejandro Pulver freebsd_committer freebsd_triage 2007-09-30 23:58:41 UTC
State Changed
From-To: open->suspended

The lang/gnat distfiles have been replaced by new ones, wait for a port 
update.
Comment 5 Alejandro Pulver freebsd_committer freebsd_triage 2007-10-21 18:58:40 UTC
Responsible Changed
From-To: alepulver->freebsd-ports-bugs

Leave PR (no time; if the required port is updated or there is a mirror 
somewhere, let me know and I will handle it).
Comment 6 Felippe de Meirelles Motta freebsd_committer freebsd_triage 2008-06-06 06:39:10 UTC
Hi Submitter,

After last updates on this port, can you confirm us if that problem was
solved?

Thanks for your contribution to the FreeBSD Project! :)

-- 
lippe@FreeBSD.org
Felippe de Meirelles Motta
Comment 7 Douglas Wells 2008-06-13 15:42:48 UTC
> Hi Submitter,
> 
> After last updates on this port, can you confirm us if that problem was
> solved?
> 
> Thanks for your contribution to the FreeBSD Project! :)
> 
> -- 
> lippe@FreeBSD.org
> Felippe de Meirelles Motta

I don't understand what updates have been made to the devel/florist
port (I am still using gnat-3.15p_1).  Nonetheless, in response
to a similar inquiry last September, I made the following reply:

% In any case, I should note that I just reran the bug tests and a
% least the simpler programs (px_true and px_false) now work.  I
% don't quite see what the difference is, but since I filed the bug
% the lang/gnat-gcc34 port has been eliminated, and I have installed
% lang/gnat-gcc42 port in parallel with lang/gnat.  It looks to me
% as though the two gnat ports ought to be able to coexist without
% interference but clearly something is different.

I have just reverified that the test programs still work.  (That
is, the test program that failed when I originally submitted it
was working properly last September and continues to work properly
today.)

I continue to be mystified about what actually changed in the
FreeBSD system to actually fix the problem.

But, in summary, the problem has been solved and the bug report
can be closed.

 - dmw
Comment 8 Felippe de Meirelles Motta freebsd_committer freebsd_triage 2008-06-13 23:26:39 UTC
State Changed
From-To: suspended->closed

Problem solved, according submitter!