I've been trying to upgrade to the 11.1 version in Ubuntu 16.04 but I'm getting the fun "must build with position-independent code" error.
After: make -j4:
~~~~~~~~~~~~~~~~~~~~
[...]
CXX qt/qt_libskidooqt_a-bitcoinunits.o
In file included from /usr/include/x86_64-linux-gnu/qt5/QtGui/qwindowdefs.h:37:0,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qwidget.h:37,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qframe.h:37,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qlabel.h:37,
from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QLabel:1,
from qt/bitcoingui.h:14,
from qt/bitcoingui.cpp:5:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1067:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
^
[...]
Makefile:4075: recipe for target 'qt/qt_libskidooqt_a-bitcoinunits.o' failed
make[2]: *** [qt/qt_libskidooqt_a-bitcoinunits.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:4047: recipe for target 'qt/qt_libskidooqt_a-bitcoinamountfield.o' failed
make[2]: *** [qt/qt_libskidooqt_a-bitcoinamountfield.o] Error 1
Makefile:4061: recipe for target 'qt/qt_libskidooqt_a-bitcoingui.o' failed
make[2]: *** [qt/qt_libskidooqt_a-bitcoingui.o] Error 1
Makefile:5454: recipe for target 'qt/qt_skidoo_qt-bitcoin.o' failed
make[2]: *** [qt/qt_skidoo_qt-bitcoin.o] Error 1
make[2]: Leaving directory '/media/qishtu31/ExtraDrive1/skidoo/src'
Makefile:6234: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/media/qishtu31/ExtraDrive1/skidoo/src'
Makefile:632: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~
My configure line is currently as follows: "./configure --with-gui=qt5 --with-incompatible-bdb --with-pic".
In an effort to circumvent this and/or interpret the part in the build-unix.md documentation file where it has the instructions (inherited from BTC):
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Always use absolute paths to configure and compile bitcoin and the dependencies, for example, when specifying the the path of the dependency:
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
Here BDB_PREFIX must absolute path - it is defined using $(pwd) which ensures the usage of the absolute path."
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I followed the steps here: (
https://altcoinkingdom.com/compile-bitcoin-core-from-source-on-ubuntu-16-04.html ) --downloading the berkeleyDB 4.8 version, etc up to the line:
"./configure CPPFLAGS="-I${BDB_PREFIX}/include/ -O2“ LDFLAGS=”-L${BDB_PREFIX}/lib/" —with-gui"
which produced errors:
configure: error: in `/[directories]/skidoo':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
(the config.log has:
...gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
configure:3764: $? = 0
configure:3753: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:3764: $? = 1
configure:3753: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'
g++: fatal error: no input files
compilation terminated.
...
So with or without BerkeleyDB 4.8... I was wondering if there are some parameters I can pass at the terminal (as environment variables) before autogen and configure (or to configure) to get this built.
Perhaps it is some permutation using export in Ubuntu similar to:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} # which adds /usr/local/cuda-8.0/bin to the PATH environment variable
or
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64 # which adds /usr/local/cuda-8.0/lib64 to LD_LIBRARY_PATH and is followed by:
sudo ldconfig # needed to implement revised LD_LIBRARY_PATH
If I have to go in and adjust several files to make it work I'm fine with doing that too. (I'm currently at step 8 of the guide
https://cryptocurrencytalk.com/topic/2023-quick-guide-how-to-rebuild-a-qt-wallet-if-you-lost-your-coins/ that I posted earlier).
Thank you in advance for any help to get this thing built; hopefully it's not too elaborate a fix. There is no issues tab on the github page so this seemed the place (rather than Ubuntu forums that wouldn't be helpful with altcoin info).