Skip to content

Fixed compile error on FreeBSD 9.#1945

Merged
jgarzik merged 1 commit intobitcoin:masterfrom
centromere:leveldb_fix
Nov 16, 2012
Merged

Fixed compile error on FreeBSD 9.#1945
jgarzik merged 1 commit intobitcoin:masterfrom
centromere:leveldb_fix

Conversation

@centromere
Copy link
Copy Markdown

@robbak
Copy link
Copy Markdown
Contributor

robbak commented Oct 22, 2012

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>
  #endif

On 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
Copy link
Copy Markdown
Author

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
Copy link
Copy Markdown
Member

luke-jr commented Oct 22, 2012

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
Copy link
Copy Markdown
Member

sipa commented Oct 22, 2012

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
Copy link
Copy Markdown
Member

sipa commented Oct 22, 2012

ACK

@BitcoinPullTester
Copy link
Copy Markdown

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

@sipa
Copy link
Copy Markdown
Member

sipa commented Oct 30, 2012

Alternatively, we could try updating to LevelDB 1.6 entirely?

@Diapolo
Copy link
Copy Markdown

Diapolo commented Oct 30, 2012

@sipa Is there a changelog fot that available? IMHO as long as there is no stable release available, we are free to do this whenever it's needed / wanted :).

jgarzik pushed a commit that referenced this pull request Nov 16, 2012
Fixed compile error on FreeBSD 9.
@jgarzik jgarzik merged commit 848c0d5 into bitcoin:master Nov 16, 2012
laudney pushed a commit to reddcoin-project/reddcoin-3.10 that referenced this pull request Mar 19, 2014
Fixed compile error on FreeBSD 9.
KolbyML pushed a commit to KolbyML/bitcoin that referenced this pull request Dec 5, 2020
98218c6 [RPC] Remove dummy arg in sendrawtx and restore bcconf in outputs (random-zebra)
3db4c94 [Consensus][Cleanup] Deprecate SwiftTX-related Sporks (2 and 3) (random-zebra)
183b92f [Protocol][Cleanup] Remove IX and IXLOCKVOTE net messages (random-zebra)
3890e79 [Refactor] RelayWalletTransaction: return early before cs_main lock (random-zebra)
f3068f5 [Wallet][Cleanup] Remove fUseIX option in coin selection (random-zebra)
f1dcc7b [RPC] Remove sendtoaddressix rpc call (random-zebra)
7ac2ea2 [RPC][Wallet][Cleanup] Remove useIX argument in CreateTransaction (random-zebra)
0fd599c [GUI][Cleanup] Remove useSwiftTX in SendCoinsRecipient and CControl (random-zebra)
f48ad39 [Cleanup][Wallet] Remove strCommand argument from Commit/Relay TX (random-zebra)
9404f22 [Cleanup] Remove SwiftTX globals fEnableSwiftTX and nSwiftTXDepth (random-zebra)
ba40955 [Cleanup] Nuke sifttx.* files (random-zebra)
5bba511 [Refactor][Validation] Remove GetIXConfirmations function (random-zebra)
ab5424a [GUI][Refactor] Remove TransactionStatus::cur_num_ix_locks (random-zebra)
c88f0cc [Cleanup] Remove transaction-locks cleanup in ThreadCheckMasternodes (random-zebra)
be22cb4 [RPC] Unify "confirmations" concept removing "bcconf" (random-zebra)
e226a3f [Cleanup] Remove unused wallet functions: (random-zebra)
91b668c [Wallet] refactor RelayWalletTransaction removing IX option (random-zebra)
93cc825 [Wallet] remove enableIX argument from GetDepthInMainChain (random-zebra)
71e0b43 [RPC] Remove swiftx option in sendrawtransaction (random-zebra)
df56f50 [Net] Remove/Deprecate SwiftX-related messages (random-zebra)
7b3faf0 [Validation] Remove swiftTX transaction scanning (random-zebra)

Pull request description:

  SwiftTX has been disabled via spork ages ago, and no work has been done on it since.
  It will never be re-introduced in its current form.
  Later on (after the introduction of deterministic masternodes and LLMQ), we should work on a [DIP10](https://github.com/dashpay/dips/blob/master/dip-0010.md)-style design, implemented from scratch.

  So... better not to have all this dead-code spread around, only providing another place for bugs to hide.
  It's time to say "goodbye".

ACKs for top commit:
  furszy:
    utACK 98218c6 after rebase.
  Fuzzbawls:
    utACK 98218c6

Tree-SHA512: 250ec54d46461af41c18428622204156dd8b3f443b2604d9df9d1b95d85d2707c0fa68efc67e5b0358e2c24ab7924ac399d46e7719409cadb026620d6a9eaed5
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants