From nobody@FreeBSD.org  Tue Dec  2 05:58:07 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F26381065672
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Dec 2008 05:58:07 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id EDF3C8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  2 Dec 2008 05:58:07 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mB25w7qJ024217
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 2 Dec 2008 05:58:07 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id mB25w7hB024216;
	Tue, 2 Dec 2008 05:58:07 GMT
	(envelope-from nobody)
Message-Id: <200812020558.mB25w7hB024216@www.freebsd.org>
Date: Tue, 2 Dec 2008 05:58:07 GMT
From: "G. Paul Ziemba" <p-fbsd-bugs@ziemba.us>
To: freebsd-gnats-submit@FreeBSD.org
Subject: devel/ace build fails if kernel module aio is loaded
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         129363
>Category:       ports
>Synopsis:       devel/ace build fails if kernel module aio is loaded
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    amdmi3
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 02 06:00:04 UTC 2008
>Closed-Date:    Fri Mar 20 01:01:56 UTC 2009
>Last-Modified:  Fri Mar 20 01:10:04 UTC 2009
>Originator:     G. Paul Ziemba
>Release:        7.1-PRERELEASE
>Organization:
>Environment:
FreeBSD hairball.ziemba.us 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Tue Nov 18 13:50:14 PST 2008     root@hairball:/usr/obj/usr/src/sys/GPZ-081118  i386
>Description:
devel/ace (ace-5.5.2_2) build works OK if aio(4) is not loaded, but if aio kernel module is loaded, build fails when it attempts to compile tests/Proactor_Test.cpp.

This failure occurs because of inconsistency between code in POSIX_CB_Proactor.h (which leaves class ACE_POSIX_CB_Proactor undefined if defined (__FreeBSD__)) and code in Proactor_Test.cpp (which assumes it is defined). There is an identical situation with Proactor_Test_IPV6.cpp as well.

In the default case where kernel module aio(4) is not loaded, the ACE configure script does not detect the presence of aio and therefore leaves ACE_HAS_AIO_CALLS undefined. In this case, the test code in Proactor_Test.cpp and Proactor_Test_IPV6.cpp is not compiled, and there is no build failure.
>How-To-Repeat:
# kldload aio
# cd /usr/ports/devel/ace
# make clean && make
>Fix:
The attached patch qualifies the relevant code blocks with "!defined(__FreeBSD__)" to make them consistent with POSIX_CB_Proactor.h.

Patch attached with submission follows:

--- tests/Proactor_Test.cpp.orig	2006-04-20 00:41:47.000000000 -0700
+++ tests/Proactor_Test.cpp	2008-12-01 11:00:05.000000000 -0800
@@ -253,7 +253,7 @@
       break;
 #  endif /* sun */
 
-#  if !defined(__Lynx__)
+#  if !defined(__Lynx__) && !defined (__FreeBSD__)
     case CB:
       ACE_NEW_RETURN (proactor_impl,
                       ACE_POSIX_CB_Proactor (max_op),
--- tests/Proactor_Test_IPV6.cpp.orig	2006-04-20 00:41:47.000000000 -0700
+++ tests/Proactor_Test_IPV6.cpp	2008-12-01 17:40:59.000000000 -0800
@@ -253,7 +253,7 @@
       break;
 #  endif /* sun */
 
-#  if !defined(__Lynx__)
+#  if !defined(__Lynx__) && !defined(__FreeBSD__)
     case CB:
       ACE_NEW_RETURN (proactor_impl,
                       ACE_POSIX_CB_Proactor (max_op),


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->sem 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Dec 2 06:00:14 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129363 
Responsible-Changed-From-To: sem->freebsd-ports-bugs 
Responsible-Changed-By: sem 
Responsible-Changed-When: Mon Dec 22 16:12:42 UTC 2008 
Responsible-Changed-Why:  
Return to the pool 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129363 
Responsible-Changed-From-To: freebsd-ports-bugs->amdmi3 
Responsible-Changed-By: amdmi3 
Responsible-Changed-When: Fri Mar 20 01:00:40 UTC 2009 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129363 
State-Changed-From-To: open->closed 
State-Changed-By: amdmi3 
State-Changed-When: Fri Mar 20 01:01:55 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=129363 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/129363: commit references a PR
Date: Fri, 20 Mar 2009 01:02:00 +0000 (UTC)

 amdmi3      2009-03-20 01:01:51 UTC
 
   FreeBSD ports repository
 
   Modified files:
     devel/ace            Makefile 
   Added files:
     devel/ace/files      patch-tests 
   Log:
   - Fix build when aio.ko is loaded
   - While here, fix build on CURRENT
   
   PR:             129363
   Submitted by:   "G. Paul Ziemba" <p-fbsd-bugs at ziemba dot us>
   
   Revision  Changes    Path
   1.22      +5 -5      ports/devel/ace/Makefile
   1.1       +25 -0     ports/devel/ace/files/patch-tests (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
