Having a build error...
-
Hey Team,
I am getting the following build error when trying to compile the latest 0.9.6.1 branch -
CXX libbitcoinqt_a-qimagesource.o In file included from qimagesource.h:6:0, from qimagesource.cpp:1: /usr/local/include/zxing/LuminanceSource.h: In member function 'virtual zxing::ArrayRef<char> QImageLuminanceSource::getMatrix() const': /usr/local/include/zxing/LuminanceSource.h:31:13: error: 'const int zxing::LuminanceSource::width' is private const int width; ^ qimagesource.cpp:19:29: error: within this context ArrayRef<char> mymatrix(width*height); ^ In file included from qimagesource.h:6:0, from qimagesource.cpp:1: /usr/local/include/zxing/LuminanceSource.h:32:13: error: 'const int zxing::LuminanceSource::height' is private const int height; ^ qimagesource.cpp:19:35: error: within this context ArrayRef<char> mymatrix(width*height); ^ In file included from qimagesource.h:6:0, from qimagesource.cpp:1: /usr/local/include/zxing/LuminanceSource.h:32:13: error: 'const int zxing::LuminanceSource::height' is private const int height; ^ qimagesource.cpp:20:25: error: within this context for (int y = 0; y < height; y++) ^ In file included from qimagesource.h:6:0, from qimagesource.cpp:1: /usr/local/include/zxing/LuminanceSource.h:31:13: error: 'const int zxing::LuminanceSource::width' is private const int width; ^ qimagesource.cpp:22:29: error: within this context for (int x = 0; x < width; x++) { ^ In file included from qimagesource.h:6:0, from qimagesource.cpp:1: /usr/local/include/zxing/LuminanceSource.h:31:13: error: 'const int zxing::LuminanceSource::width' is private const int width; ^ qimagesource.cpp:23:24: error: within this context mymatrix[y*width+x] = qGray(image.pixel(x, y)); ^ Makefile:2071: recipe for target 'libbitcoinqt_a-qimagesource.o' failed make[5]: *** [libbitcoinqt_a-qimagesource.o] Error 1
I am running this with the following Jenkinsfile config - Should help you see which options I was using:
withDockerContainer(args: "-u root", image: "ubuntu:16.04") { stage("Setup Docker Box") { sh "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8842ce5e" sh "echo \"deb http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial main\" > /etc/apt/sources.list.d/bitcoin.list" sh "apt-get update" sh "apt-get install -y build-essential libtool autotools-dev autoconf libssl-dev git-core libboost-all-dev libdb4.8-dev libdb4.8++-dev qtbase5-dev libprotobuf-dev protobuf-compiler libqrencode-dev libqt5opengl5-dev qttools5-dev-tools libminiupnpc-dev pkg-config cmake gawk bsdmainutils" sh "apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" sh "mkdir zxing && cd zxing && git clone https://github.com/glassechidna/zxing-cpp.git" sh "cd zxing/zxing-cpp && mkdir build" sh "cd zxing/zxing-cpp/build && export CXXFLAGS=\"-fPIC\" && cmake -G \"Unix Makefiles\" -DCMAKE_CXX_FLAGS=\"-fPIC -D_GLIBCXX_USE_CXX11_ABI=1\" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_STANDARD_REQUIRED=ON .." sh "cd zxing/zxing-cpp/build && make && make install" } stage("autogen and configure") { sh "./autogen.sh && ./configure --without-qrcode" } stage("Build") { sh "make" } stage("Run Tests") { sh "src/test/test_bitcoin" sh "src/qt/test/test_feathercoin-qt" } stage("Strip Binary") { sh "strip src/feathercoind" sh "strip src/feathercoin-cli" sh "strip src/qt/feathercoin-qt" } }
I get the error on the Build step, where I am just running make.
Thanks for any help!
-
There is a known problem with the libzxing.
It is used to generated qr codes and read qr codes from image files.
A workaround is to run configure with ‘–qr-code=no’
I simply didn’t find the time to dig into that little problem yet.
-
@Cookieboy
Locate and edit the LuminanceSource.h file in /usr/local/include/zxing and change line 30 to“public:”
instead of“private:”
Then try your build again.
-
Re : Current FTC admin and development information
Over the years the forum has been redesigned to be more amenable to allowing members to know or get involved in development projects. It has always been good at allowing moderators to give support. It is more tricky with development as there is knowledge barriers, so we’ve tried to pull information together.
We are also starting to document the full “fork process and FTC variables” so the move from 0.9.6 to 0.13 can be more transparent. @cookieboy is already helping with an auto build system, which will release time from that, to work on catching up with head
This is where the FTC build information is stored : https://github.com/FeatherCoin/Feathercoin/tree/0.9.6.1/doc
It covers build problems and ways round including the issue LuminanceSource.h.
This is the “current” development thread, for this type of issue and minor bug fix, development changes / release info for forum members and contributers to keep up to speed. for 0.9.6.1.
http://forum.feathercoin.com/topic/8798/dev-feathercoin-0-9-6-1-bug-fix-issues-notes-for-0-11
I compiled a Wallet and Feathercoin Guide, which could also be updated to show " development procedures", so that more members can get involved.
-
Sorry I missed this in the docs. I am good to go. Thanks again.
-
@Cookieboy said in Having a build error...:
Sorry I missed this in the docs. I am good to go. Thanks again.
Glad to hear it!
Marked as solved.