From owner-svn-ports-branches@freebsd.org Tue Dec 8 17:44:37 2015 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C5C29D40BC; Tue, 8 Dec 2015 17:44:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 152A41387; Tue, 8 Dec 2015 17:44:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB8HiaWx088908; Tue, 8 Dec 2015 17:44:36 GMT (envelope-from truckman@FreeBSD.org) Received: (from truckman@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB8HiaBQ088907; Tue, 8 Dec 2015 17:44:36 GMT (envelope-from truckman@FreeBSD.org) Message-Id: <201512081744.tB8HiaBQ088907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: truckman set sender to truckman@FreeBSD.org using -f From: Don Lewis Date: Tue, 8 Dec 2015 17:44:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r403317 - in branches/2015Q4/devel/libxs: . files X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2015 17:44:37 -0000 Author: truckman Date: Tue Dec 8 17:44:35 2015 New Revision: 403317 URL: https://svnweb.freebsd.org/changeset/ports/403317 Log: MFH: r403247 Remove USE_GCC=yes from devel/libxs and always build with the base compiler. There is a defect in the libc++ header files bundled with clang < 3.6 that broke the libxs build. Because of this breakage, USE_GCC=yes was added to the port Makefile in r330486. Unfortunately that breaks dns/dnstable in two different ways. Dnstable itself is pure-C code, but it links to two different libraries that contain C++ code, libxs and archivers/snappy, the latter of which is built with the base c++ compiler. * On FreeBSD 9, snappy is generally built with g++ 4.2 from base and linked to libstdc++ in base, whereas libxs is built with g++ from ports and linked to libstdc++ from ports. When building dnstable, the linker seems to load libsnappy first, which brings in libstdc++ from base. This seems to work fine with ports gcc 4.8 or older, but when the default ports version is upgraded to 4.9, the linker fails with the error: "/usr/local/lib/libxs.so.2: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'" * On FreeBSD >= 10 where clang is the base compiler and snappy is linked to libc++, the build succeeds but the resulting executables will fail at runtime because they link to both libc++ from base and libstdc++ from ports. When building libxs on FreeBSD 10 with clang 3.4, the build error is: CXX libxs_la-io_thread.lo --- libxs_la-encoder.lo --- In file included from encoder.cpp:23: In file included from ./encoder.hpp:28: In file included from /usr/include/c++/v1/algorithm:626: /usr/include/c++/v1/utility:254:9: error: field has incomplete type 'xs::io_thread_t::timer_info_t' _T2 second; ^ Patching the code to work around the build failure does not look possible, so instead, fix the problem in a rather hackish way when compiling with clang < 3.6 and using its bundled c++ headers: * Make a local copy of the two defective header files. * Apply the upstream change to those files from "Allow declaration of map and multimap iterator with incomplete mapped type. Patch from eugenis" * Add the directory containing the updated header files to the CPPFLAGS. This fix is not needed when building with base clang on FreeBSD 9 because it uses the stdc++ headers. PR: 204461 PR: 204400 Approved by: vg (maintainer) Approved by: ports-secteam (feld) Sponsored by: Farsight Security, Inc. Added: branches/2015Q4/devel/libxs/files/ - copied from r403247, head/devel/libxs/files/ Modified: branches/2015Q4/devel/libxs/Makefile Directory Properties: branches/2015Q4/ (props changed) Modified: branches/2015Q4/devel/libxs/Makefile ============================================================================== --- branches/2015Q4/devel/libxs/Makefile Tue Dec 8 17:35:19 2015 (r403316) +++ branches/2015Q4/devel/libxs/Makefile Tue Dec 8 17:44:35 2015 (r403317) @@ -3,7 +3,7 @@ PORTNAME= libxs PORTVERSION= 1.2.0 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= devel MASTER_SITES= http://download.crossroads.io/ @@ -13,9 +13,8 @@ COMMENT= Open source lightweight messagi LICENSE= GPLv3 GNU_CONFIGURE= yes -USES= pathfix pkgconfig libtool +USES= compiler:features pathfix pkgconfig libtool USE_LDCONFIG= yes -USE_GCC= yes OPTIONS_DEFINE= DEBUG DOCS PLUGINS ZMQ EXTERNAL_DESC= PGM extension from ports @@ -26,7 +25,21 @@ OPTIONS_RADIO= PGM OPTIONS_RADIO_PGM= INTERNAL EXTERNAL OPTIONS_DEFAULT=PLUGINS -.include +.include + +.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 36 && \ + !${COMPILER_FEATURES:Mlibstdc++} +# Allow declaration of map and multimap iterator with incomplete mapped type +# by applying upstream change r231119 to a copy of our local c++ headers. +# This fix is not needed for clang 3.4 on 9.3 which uses libstdc++. +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-map +CPPFLAGS+= -I${WRKSRC}/map-fix + +post-extract: + ${MKDIR} ${WRKSRC}/map-fix + ${CP} /usr/include/c++/v1/__tree /usr/include/c++/v1/map \ + ${WRKSRC}/map-fix/. +.endif .if ${PORT_OPTIONS:MDEBUG} CONFIGURE_ARGS+= --enable-debug @@ -75,4 +88,4 @@ pre-configure: ${WRKSRC}/configure .endif -.include +.include