From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Aug 5 14:10:02 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7458C16A420 for ; Sun, 5 Aug 2007 14:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5D53F13C46B for ; Sun, 5 Aug 2007 14:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l75EA2e8023631 for ; Sun, 5 Aug 2007 14:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l75EA2rv023630; Sun, 5 Aug 2007 14:10:02 GMT (envelope-from gnats) Resent-Date: Sun, 5 Aug 2007 14:10:02 GMT Resent-Message-Id: <200708051410.l75EA2rv023630@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Douglas Wells Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13B1F16A417 for ; Sun, 5 Aug 2007 14:04:35 +0000 (UTC) (envelope-from sysmaint@contek.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id D862D13C468 for ; Sun, 5 Aug 2007 14:04:34 +0000 (UTC) (envelope-from sysmaint@contek.com) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 05 Aug 2007 10:04:34 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.8.3-GA) with ESMTP id NQC43387; Sun, 5 Aug 2007 10:04:34 -0400 (EDT) Received: from 207-172-216-55.s817.apx1.sbo.ma.dialup.rcn.com (HELO mail.contek.com) ([207.172.216.55]) by smtp01.lnh.mail.rcn.net with ESMTP; 05 Aug 2007 10:04:31 -0400 Received: by mail.contek.com (Postfix, from userid 10112) id 5512439821; Sun, 5 Aug 2007 08:09:40 -0400 (EDT) Message-Id: <20070805120940.5512439821@mail.contek.com> Date: Sun, 5 Aug 2007 08:09:40 -0400 (EDT) From: Douglas Wells To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: sysmaint@contek.com Subject: ports/115217: Ada florist socket program doesn't compile due to internal error X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Douglas Wells List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2007 14:10:02 -0000 >Number: 115217 >Category: ports >Synopsis: Ada florist socket program doesn't compile due to internal error >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 05 14:10:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Douglas Wells >Release: FreeBSD 6.2-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD flame.contek.com 6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #0: Sun Feb 11 18:14:07 EST 2007 root@flame.contek.com:/other5/src.6.2/sys/i386/compile/FLAME.6.2 i386 GNAT: gnat-3.15p_1 / gnat-gcc-3.4.6_3 florist: florist-3.15p_1 (tools installed via ports compilation) >Description: A simple Ada program using devel/florist to access POSIX sockets encounters the error: posix-sockets-internet.gpb:660:15: duplication of choice value at line 659 posix-sockets-internet.gpb:674:15: duplication of choice value at line 673 gnatmake: "/usr/local/lib/florist/posix-sockets-internet.adb" compilation error Note that posix-sockets-internet is internal to florist. >How-To-Repeat: Use the command: gnatmake -I/usr/local/lib/florist px_socket.adb with this test program: ------------------------- px_socket.adb ------------------- with POSIX.Sockets; with POSIX.Sockets.Internet; procedure px_socket is package PS renames POSIX.Sockets; package PSI renames POSIX.Sockets.Internet; sockfamily : PS.Protocol_Family := PSI.Internet_Protocol; begin null; end px_socket; ----------------------- end px_socket.adb ----------------- >Fix: The problem seems to arise from a case statement that has duplicate selectors based on the IP type-of-server IPTOS_* values, each of which has the value 0. This problem in turn is caused by a questionable tactic in the internal translation code in c-posix.c, which provides a default value of 0 for any C define that it is unable to locate. The problem here is that the translation process does not have access to the include file . A workaround is to patch pconfig.h (after make config) to define near the top: #define __BSD_VISIBLE 1 and to include near the other netinet includes: #include With this change the test program and several other more complicated programs compile and execute properly. This problem may or may not be more cleanly resolved via appropriate changes to the configure mechanism. >Release-Note: >Audit-Trail: >Unformatted: