From owner-freebsd-ports@FreeBSD.ORG Fri Sep 26 02:09:58 2003 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F41A16A4B3; Fri, 26 Sep 2003 02:09:58 -0700 (PDT) Received: from shop.digma.com.ua (shop.digma.com.ua [217.12.194.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id D303B43FF2; Fri, 26 Sep 2003 02:09:52 -0700 (PDT) (envelope-from cub@cub.org.ua) Received: from cub.org.ua (demani.digma [172.22.5.7]) by shop.digma.com.ua (8.12.6p2/8.12.6) with ESMTP id h8Q99flL068337; Fri, 26 Sep 2003 12:09:41 +0300 (EEST) (envelope-from cub@cub.org.ua) Received: from demani.digma (localhost [127.0.0.1]) by cub.org.ua (8.12.9/8.12.9) with ESMTP id h8Q99aJv030330; Fri, 26 Sep 2003 12:09:36 +0300 (EEST) (envelope-from cub@demani.digma) Received: (from cub@localhost) by demani.digma (8.12.9/8.12.9/Submit) id h8Q99YhI030329; Fri, 26 Sep 2003 12:09:34 +0300 (EEST) (envelope-from cub) Date: Fri, 26 Sep 2003 12:09:34 +0300 (EEST) Message-Id: <200309260909.h8Q99YhI030329@demani.digma> To: FreeBSD-gnats-submit@freebsd.org From: Kostyuk Oleg X-send-pr-version: 3.113 X-GNATS-Notify: cc: freebsd-ports@freebsd.org Subject: libgnugetopt conflict : nmap upgrade (3.30 to 3.46) generate errors X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Kostyuk Oleg List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 09:09:58 -0000 >Submitter-Id: current-users >Originator: Kostyuk Oleg >Organization: >Confidential: no >Synopsis: libgnugetopt conflict : nmap upgrade (3.30 to 3.46) generate errors >Severity: serious >Priority: medium >Category: ports >Class: sw-bug >Release: FreeBSD 5.1-CURRENT i386 >Environment: System: FreeBSD demani.digma 5.1-CURRENT FreeBSD 5.1-CURRENT #1: Sat Sep 20 14:46:13 EEST 2003 root@demani.digma:/usr/src/sys/i386/compile/CUB i386 >Description: Upgrading nmap to version 3.46 produce errors: c++ -c -I/usr/local/include -O -pipe -march=pentium3 -fmemoize-lookups -fsave-memoized -Wall -I/usr/local/include -Ilibpcap-possiblymodified -Inbase -Insock/include -DHAVE_CONFIG_H -DNMAP_VERSION=\"3.46\" -DNMAP_NAME=\"nmap\" -DNMAP_URL=\"http://www.insecure.org/nmap/\" -DNMAP_PLATFORM=\"i386-portbld-freebsd5.1\" -DNMAPDATADIR=\"/usr/local/share/nmap\" -Ilibpcap-possiblymodified main.cc -o main.o In file included from nbase/nbase.h:256, from nmap.h:109, from main.cc:87: /usr/local/include/getopt.h:115: error: declaration of C function `int getopt() ' conflicts with /usr/include/unistd.h:377: error: previous declaration `int getopt(int, char* const*, const char*)' here *** Error code 1 Stop in /var/.0/tmp/mnt/digma0/ports/security/nmap/work/nmap-3.46. *** Error code 1 Stop in /mnt/digma0/ports/security/nmap. >How-To-Repeat: Install from ports nmap-3.46 on FreeBSD 5.1 (gcc 3.3) with installed libgnugetopt (also from ports). Or (Nate Eldredge method) : install libgnugetopt-1.2 (current now), and simply $ cat >foo.cc #include #include ^D $ gcc -c -I /usr/local/include foo.cc >Fix: This problem detail explained in PR/54037. At this moment, I know about this problem with next ports : nmap, licq, postgres, mjpegtools Some of this ports now have patched Makefile's to avoid this problem, but IMHO this is wrong way. Problem with libgnugetopt still exists, and by patching port Makefile's we do not resolve it globally. I think, we must patch libgnugetopt, or (as last resort) - path gcc 3.3, but not isolated Makefile's in each port, who have dependecy to libgnugetopt. This will be right way. PS : sorry for my english :)