Litecoin: Update build instructions for OSX and Unix.

pull/204/head
Adrian Gallagher 10 years ago
parent 72ece8bf54
commit 228abe433a

@ -1,6 +1,6 @@
Mac OS X Build Instructions and Notes
====================================
This guide will show you how to build bitcoind(headless client) for OSX.
This guide will show you how to build litecoind(headless client) for OSX.
Notes
-----
@ -58,19 +58,19 @@ The rest of these commands are run inside brew interactive mode:
/private/tmp/berkeley-db4-UGpd0O $ exit
```
After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to `/usr/local`. You don't need it to link it to build bitcoin, but if you want to, here's how:
After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to `/usr/local`. You don't need it to link it to build litecoin, but if you want to, here's how:
$ brew link --force berkeley-db4
### Building `bitcoind`
### Building `litecoind`
1. Clone the github tree to get the source code and go into the directory.
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git clone https://github.com/litecoin-project/litecoin.git
cd litecoin
2. Build bitcoind:
2. Build litecoind:
./autogen.sh
./configure
@ -80,7 +80,7 @@ After exiting, you'll get a warning that the install is keg-only, which means it
make check
4. (Optional) You can also install bitcoind to your path:
4. (Optional) You can also install litecoind to your path:
make install
@ -92,7 +92,7 @@ Download Qt Creator from http://www.qt.io/download/. Download the "community edi
1. Make sure you installed everything through homebrew mentioned above
2. Do a proper ./configure --with-gui=qt5 --enable-debug
3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
4. Enter "bitcoin-qt" as project name, enter src/qt as location
4. Enter "litecoin-qt" as project name, enter src/qt as location
5. Leave the file selection as it is
6. Confirm the "summary page"
7. In the "Projects" tab select "Manage Kits..."
@ -102,11 +102,11 @@ Download Qt Creator from http://www.qt.io/download/. Download the "community edi
Creating a release build
------------------------
You can ignore this section if you are building `bitcoind` for your own use.
You can ignore this section if you are building `litecoind` for your own use.
bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Qt.app bundle.
litecoind/litecoin-cli binaries are not included in the Litecoin-Qt.app bundle.
If you are building `bitcoind` or `Bitcoin-Qt` for others, your build machine should be set up
If you are building `litecoind` or `Litecoin-Qt` for others, your build machine should be set up
as follows for maximum compatibility:
All dependencies should be compiled with these flags:
@ -115,30 +115,30 @@ All dependencies should be compiled with these flags:
-arch x86_64
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
Once dependencies are compiled, see release-process.md for how the Litecoin-Qt.app
bundle is packaged and signed to create the .dmg disk image that is distributed.
Running
-------
It's now available at `./bitcoind`, provided that you are still in the `src`
It's now available at `./litecoind`, provided that you are still in the `src`
directory. We have to first create the RPC configuration file, though.
Run `./bitcoind` to get the filename where it should be put, or just try these
Run `./litecoind` to get the filename where it should be put, or just try these
commands:
echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
echo -e "rpcuser=litecoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Litecoin/litecoin.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Litecoin/litecoin.conf"
The next time you run it, it will start downloading the blockchain, but it won't
output anything while it's doing this. This process may take several hours;
you can monitor its process by looking at the debug.log file, like this:
tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
tail -f $HOME/Library/Application\ Support/Litecoin/debug.log
Other commands:
-------
./bitcoind -daemon # to start the bitcoin daemon.
./bitcoin-cli --help # for a list of command-line options.
./bitcoin-cli help # When the daemon is running, to get a list of RPC commands
./litecoind -daemon # to start the litecoin daemon.
./litecoin-cli --help # for a list of command-line options.
./litecoin-cli help # When the daemon is running, to get a list of RPC commands

@ -1,10 +1,10 @@
UNIX BUILD NOTES
====================
Some notes on how to build Bitcoin in Unix.
Some notes on how to build Litecoin in Unix.
Note
---------------------
Always use absolute paths to configure and compile bitcoin and the dependencies,
Always use absolute paths to configure and compile litecoin and the dependencies,
for example, when specifying the the path of the dependency:
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
@ -22,7 +22,7 @@ make
make install # optional
```
This will build bitcoin-qt as well if the dependencies are met.
This will build litecoin-qt as well if the dependencies are met.
Dependencies
---------------------
@ -50,7 +50,7 @@ System requirements
--------------------
C++ compilers are memory-hungry. It is recommended to have at least 1 GB of
memory available when compiling Bitcoin Core. With 512MB of memory or less
memory available when compiling Litecoin Core. With 512MB of memory or less
compilation will take much longer due to swap thrashing.
Dependency Build Instructions: Ubuntu & Debian
@ -94,7 +94,7 @@ Optional:
Dependencies for the GUI: Ubuntu & Debian
-----------------------------------------
If you want to build Bitcoin-Qt, make sure that the required packages for Qt development
If you want to build Litecoin-Qt, make sure that the required packages for Qt development
are installed. Either Qt 4 or Qt 5 are necessary to build the GUI.
If both Qt 4 and Qt 5 are installed, Qt 4 will be used. Pass `--with-gui=qt5` to configure to choose Qt5.
To build without GUI pass `--without-gui`.
@ -111,12 +111,12 @@ libqrencode (optional) can be installed with:
sudo apt-get install libqrencode-dev
Once these are installed, they will be found by configure and a bitcoin-qt executable will be
Once these are installed, they will be found by configure and a litecoin-qt executable will be
built by default.
Notes
-----
The release is built with GCC and then "strip bitcoind" to strip the debug
The release is built with GCC and then "strip litecoind" to strip the debug
symbols, which reduces the executable size by about 90%.
@ -145,10 +145,10 @@ Berkeley DB
It is recommended to use Berkeley DB 4.8. If you have to build it yourself:
```bash
BITCOIN_ROOT=$(pwd)
LITECOIN_ROOT=$(pwd)
# Pick some path to install BDB to, here we create a directory within the bitcoin directory
BDB_PREFIX="${BITCOIN_ROOT}/db4"
# Pick some path to install BDB to, here we create a directory within the litecoin directory
BDB_PREFIX="${LITECOIN_ROOT}/db4"
mkdir -p $BDB_PREFIX
# Fetch the source and verify that it is not tampered with
@ -163,8 +163,8 @@ cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install
# Configure Bitcoin Core to use our own-built instance of BDB
cd $BITCOIN_ROOT
# Configure Litecoin Core to use our own-built instance of BDB
cd $LITECOIN_ROOT
./configure (other args...) LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"
```
@ -181,7 +181,7 @@ If you need to build Boost yourself:
Security
--------
To help make your bitcoin installation more secure by making certain attacks impossible to
To help make your litecoin installation more secure by making certain attacks impossible to
exploit even if a vulnerability is found, binaries are hardened by default.
This can be disabled with:
@ -205,7 +205,7 @@ Hardening enables the following features:
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
scanelf -e ./bitcoin
scanelf -e ./litecoin
The output should contain:
TYPE
@ -213,13 +213,13 @@ Hardening enables the following features:
* Non-executable Stack
If the stack is executable then trivial stack based buffer overflow exploits are possible if
vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack
vulnerable buffers are found. By default, litecoin should be built with a non-executable stack
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
and uses a compiler extension which requires an executable stack, it will silently build an
executable without the non-executable stack protection.
To verify that the stack is non-executable after compiling use:
`scanelf -e ./bitcoin`
`scanelf -e ./litecoin`
the output should contain:
STK/REL/PTL
@ -229,7 +229,7 @@ Hardening enables the following features:
Disable-wallet mode
--------------------
When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in
When the intention is to run only a P2P node without a wallet, litecoin may be compiled in
disable-wallet mode with:
./configure --disable-wallet

Loading…
Cancel
Save