C++ Basic Build Retroshare A Secure Communications Platform From-Source-Steps
C++ Basic Build Retroshare A Secure Communications Platform From-Source-Steps
[Important Note] Read through this entire help guide before proceeding to build
Retroshare06. I urge a new user to not simply glance at one section here and plow
ahead but instead look over the entire document first before proceeding with your
attempt to compile Retroshare06 from the newest source code on your system.
First you need to install the packages needed for compiling RetroShare.
Ubuntu 14.04 LTS
Debian/Ubuntu/Raspbian dependancys
Centos/Redhat
NOTE: Building RPMs should NEVER be done with the root user. It should ALWAYS be
done with an unprivileged user. Building RPMs as root might damage your system. You
have been warned.
The build process is very similar to that for Debian/Ubuntu, except for:
NOTE: Please advise of any issues with this information via message.
Additional Dependencies
To build sqlcipher, you must have at least TCL 8.5 with the development files
installed, as it is used by the Makefiles for generating code.
sqlcipher
You will need sqlcipher library for encrypting the gxs local storage.
[You can optionally build Retroshare linked to the sqlite front end]
[The sqlite build switch is exampled in the build commands]
qmake CONFIG+=NO_SQLCIPHER
See the Linux Build Steps I outline later below for sqlite builds
Usually you need to compile sqlcipher on your own but if your distro provides a
prebuild version or a manual (AUR for Arch users) you can use this version, too.
See Arch Linux (AUR)
Building sqlcipher
mkdir ~/lib
Then:
cd ~/lib/
git clone https://github.com/sqlcipher/sqlcipher.git
cd sqlcipher/
./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto"
make -j2
sudo make install
Make a note of the directory where sqlcipher is installed and add the LIBDIR
according to the directions given in the installation. This can be done as follows:
cd /etc/ld.conf.so.d
sudo touch libc.conf
sudo vim libc.conf
/usr/local/lib
There is a packet in the AUR you can use. The -git version seems not to work.
If you decide to use it you'll have to edit some files since the link to the self
compiled version is hardcoded and an installed version will not be detected:
~/retroshare/retroshare-gui/src/retroshare-gui.pro
~/retroshare/retroshare-nogui/src/retroshare-nogui.pro
(If you don't need the nogui version you don't need to edit it)
Search for
# We need a explicit path here, to force using the home version of sqlite3 that
really encrypts the database.
LIBS += ../../../lib/sqlcipher/.libs/libsqlcipher.a
LIBS += -lsqlcipher
LIBS += /usr/lib/libsqlcipher.so
====================================================================
*** Easy C++ Compile of the Retroshare 0.6 Source Code ***
In the above example the source code is placed into the retroshare06 folder
$ cd retroshare06
$ git pull
$ cd ~/
$ cd ~/retroshare06/retroshare-gui/src
$ ./version_detail.sh
$ cd ~/retroshare06/libretroshare/src
$ ./version_detail.sh
$ cd ~/retroshare06
[Note] With all the merges its worth the extra 1 minute compile time to apply the
make distro clean command first. Many skip this step then the build occassionally
fails due to a wacked source coding merge.
$ make distclean #Optional but worth extra 1 min compile time to use
Some with multiple core CPU's want to use as many threads as they can, If you use a
single core CPU, you use the naked make command for maximum stability
Those with multiple cores would determine the max thread variable then issue the
custom build command if they wanted quicker compile times
To share your new build binary you should strip the compiled build of its attached
librarys for a pure binary, similar OS/Distros supply the librarys fine so its
simply a file size saver.
$ cd ~/retroshare06/retroshare-gui/src
$ cp RetroShare06 ~/
$ cd ~/
$ strip RetroShare06
$ mv RetroShare06 NEWBUILDNAME
How to determine the exact date of the last commit added to your build
How to obtain the last commit hash snippet for your build filename
If its a sqlite linked custom build you are sharing, absolutely include that in
your filename and make a effort to mention that is SQLITE linked. If its purposely
built for Qt4 installed systems then mention that in your filename.
Lacking Retroshare06 filenames
Example RetroShare-0.6.0-20160403-setupQt4.exe
Often multiple source code commits are added on any given day. Lazy builders only
list the last commit date omitting the last commit hash snippet value. This gives
the end-users a guessing game as to what that build actually contains. If you are
accomplished enough to build Retroshare06 files to share then you should be
compentant enough to determine and add the last commit hash snippet to the filename
showing exactly what is contained in your new Retroshare06 build package.
Should be RetroShare-0.6.0-20160403-9ced517-Windows-Qt4.exe
Lazy builders using the date they compiled a Retroshare06 build they are sharing
instead of the date the last commit was added do the end-users a great disservice.
The compile date could be days after whatever was included in that build. Don't be
lazy, obtain and use the last commit date in the Retroshare source to include in
the filename. The above example was compiled on April 5th with only the April 3rd
source code updates included.
===================================================================
UnixCompile http://retroshare.sourceforge.net/wiki/index.php/UnixCompile