Bitcoin Forum
November 14, 2024, 01:50:32 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: paying 0.1btc for help compiling macos  (Read 1804 times)
lordoliver (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 1020

expect(brain).toHaveBeenUsed()


View Profile
May 25, 2014, 01:36:14 PM
 #1

i need help compiling my new wallet on mac.
It's a normal fork and i get the following error:

Code:
In file included from src/netbase.h:10:
src/serialize.h:827:10: error: class member cannot be redeclared
    void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
         ^
src/serialize.h:814:10: note: previous declaration is here
    void insert(iterator it, const_iterator first, const_iterator last)
         ^
src/serialize.h:827:10: error: redefinition of 'insert'
    void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
         ^
src/serialize.h:814:10: note: previous definition is here
    void insert(iterator it, const_iterator first, const_iterator last)
         ^
In file included from src/qt/bitcoin.cpp:11:
In file included from src/init.h:8:
In file included from src/wallet.h:19:
In file included from src/walletdb.h:8:
src/db.h:14:10: fatal error: 'db_cxx.h' file not found
#include <db_cxx.h>

i need help to solve that problem and pay 0.1BTC for the one, who helps me out with that.
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
May 25, 2014, 02:40:33 PM
 #2

Not a Mac user, but it looks like it can't find the db_cxx.h

Maybe that helps? https://groups.google.com/forum/#!topic/twister-dev/YEkcPGAHdLo

Looks like a path issue, eg it cannot detect where the .h is located

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
May 25, 2014, 02:42:00 PM
 #3

Actually this one might be better: https://github.com/kittehcoin/kittehcoin/issues/4

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
lordoliver (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 1020

expect(brain).toHaveBeenUsed()


View Profile
May 25, 2014, 09:04:22 PM
 #4

Actually this one might be better: https://github.com/kittehcoin/kittehcoin/issues/4

ok, that didn't help me really out but I brought me a little further.
I added in .pro file:
Code:
...
BDB_INCLUDE_PATH=/opt/local/include/db48
BDB_LIB_PATH=/opt/local/lib/db48
...

They didn't post, what they changed about the serialze error, so I searched myself again and found

src/serialize.h:
Code:
...
#if !defined(MAC_OSX) // added this line
    void insert(iterator it, const_iterator first, const_iterator last)
...

but now i am getting the next error. it is really annoying (I fixed already a few before):
Code:
local/lib -o build/net.o src/net.cpp
src/net.cpp:60:1: error: unknown type name 'array'
array<int, THREAD_MAX> vnThreadsRunning;
^
src/net.cpp:60:6: error: expected unqualified-id
array<int, THREAD_MAX> vnThreadsRunning;
     ^
KaChingCoinDev
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250


View Profile
May 25, 2014, 09:06:48 PM
 #5

Here is your error:

Code:
src/db.h:14:10: fatal error: 'db_cxx.h' file not found


Which means you do not have berkeley DB Installed.

Fix:
Code:
sudo port install db48

BTC Address:

1BkChCzcP6kfx3PrVi2hz6exM3KucavEpT
lordoliver (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 1020

expect(brain).toHaveBeenUsed()


View Profile
May 25, 2014, 09:35:05 PM
 #6

Here is your error:

Code:
src/db.h:14:10: fatal error: 'db_cxx.h' file not found


Which means you do not have berkeley DB Installed.

Fix:
Code:
sudo port install db48

BTC Address:

1BkChCzcP6kfx3PrVi2hz6exM3KucavEpT

wrong, it was installed... but the path was wrong
but that is the smallest problem as you can see
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
May 25, 2014, 09:48:50 PM
 #7

but now i am getting the next error. it is really annoying (I fixed already a few before):
Code:
local/lib -o build/net.o src/net.cpp
src/net.cpp:60:1: error: unknown type name 'array'
array<int, THREAD_MAX> vnThreadsRunning;
^
src/net.cpp:60:6: error: expected unqualified-id
array<int, THREAD_MAX> vnThreadsRunning;
     ^
Maybe this gets you another step further:
Quote
adding in src/makefile.osx
# osx 10.9 has changed the stdlib default to libc++. To prevent some link error, you may need to use libstdc++
CFLAGS += -stdlib=libstdc++
Source: https://bitcointalk.org/index.php?topic=403936.msg4860134#msg4860134

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
lordoliver (OP)
Legendary
*
Offline Offline

Activity: 1666
Merit: 1020

expect(brain).toHaveBeenUsed()


View Profile
May 26, 2014, 11:15:59 AM
 #8

but now i am getting the next error. it is really annoying (I fixed already a few before):
Code:
local/lib -o build/net.o src/net.cpp
src/net.cpp:60:1: error: unknown type name 'array'
array<int, THREAD_MAX> vnThreadsRunning;
^
src/net.cpp:60:6: error: expected unqualified-id
array<int, THREAD_MAX> vnThreadsRunning;
     ^
Maybe this gets you another step further:
Quote
adding in src/makefile.osx
# osx 10.9 has changed the stdlib default to libc++. To prevent some link error, you may need to use libstdc++
CFLAGS += -stdlib=libstdc++
Source: https://bitcointalk.org/index.php?topic=403936.msg4860134#msg4860134

ok, i was trying that yesterday already, but it didn't workout. I looked at it a little closer today and found out, that of course this file won'T help as it is not called with qmake or make.

so i added this two lines in .pro file

Code:
QMAKE_CXXFLAGS += -msse2 -w  -stdlib=libstdc++
QMAKE_CFLAGS += -msse2 -stdlib=libstdc++ -w

now it was really compiling a lot, but then...
next error.... kidding me?

Code:
/usr/bin/clang -c -pipe -msse2 -stdlib=libstdc++ -w -O2 -arch i386 -Wall -W -pthread -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -D__NO_SYSTEM_INCLUDES -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DHAVE_BUILD_INFO -DMAC_OSX -DMSG_NOSIGNAL=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -Ibuild -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -Isrc -Isrc/json -Isrc/qt -IC:/deps/boost -I/opt/local/include/db48 -Ic:/deps/ssl/include -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -Ibuild -F/opt/local/Library/Frameworks -F/opt/local/lib -o build/scrypt-x86.o src/scrypt-x86.S
src/scrypt-x86.S:348:9: error: invalid alignment value
 .align 32
        ^
src/scrypt-x86.S:356:9: error: invalid alignment value
 .align 32
        ^
src/scrypt-x86.S:632:9: error: invalid alignment value
 .align 32
        ^
make: *** [build/scrypt-x86.o] Error 1

so i found this to solve the problem:
https://bitcointalk.org/index.php?topic=205017.msg3933996#msg3933996

but still....
now i have the problem, that it doesn't find the boost libraries... its really a mess...
can anybody look at that maybe?

Code:
/usr/bin/clang++ -headerpad_max_install_names -fstack-protector-all --param ssp-buffer-size=1 -arch i386 -pthread -o Xop-Qt.app/Contents/MacOS/Xop-Qt build/macdockiconhandler.o build/bitcoin.o build/bitcoingui.o build/transactiontablemodel.o build/addresstablemodel.o build/optionsdialog.o build/sendcoinsdialog.o build/addressbookpage.o build/signverifymessagedialog.o build/aboutdialog.o build/editaddressdialog.o build/bitcoinaddressvalidator.o build/alert.o build/version.o build/sync.o build/util.o build/netbase.o build/key.o build/script.o build/main.o build/init.o build/net.o build/irc.o build/checkpoints.o build/addrman.o build/db.o build/walletdb.o build/clientmodel.o build/guiutil.o build/transactionrecord.o build/optionsmodel.o build/monitoreddatamapper.o build/transactiondesc.o build/transactiondescdialog.o build/bitcoinstrings.o build/bitcoinamountfield.o build/wallet.o build/keystore.o build/transactionfilterproxy.o build/transactionview.o build/walletmodel.o build/bitcoinrpc.o build/rpcdump.o build/rpcnet.o build/rpcmining.o build/rpcwallet.o build/rpcblockchain.o build/rpcrawtransaction.o build/overviewpage.o build/csvmodelwriter.o build/crypter.o build/sendcoinsentry.o build/qvalidatedlineedit.o build/bitcoinunits.o build/qvaluecombobox.o build/askpassphrasedialog.o build/protocol.o build/notificator.o build/qtipcserver.o build/rpcconsole.o build/coincontroldialog.o build/coincontroltreewidget.o build/noui.o build/kernel.o build/scrypt-x86.o build/scrypt-x86_64.o build/scrypt_mine.o build/pbkdf2.o build/moc_bitcoingui.o build/moc_transactiontablemodel.o build/moc_addresstablemodel.o build/moc_optionsdialog.o build/moc_sendcoinsdialog.o build/moc_addressbookpage.o build/moc_signverifymessagedialog.o build/moc_aboutdialog.o build/moc_editaddressdialog.o build/moc_bitcoinaddressvalidator.o build/moc_clientmodel.o build/moc_guiutil.o build/moc_optionsmodel.o build/moc_monitoreddatamapper.o build/moc_transactiondesc.o build/moc_transactiondescdialog.o build/moc_bitcoinamountfield.o build/moc_transactionfilterproxy.o build/moc_transactionview.o build/moc_walletmodel.o build/moc_overviewpage.o build/moc_csvmodelwriter.o build/moc_sendcoinsentry.o build/moc_qvalidatedlineedit.o build/moc_qvaluecombobox.o build/moc_askpassphrasedialog.o build/moc_coincontroldialog.o build/moc_coincontroltreewidget.o build/moc_notificator.o build/moc_rpcconsole.o build/moc_macdockiconhandler.o build/qrc_bitcoin.o   -F/opt/local/Library/Frameworks -F/opt/local/lib  -L/opt/local/include/db48 -L/opt/local/lib -L/opt/local/lib/db48 -Lc:/deps/ssl -ldb_cxx -lminiupnpc -framework Foundation -framework ApplicationServices -framework AppKit -lssl -lcrypto -ldb_cxx-4.8 -lboost_system-mgw46-mt-sd-1_55 -lboost_filesystem-mgw46-mt-sd-1_55 -lboost_program_options-mgw46-mt-sd-1_55 -lboost_thread-mgw46-mt-sd-1_55 -F/opt/local/Library/Frameworks -F/opt/local/lib -framework QtGui -framework QtCore 
clang: warning: argument unused during compilation: '-pthread'
ld: warning: directory not found for option '-Lc:/deps/ssl'
ld: library not found for -lboost_system-mgw46-mt-sd-1_55
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Xop-Qt.app/Contents/MacOS/Xop-Qt] Error 1
Bitsky
Hero Member
*****
Offline Offline

Activity: 576
Merit: 514


View Profile
May 26, 2014, 07:40:23 PM
 #9

On what version is the fork based?
Maybe the main client has a commit for these Mac issues that can be ported?

Bounty: Earn up to 68.7 BTC
Like my post? Feel free to drop a tip to 1BitskyZbfR4irjyXDaGAM2wYKQknwX36Y
unick
Sr. Member
****
Offline Offline

Activity: 504
Merit: 254


View Profile
July 08, 2014, 02:09:13 AM
Last edit: July 08, 2014, 02:48:07 AM by unick
 #10

but now i am getting the next error. it is really annoying (I fixed already a few before):
Code:
local/lib -o build/net.o src/net.cpp
src/net.cpp:60:1: error: unknown type name 'array'
array<int, THREAD_MAX> vnThreadsRunning;
^
src/net.cpp:60:6: error: expected unqualified-id
array<int, THREAD_MAX> vnThreadsRunning;
     ^
Maybe this gets you another step further:
Quote
adding in src/makefile.osx
# osx 10.9 has changed the stdlib default to libc++. To prevent some link error, you may need to use libstdc++
CFLAGS += -stdlib=libstdc++
Source: https://bitcointalk.org/index.php?topic=403936.msg4860134#msg4860134

ok, i was trying that yesterday already, but it didn't workout. I looked at it a little closer today and found out, that of course this file won'T help as it is not called with qmake or make.

so i added this two lines in .pro file

Code:
QMAKE_CXXFLAGS += -msse2 -w  -stdlib=libstdc++
QMAKE_CFLAGS += -msse2 -stdlib=libstdc++ -w

now it was really compiling a lot, but then...
next error.... kidding me?

Code:
/usr/bin/clang -c -pipe -msse2 -stdlib=libstdc++ -w -O2 -arch i386 -Wall -W -pthread -DQT_GUI -DBOOST_THREAD_USE_LIB -DBOOST_SPIRIT_THREADSAFE -DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN -D__NO_SYSTEM_INCLUDES -DUSE_UPNP=1 -DSTATICLIB -DUSE_IPV6=1 -DHAVE_BUILD_INFO -DMAC_OSX -DMSG_NOSIGNAL=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -Ibuild -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -Isrc -Isrc/json -Isrc/qt -IC:/deps/boost -I/opt/local/include/db48 -Ic:/deps/ssl/include -I/opt/local/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/opt/local/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/opt/local/include -Ibuild -F/opt/local/Library/Frameworks -F/opt/local/lib -o build/scrypt-x86.o src/scrypt-x86.S
src/scrypt-x86.S:348:9: error: invalid alignment value
 .align 32
        ^
src/scrypt-x86.S:356:9: error: invalid alignment value
 .align 32
        ^
src/scrypt-x86.S:632:9: error: invalid alignment value
 .align 32
        ^
make: *** [build/scrypt-x86.o] Error 1

so i found this to solve the problem:
https://bitcointalk.org/index.php?topic=205017.msg3933996#msg3933996

but still....
now i have the problem, that it doesn't find the boost libraries... its really a mess...
can anybody look at that maybe?

Code:
/usr/bin/clang++ -headerpad_max_install_names -fstack-protector-all --param ssp-buffer-size=1 -arch i386 -pthread -o Xop-Qt.app/Contents/MacOS/Xop-Qt build/macdockiconhandler.o build/bitcoin.o build/bitcoingui.o build/transactiontablemodel.o build/addresstablemodel.o build/optionsdialog.o build/sendcoinsdialog.o build/addressbookpage.o build/signverifymessagedialog.o build/aboutdialog.o build/editaddressdialog.o build/bitcoinaddressvalidator.o build/alert.o build/version.o build/sync.o build/util.o build/netbase.o build/key.o build/script.o build/main.o build/init.o build/net.o build/irc.o build/checkpoints.o build/addrman.o build/db.o build/walletdb.o build/clientmodel.o build/guiutil.o build/transactionrecord.o build/optionsmodel.o build/monitoreddatamapper.o build/transactiondesc.o build/transactiondescdialog.o build/bitcoinstrings.o build/bitcoinamountfield.o build/wallet.o build/keystore.o build/transactionfilterproxy.o build/transactionview.o build/walletmodel.o build/bitcoinrpc.o build/rpcdump.o build/rpcnet.o build/rpcmining.o build/rpcwallet.o build/rpcblockchain.o build/rpcrawtransaction.o build/overviewpage.o build/csvmodelwriter.o build/crypter.o build/sendcoinsentry.o build/qvalidatedlineedit.o build/bitcoinunits.o build/qvaluecombobox.o build/askpassphrasedialog.o build/protocol.o build/notificator.o build/qtipcserver.o build/rpcconsole.o build/coincontroldialog.o build/coincontroltreewidget.o build/noui.o build/kernel.o build/scrypt-x86.o build/scrypt-x86_64.o build/scrypt_mine.o build/pbkdf2.o build/moc_bitcoingui.o build/moc_transactiontablemodel.o build/moc_addresstablemodel.o build/moc_optionsdialog.o build/moc_sendcoinsdialog.o build/moc_addressbookpage.o build/moc_signverifymessagedialog.o build/moc_aboutdialog.o build/moc_editaddressdialog.o build/moc_bitcoinaddressvalidator.o build/moc_clientmodel.o build/moc_guiutil.o build/moc_optionsmodel.o build/moc_monitoreddatamapper.o build/moc_transactiondesc.o build/moc_transactiondescdialog.o build/moc_bitcoinamountfield.o build/moc_transactionfilterproxy.o build/moc_transactionview.o build/moc_walletmodel.o build/moc_overviewpage.o build/moc_csvmodelwriter.o build/moc_sendcoinsentry.o build/moc_qvalidatedlineedit.o build/moc_qvaluecombobox.o build/moc_askpassphrasedialog.o build/moc_coincontroldialog.o build/moc_coincontroltreewidget.o build/moc_notificator.o build/moc_rpcconsole.o build/moc_macdockiconhandler.o build/qrc_bitcoin.o   -F/opt/local/Library/Frameworks -F/opt/local/lib  -L/opt/local/include/db48 -L/opt/local/lib -L/opt/local/lib/db48 -Lc:/deps/ssl -ldb_cxx -lminiupnpc -framework Foundation -framework ApplicationServices -framework AppKit -lssl -lcrypto -ldb_cxx-4.8 -lboost_system-mgw46-mt-sd-1_55 -lboost_filesystem-mgw46-mt-sd-1_55 -lboost_program_options-mgw46-mt-sd-1_55 -lboost_thread-mgw46-mt-sd-1_55 -F/opt/local/Library/Frameworks -F/opt/local/lib -framework QtGui -framework QtCore 
clang: warning: argument unused during compilation: '-pthread'
ld: warning: directory not found for option '-Lc:/deps/ssl'
ld: library not found for -lboost_system-mgw46-mt-sd-1_55
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Xop-Qt.app/Contents/MacOS/Xop-Qt] Error 1

This is an old issue, but I do have the error: unknown type name array

have you found a solution for that?

as for your ld: warning: directory not found for option '-Lc:/deps/ssl'

make sure to comment out the windows section at the top of the pro file to build on mac...  notice the c:/ file structure on windows there ?


EDIT:
I managed to compile by changing

Code:
array<int, THREAD_MAX> vnThreadsRunning;

to
Code:
boost::array<int, THREAD_MAX> vnThreadsRunning;

in net.cpp

hope this helps someone

Awesome Explorers for Awesome Coins | Show some BTC love here: 1AAYAZgaz2me7hyumexUZzcyGRZEYtCx5C
HoboNickels: hbn.blockx.info | BottleCaps: cap.blockx.info | GrowthCoin: grw.blockx.info
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!