firo icon indicating copy to clipboard operation
firo copied to clipboard

osx build fail

Open bumbacoin opened this issue 10 years ago • 13 comments

this error on OSX using qt 5.3.2 also qt 4.8.6

../src/serialize.h:600:5: error: call to 'Serialize' is ambiguous Serialize(os, item.second, nType, nVersion); ^~~~~~~~~ ../src/serialize.h:1075:11: note: in instantiation of function template specialization 'Serialize<CDataStream, std::basic_string, libzerocoin::CoinDenomination>' requested here ::Serialize(this, obj, nType, nVersion); ^ ../src/db.h:155:15: note: in instantiation of function template specialization 'CDataStream::operator<<std::pair<std::basic_string<char, libzerocoin::CoinDenomination> >' requested here ssKey << key; ^ ../src/walletdb.cpp:68:12: note: in instantiation of function template specialization 'CDB::Writestd::pair<std::basic_string<char, libzerocoin::CoinDenomination>, libzerocoin::Accumulator>' requested here return Write(make_pair(std::string("zcaccumulator"), denomination), accumulator); ^ ../src/serialize.h:125:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, signed int a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:120:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, char a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:121:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, signed char a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:122:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, unsigned char a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:123:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, signed short a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:124:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, unsigned short a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:126:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, unsigned int a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:127:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, signed long a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:128:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, unsigned long a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:129:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, int64 a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:130:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, uint64 a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:131:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, float a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:132:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, double a, int, int=0) { WRITEDATA(s, a); } ^ ../src/serialize.h:149:39: note: candidate function [with Stream = CDataStream] template inline void Serialize(Stream& s, bool a, int, int=0) { char f=a; WRITEDATA(s, f); } ^ ../src/serialize.h:432:13: note: candidate function [with Stream = CDataStream, T = libzerocoin::CoinDenomination] inline void Serialize(Stream& os, const T& a, long nType, int nVersion) ^ 4 warnings and 1 error generated. make: ** [build/walletdb.o] Error 1

bumbacoin avatar Oct 20 '16 15:10 bumbacoin

+1 have the same

przeor avatar Oct 24 '16 08:10 przeor

@ocminer can you help there? :)

przeor avatar Oct 24 '16 09:10 przeor

unfortunately not, i'm only building on linux

ocminer avatar Oct 24 '16 09:10 ocminer

thanks for quick reponse @ocminer , I am currently giving a try on an EC2 Linux 14.04 :-) I hope there won't be problems as on the os x :)

przeor avatar Oct 24 '16 09:10 przeor

btw. @ocminer the https://github.com/zcoinofficial/zcoin/blob/master/doc/build-unix.md is up to date?

przeor avatar Oct 24 '16 09:10 przeor

yup, it should be, at least it worked for me :)

ocminer avatar Oct 24 '16 09:10 ocminer

do you know if I need to gave GCC 4.3.3 or the higher: gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 shall be also fine?

ITS: 4.8.4

przeor avatar Oct 24 '16 09:10 przeor

lol, no idea, all I did was install ubuntu xenial with the default packages and built the coin there :)

ocminer avatar Oct 24 '16 09:10 ocminer

I've got it working on MacOS Sierra. The main issue is that Qt4 is no longer supported directly via brew it seems. After you install the normal listed dependencies, run: brew install cartr/qt4/qt brew install berkeley-db4 brew link berkeley-db4 --force --overwrite qmake USE_UPNP=- -spec /usr/local/Cellar/qt/4.8.7_2/mkspecs/macx-xcode -o Makefile zcoin.pro make A zcoin-qt.app should appear in the directory that you can run.

kiyui avatar Nov 22 '16 15:11 kiyui

@TimurKiyivinski followed your step, still the same error...

ghost avatar Nov 23 '16 07:11 ghost

I got the issue. The issue is that the CoinDenomination defined as enum, the mac compiler can't resolve it to int. So in the walletdb.cpp just cast it explicitly to int, and the problem resolved.

ghost avatar Nov 23 '16 07:11 ghost

@Powercoin I tried on the latest master using XCode and Clang. Perhaps you can try the latest DMG image to see if the build works?

kiyui avatar Nov 23 '16 07:11 kiyui

should be fixed already.

aizensou avatar Jan 16 '17 23:01 aizensou