Fixed compile error on FreeBSD 9. #1945
pull centromere wants to merge 1 commits into bitcoin:master from centromere:leveldb_fix changing 1 files +9 −2-
centromere commented at 5:51 AM on October 22, 2012: none
-
17bfb1f437
Fixed compile error on FreeBSD 9.
See http://code.google.com/p/leveldb/issues/detail?id=98
-
robbak commented at 6:43 AM on October 22, 2012: contributor
I have the same issue patched in my preliminary port directory. I have used the solution chosen by the author of the databases/leveldb port:
--- port/port_posix.h.orig 2012-05-31 00:56:59.000000000 +0800 +++ src/leveldb/port/port_posix.h 2012-06-15 15:07:41.274868153 +0800 @@ -25,6 +25,11 @@ defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID) #include <sys/types.h> #include <sys/endian.h> + #ifdef _LITTLE_ENDIAN + #define PLATFORM_IS_LITTLE_ENDIAN true + #else + #define PLATFORM_IS_LITTLE_ENDIAN false + #endif #else #include <endian.h> #endifOn a similar matter, have you had a look at the bitcoin FreeBSD port? I'd like to get some input from the bitcoin community. There are bound to be some "but we do it this way" issues to compromise on, of course, but all comments are welcome.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-p2p/bitcoin/
-
centromere commented at 6:54 AM on October 22, 2012: none
All I did was replace the port_posix.h file in bitcoin with the one from the latest commit of leveldb. It seems to me like the cleanest option.
-
luke-jr commented at 6:57 AM on October 22, 2012: member
Note the bitcoin codebase doesn't work in big endian at all right now. Also note that despite many headers/software making the assumption that endian is fixed at build time, that assumption is apparently not necessarily true in theory.
The cleanest option is to use a git submodule to embed LevelDB, at least until it's possible to build/link with system LevelDB.
-
sipa commented at 7:08 AM on October 22, 2012: member
Well, if anything, upgrading to a newer upstream version of the the port_posix.h file is no problem in my opinion, certainly if it fixes building for some people.
-
sipa commented at 6:31 PM on October 22, 2012: member
ACK
-
BitcoinPullTester commented at 5:16 PM on October 30, 2012: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/17bfb1f4378445aaf5b3c3afdd47e289e22c0545 for binaries and test log.
-
sipa commented at 8:57 PM on October 30, 2012: member
Alternatively, we could try updating to LevelDB 1.6 entirely?
- jgarzik referenced this in commit 848c0d5d95 on Nov 16, 2012
- jgarzik merged this on Nov 16, 2012
- jgarzik closed this on Nov 16, 2012
- laudney referenced this in commit bbd5ac5a53 on Mar 19, 2014
- KolbyML referenced this in commit d98378e56b on Dec 5, 2020
- DrahtBot locked this on Sep 8, 2021