Date: Mon, 15 Apr 2013 19:00:32 +1000 (EST) From: Robert Backahus <robbak@robbak.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/177867: [MAINTAINER] net-p2p/bitcoin: [SUMMARIZE CHANGES] Message-ID: <201304150900.r3F90W1j062475@boffin.lan> Resent-Message-ID: <201304150910.r3F9A0Hr092068@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 177867 >Category: ports >Synopsis: [MAINTAINER] net-p2p/bitcoin: [SUMMARIZE CHANGES] >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Apr 15 09:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Robert Backahus >Release: FreeBSD 9.1-STABLE amd64 >Organization: >Environment: System: FreeBSD boffin 9.1-STABLE FreeBSD 9.1-STABLE #4 r246398: Thu Feb 7 02:57:27 >Description: Sander Kleykens <sander@kleykens.com> reported to me that the bundled build of leveldb deletes /dev/null when built using FreeBSD 8.3 using gcc 4.2.2. The problem is in the version of gcc, which detetes the node when -o /dev/null is used. This patch, created by Sandler, works around this by creating a temporary file to use as an output file, then deleting it when finished. This fault was confirmed using redports, and this fix tested there as well. This problem also affects the databases/leveldb port too. The portrevision was not bumped, as this does not change the compiled files, and the port could not have been built on the affected platform. Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports) >How-To-Repeat: Build net-p2p/bitcoin on FreeBSD >Fix: --- bitcoin-0.8.1.patch begins here --- diff -ruN /usr/ports/net-p2p/bitcoin/files/patch-leveldb_makefile ./files/patch-leveldb_makefile --- /usr/ports/net-p2p/bitcoin/files/patch-leveldb_makefile 1970-01-01 10:00:00.000000000 +1000 +++ ./files/patch-leveldb_makefile 2013-04-13 15:36:30.000000000 +1000 @@ -0,0 +1,58 @@ +From 966781671d44a4bcaa4a03c8c59dc280acf2c595 Mon Sep 17 00:00:00 2001 +From: Sander Kleykens <sander@kleykens.com> +Date: Sat, 23 Mar 2013 17:16:02 +0100 +Subject: [PATCH] Fix /dev/null getting removed during compilation on some + systems. + +--- + src/leveldb/build_detect_platform | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/leveldb/build_detect_platform b/src/leveldb/build_detect_platform +index 609cb51..bebf607 100755 +--- a/src/leveldb/build_detect_platform ++++ src/leveldb/build_detect_platform +@@ -25,6 +25,8 @@ + # -DSNAPPY if the Snappy library is present + # + ++TMPDIR="/tmp" ++ + OUTPUT=$1 + PREFIX=$2 + if test -z "$OUTPUT" || test -z "$PREFIX"; then +@@ -164,7 +166,9 @@ if [ "$CROSS_COMPILE" = "true" ]; then + true + else + # If -std=c++0x works, use <cstdatomic>. Otherwise use port_posix.h. +- $CXX $CXXFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null <<EOF ++ CPP0X_TEST_TEMPFILE="${TMPDIR}/leveldb-build_detect_platform_cpp0x.$$" ++ ++ $CXX $CXXFLAGS -std=c++0x -x c++ - -o ${CPP0X_TEST_TEMPFILE} 2>/dev/null <<EOF + #include <cstdatomic> + int main() {} + EOF +@@ -175,13 +179,19 @@ EOF + COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX" + fi + ++ rm -f ${CPP0X_TEST_TEMPFILE} > /dev/null 2>&1 ++ + # Test whether tcmalloc is available +- $CXX $CXXFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF ++ TCMALLOC_TEST_TEMPFILE="${TMPDIR}/leveldb-build_detect_platform_tcmalloc.$$" ++ ++ $CXX $CXXFLAGS -x c++ - -o ${TCMALLOC_TEST_TEMPFILE} -ltcmalloc 2>/dev/null <<EOF + int main() {} + EOF + if [ "$?" = 0 ]; then + PLATFORM_LIBS="$PLATFORM_LIBS -ltcmalloc" + fi ++ ++ rm -f ${TCMALLOC_TEST_TEMPFILE} > /dev/null 2>&1 + fi + + PLATFORM_CCFLAGS="$PLATFORM_CCFLAGS $COMMON_FLAGS" +-- +1.8.1.5 + --- bitcoin-0.8.1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304150900.r3F90W1j062475>