Bug 177867 - [MAINTAINER] net-p2p/bitcoin: [SUMMARIZE CHANGES]
[MAINTAINER] net-p2p/bitcoin: [SUMMARIZE CHANGES]
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: Steve Wills
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-15 10:10 UTC by robbak
Modified: 2013-04-24 03:50 UTC (History)
0 users

See Also:


Attachments
bitcoin-0.8.1.patch (2.13 KB, patch)
2013-04-15 10:10 UTC, robbak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description robbak 2013-04-15 10:10:00 UTC
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
Comment 1 Edwin Groothuis freebsd_committer 2013-04-15 10:10:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->swills

swills@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 robbak 2013-04-15 10:12:40 UTC
Summary: Prevent deletion of /dev/null on FreeBSD 8.3/gcc4.2.2

I'm still pretty bad at this.


On 15 April 2013 19:10, <FreeBSD-gnats-submit@freebsd.org> wrote:

> Thank you very much for your problem report.
> It has the internal identification `ports/177867'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs.
>
> You can access the state of your problem report at any time
> via this link:
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=177867
>
> >Category:       ports
> >Responsible:    freebsd-ports-bugs
> >Synopsis:       [MAINTAINER] net-p2p/bitcoin: [SUMMARIZE CHANGES]
> >Arrival-Date:   Mon Apr 15 09:10:00 UTC 2013
>
Comment 3 dfilter freebsd_committer 2013-04-24 03:42:29 UTC
Author: swills
Date: Wed Apr 24 02:42:20 2013
New Revision: 316400
URL: http://svnweb.freebsd.org/changeset/ports/316400

Log:
  - Add patch to prevent deletion of /dev/null
  
  PR:		ports/177867
  Submitted by:	Robert Backahus <robbak@robbak.com> (maintainer)

Added:
  head/net-p2p/bitcoin/files/
  head/net-p2p/bitcoin/files/patch-leveldb_makefile   (contents, props changed)
Modified:
  head/net-p2p/bitcoin/Makefile

Modified: head/net-p2p/bitcoin/Makefile
==============================================================================
--- head/net-p2p/bitcoin/Makefile	Wed Apr 24 00:08:36 2013	(r316399)
+++ head/net-p2p/bitcoin/Makefile	Wed Apr 24 02:42:20 2013	(r316400)
@@ -3,6 +3,7 @@
 
 PORTNAME=	bitcoin
 PORTVERSION=	0.8.1
+PORTREVISION=	1
 CATEGORIES=	net-p2p finance
 
 MAINTAINER=	robbak@robbak.com

Added: head/net-p2p/bitcoin/files/patch-leveldb_makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/bitcoin/files/patch-leveldb_makefile	Wed Apr 24 02:42:20 2013	(r316400)
@@ -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
+
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Steve Wills freebsd_committer 2013-04-24 03:42:33 UTC
State Changed
From-To: open->closed

Committed. Thanks!