Getting the same error while creating bitcoin on Mac OS X

So, I am in the docs for creating bitcoind for OS X: https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md and every time I try to make the same error and build. Here are the steps I am taking:

brew install autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt5

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin

./autogen.sh
./configure --with-gui=qt5
make

      

and here is the error i'm getting:

OBJCXXLD qt/bitcoin-qt
clang: error: unknown argument: '-framework QtNetwork'
clang: error: unknown argument: '-framework QtWidgets'
clang: error: unknown argument: '-framework QtGui'
clang: error: unknown argument: '-framework QtCore'
clang: error: unknown argument: '-framework QtDBus'
clang: error: unknown argument: '-framework QtCore'
make[2]: *** [qt/bitcoin-qt] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

      

I have more than a day to work. I have manually downloaded open source Qt here: http://www.qt.io/download-open-source/ , I have qt and qt5 installed via brew, etc. I am not familiar with C / C ++ and compile the code and have no idea what to do next. thanks in advance

+3


source to share


4 answers


First of all, try creating bitcoind without a GUI:



make clean
./configure --without-gui
make

      

+2


source


I had the same error ... I fixed it by manually editing the MakeFile

The problem lies in the definitions QT_DBUS_LIBS, QT_LIBS and QT_TEST_LIBS

below ... the -F flag and -framework

is what is causing the problem.

QT_DBUS_LIBS = -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtDBus -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtCore 
QT_LIBS = -F/usr/local/Cellar/qt5/5.5.0/lib/QtNetwork -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtWidgets -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtGui -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtCore  -framework Foundation -framework ApplicationServices -framework AppKit
QT_TEST_LIBS = -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtTest -F/usr/local/Cellar/qt5/5.5.0/lib -framework\ QtCore 

      

Replace those library names with direct library links ... you must first find your Qt library path, mine was in / usr / local / Cellar / qt 5 / 5.5.0 / lib

QT_DBUS_LIBS = /usr/local/Cellar/qt5/5.5.0/lib/QtDBus.framework/QtDBus /usr/local/Cellar/qt5/5.5.0/lib/QtCore.framework/QtCore
QT_LIBS = /usr/local/Cellar/qt5/5.5.0/lib/QtNetwork.framework/QtNetwork /usr/local/Cellar/qt5/5.5.0/lib/QtWidgets.framework/QtWidgets /usr/local/Cellar/qt5/5.5.0/lib/QtGui.framework/QtGui /usr/local/Cellar/qt5/5.5.0/lib/QtCore.framework/QtCore  -framework Foundation -framework ApplicationServices -framework AppKit
QT_TEST_LIBS = /usr/local/Cellar/qt5/5.5.0/lib/QtTest.framework/QtTest /usr/local/Cellar/qt5/5.5.0/lib/QtCore.framework/QtCore

      



after changes do

make clean
make

      

Works great!

Run bitcoin-qt

, which is the bitcoin core GUI from src \ qt directory

Good luck! Remember, if you run again configure

, these changes will be overwritten.

+1


source


I passed this error by making changes (needs to be redone after each. / Configure) to Makefile and src / Makefile with

1: stripping multiple Qtxxxx's '-framework' as they are redundant with '-F path / to / qt /' on the same line.

2: replacing the rest of the '-fragmentation with some core Apple libraries with' -F / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.10.sdk / System / Library / Frameworks'

But in the end, I still gave up on the qt gui because then I ended up in the exact problem like in the link below which seems like qt5 from homebrew is not for x64 and I am too lazy to follow the hack here

https://github.com/bitcoin/bitcoin/issues/5728

0


source


I had the same problem and solved it by switching to qt4 and compiling without GUI:

brew install autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt4

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin

./autogen.sh
./configure
make

      

0


source







All Articles