Fix LevelDB removing /dev/null at build time #2406

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

@SanderKleykens

Building bitcoin as root can cause /dev/null to be removed on some systems (e.g. FreeBSD 8.3-RELEASE-p3 and gcc version 4.2.2). This pull request fixes the issue.

A patch has also been sent upstream, see http://code.google.com/p/leveldb/issues/detail?id=153.

@BitcoinPullTester

Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/966781671d44a4bcaa4a03c8c59dc280acf2c595 for binaries and test log.

@sipa
Member
sipa commented Apr 7, 2013

Sounds like the compiler is quite broken in this case...

I prefer not messing with the leveldb config script too much. If it's accepted upstream, no problem of course.

@SanderKleykens

Yes, ultimately it's a gcc issue. One that appears to have been resolved in newer versions.

It's also pretty easy to work around the issue by simply building the project as a user that can't remove /dev/null. I only came across the problem because FreeBSD requires, by default, root privileges when building a port in the ports directory. I'll just notify the port maintainer.

@robbak
Contributor
robbak commented Apr 7, 2013

And that's me. I saw your bug report, and decided I'd look into it when I
next get it updated. I'll check how the leveldb port handles this and copy
their patches, I think.

What is the schedule for the 0.8.2 update?

On 8 April 2013 06:03, Sander Kleykens notifications@github.com wrote:

Yes, ultimately it's a gcc issue. One that appears to have been resolved
in newer versions.

It's also pretty easy to work around the issue by simply building the
project as a user that can't remove /dev/null. I only came across the
problem because FreeBSD requires, by default, root privileges when building
a port in the ports directory. I'll just notify the port maintainer.


Reply to this email directly or view it on GitHubhttps://github.com/bitcoin/bitcoin/pull/2406#issuecomment-16022590
.

@jgarzik
Member
jgarzik commented Jun 24, 2013

Closing. (1) Don't build with root, that's insanely dangerous. (2) Sounds like this issue is already fixed upstream, and will be pulled in via leveldb update. (3) An issue external to us.

@jgarzik jgarzik closed this Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment