From owner-freebsd-ports@FreeBSD.ORG Tue Mar 31 11:24:13 2009 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39CB91065673 for ; Tue, 31 Mar 2009 11:24:13 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-qy0-f134.google.com (mail-qy0-f134.google.com [209.85.221.134]) by mx1.freebsd.org (Postfix) with ESMTP id C2B4B8FC1B for ; Tue, 31 Mar 2009 11:24:12 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by qyk40 with SMTP id 40so4679216qyk.3 for ; Tue, 31 Mar 2009 04:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=OhlyOS46k1WNqEHfL6LIgZ6JmO9mnGjmFtZGsvoSuPM=; b=cR5/i6oGmd/MxA+mLLulY5xHK3PFf8R8wgvZTOZFm9G2gfbMb7BToXxtqlisCUQiB2 6GpjzMLntXdezHbHrz4XYvAc1NGVvCs7F7yL5o2h675DklfkWTjpurW3A2eoZirpuY0V D+B2MGg64pHe8XZkXpFREzwIpS/Be2qnupSso= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=MTUyZXMKG4hVVfW1/RX//glupEwBKHonjY1HjR+R/q6AukEjkYStcgSFmVp7Avj2a6 uXd642fMmusiRK/WIgBNdj7JQdDxd+pMpEtK0ePJmAHSCF1O9eETJ4a6qtUs9K42Fsp1 J34+D/CskAj9oRI1qo6pBCJBV03qsuOu4Ccz0= Received: by 10.224.11.1 with SMTP id r1mr7859987qar.131.1238497290513; Tue, 31 Mar 2009 04:01:30 -0700 (PDT) Received: from epsilon.lan (bl5-225-84.dsl.telepac.pt [82.154.225.84]) by mx.google.com with ESMTPS id 9sm1702501yxs.26.2009.03.31.04.01.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Mar 2009 04:01:29 -0700 (PDT) Sender: Rui Paulo Message-Id: From: Rui Paulo To: Daniel Roethlisberger In-Reply-To: <20090330194725.GA10713@hobbes.ustdmz.roe.ch> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-2-344563865" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 31 Mar 2009 12:01:25 +0100 References: <200903300223.n2U2N6mO074911@pozo.com> <20090330072620.GA928@straylight.m.ringlet.net> <20090330113215.GA4768@hobbes.ustdmz.roe.ch> <20090330194725.GA10713@hobbes.ustdmz.roe.ch> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: ports@freebsd.org, Peter Pentchev Subject: Re: Dangling extern "C" in pcap.h (was: Re: nmap broken on current) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 11:24:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-2-344563865 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 30 Mar 2009, at 20:47, Daniel Roethlisberger wrote: > Daniel Roethlisberger 2009-03-30: >> Peter Pentchev 2009-03-30: >>> On Sun, Mar 29, 2009 at 07:23:00PM -0700, Manfred Antar wrote: >>>> the nmap port is broken on current: >>> >>> Shouldn't this be reported to the port's maintainer - Daniel >>> Roethlisberger ? :) I've CC'd him on this message... >> >> Thanks for CC:-ing me, Peter. >> >>>> c++ -c -I/usr/local/include/lua51 -I/usr/local/include -I/usr/ >>>> local/include -I/usr/include -Inbase -Insock/include -O2 -pipe - >>>> fno-strict-aliasing -Wall -fno-strict-aliasing -DHAVE_CONFIG_H >>>> -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\" - >>>> DNMAP_PLATFORM=\"i386-portbld-freebsd8.0\" -DNMAPDATADIR=\"/usr/ >>>> local/share/nmap\" -DNMAPLIBEXECDIR=\"/usr/local/libexec/nmap\" >>>> main.cc -o main.o >>>> c++ -c -I/usr/local/include/lua51 -I/usr/local/include -I/usr/ >>>> local/include -I/usr/include -Inbase -Insock/include -O2 -pipe - >>>> fno-strict-aliasing -Wall -fno-strict-aliasing -DHAVE_CONFIG_H >>>> -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\" - >>>> DNMAP_PLATFORM=\"i386-portbld-freebsd8.0\" -DNMAPDATADIR=\"/usr/ >>>> local/share/nmap\" -DNMAPLIBEXECDIR=\"/usr/local/libexec/nmap\" >>>> nmap.cc -o nmap.o >>>> In file included from Target.h:115, >>>> from traceroute.h:101, >>>> from nmap.cc:111: >>>> tcpip.h:458: error: declaration of C function 'int resolve(char*, >>>> in_addr*)' conflicts with >>>> tcpip.h:453: error: previous declaration 'int resolve(char*, >>>> sockaddr_storage*, size_t*, int)' here >>>> In file included from nmap.cc:121: >>>> utils.h:188: error: template with C linkage >>>> nmap.h: In function 'int nmap_main(int, char**)': >>>> nmap.h:416: error: previous declaration of 'int nmap_main(int, >>>> char**)' with 'C++' linkage >>>> nmap.cc:503: error: conflicts with new declaration with 'C' linkage >>>> nmap.cc: In function 'int nmap_main(int, char**)': >>>> nmap.cc:1167: error: cannot convert 'sockaddr_storage*' to >>>> 'in_addr*' for argument '2' to 'int resolve(char*, in_addr*)' >>>> nmap.cc:1673: error: cannot convert 'sockaddr_storage*' to >>>> 'in_addr*' for argument '2' to 'int resolve(char*, in_addr*)' >>>> nmap.h: In function 'void nmap_free_mem()': >>>> nmap.h:418: error: previous declaration of 'void nmap_free_mem()' >>>> with 'C++' linkage >>>> nmap.cc:1907: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h: In function 'int gather_logfile_resumption_state(char*, >>>> int*, char***)': >>>> nmap.h:438: error: previous declaration of 'int >>>> gather_logfile_resumption_state(char*, int*, char***)' with 'C++' >>>> linkage >>>> nmap.cc:1932: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h: In function 'void nmap_free_mem()': >>>> nmap.h:413: error: previous declaration of 'void >>>> init_socket(int)' with 'C++' linkage >>>> nmap.cc:2038: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:407: error: previous declaration of 'void getpts(const >>>> char*, scan_lists*)' with 'C++' linkage >>>> nmap.cc:2128: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:409: error: previous declaration of 'void >>>> getpts_simple(const char*, int, short unsigned int**, int*)' with >>>> 'C++' linkage >>>> nmap.cc:2191: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:410: error: previous declaration of 'void >>>> free_scan_lists(scan_lists*)' with 'C++' linkage >>>> nmap.cc:2400: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:402: error: previous declaration of 'void >>>> printinteractiveusage()' with 'C++' linkage >>>> nmap.cc:2410: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:426: error: previous declaration of 'char* >>>> seqreport(seq_info*)' with 'C++' linkage >>>> nmap.cc:2432: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:434: error: previous declaration of 'const char* >>>> seqidx2difficultystr(long unsigned int)' with 'C++' linkage >>>> nmap.cc:2441: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:429: error: previous declaration of 'const char* >>>> ipidclass2ascii(int)' with 'C++' linkage >>>> nmap.cc:2445: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:430: error: previous declaration of 'const char* >>>> tsseqclass2ascii(int)' with 'C++' linkage >>>> nmap.cc:2466: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:423: error: previous declaration of 'const char* >>>> scantype2str(stype)' with 'C++' linkage >>>> nmap.cc:2491: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:422: error: previous declaration of 'const char* >>>> statenum2str(int)' with 'C++' linkage >>>> nmap.cc:2523: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:404: error: previous declaration of 'int >>>> ftp_anon_connect(ftpinfo*)' with 'C++' linkage >>>> nmap.cc:2536: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:425: error: previous declaration of 'void reaper(int)' >>>> with 'C++' linkage >>>> nmap.cc:2614: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h:424: error: previous declaration of 'void sigdie(int)' >>>> with 'C++' linkage >>>> nmap.cc:2626: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h: In function 'int nmap_fileexistsandisreadable(const >>>> char*)': >>>> nmap.h:437: error: previous declaration of 'int >>>> nmap_fileexistsandisreadable(const char*)' with 'C++' linkage >>>> nmap.cc:2705: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.h: In function 'int nmap_fetchfile(char*, int, const char*)': >>>> nmap.h:436: error: previous declaration of 'int >>>> nmap_fetchfile(char*, int, const char*)' with 'C++' linkage >>>> nmap.cc:2709: error: conflicts with new declaration with 'C' >>>> linkage >>>> nmap.cc: At global scope: >>>> nmap.cc:2837: error: expected `}' at end of input >>>> gmake[1]: *** [nmap.o] Error 1 >>>> gmake[1]: Leaving directory `/usr/ports/security/nmap/work/ >>>> nmap-4.76' >>>> gmake: *** [all] Error 2 >>>> *** Error code 1 >>>> >>>> Stop in /usr/ports/security/nmap. >> >> Manfred, can you file a PR and make sure to also include the date >> of your -current sources and the content of your /etc/make.conf? > > Update: This is caused by a dangling extern "C" in > /usr/include/pcap.h, which breaks the use of libpcap from C++. > The attached patch fixes the issue for me. > > I'm Cc:-ing rpaulo@ who committed the recent update to libpcap. I'll commit this, thanks. -- Rui Paulo --Apple-Mail-2-344563865 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAknR+AUACgkQfD8M/ASTygLSXgCeK8rNQEwQ8nDf2HY8WF7zrXgD vjsAoIBOpZre8b89n8cvLx+5fbwW0BZQ =PZ6+ -----END PGP SIGNATURE----- --Apple-Mail-2-344563865--