Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bitsta on January 26, 2014, 02:42:47 AM



Title: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 02:42:47 AM
Hi,

i keep getting 2 errors when i try to make an executable QT application.

so after running qmake bitcoin-qt.pro and make -f Makefile i get this output:

Code:
[b]src/sync.h:62:17: error: expected expression
    void lock() EXCLUSIVE_LOCK_FUNCTION()[/b]
                ^
src/threadsafety.h:23:92: note: expanded from macro 'EXCLUSIVE_LOCK_FUNCTION'
#define EXCLUSIVE_LOCK_FUNCTION(...)    __attribute__ ((exclusive_lock_function(__VA_ARGS__)))
                                                                                           ^
In file included from src/qt/bitcoin.cpp:13:
In file included from src/init.h:8:
In file included from src/wallet.h:8:
In file included from src/walletdb.h:8:
In file included from src/db.h:8:
[b]src/sync.h:67:19: error: expected expression
    void unlock() UNLOCK_FUNCTION()[/b]
                  ^
src/threadsafety.h:27:84: note: expanded from macro 'UNLOCK_FUNCTION'
#define UNLOCK_FUNCTION(...)            __attribute__ ((unlock_function(__VA_ARGS__)))
                                                                                   ^
[b]2 errors generated.[/b]
make: *** [build/bitcoin.o] Error 1


is it a known issue? hope you can help.
I ll pay 0.02 BTC as BOUNTY for the information which leads to successfull compilation.

thank you and all the best,
bitsta




Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 10:05:04 PM
that issue above is solved but i still get an error:


Code:
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

Bounty doubled to 0.04BTC for the information which leads to successfull qt-build.


thanks in advance
bitsta


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: elbandi on January 26, 2014, 10:10:35 PM
litecoin source is compiling for me any issue.

which os/version/arch do you use?


Title: This message was too old and has been purged
Post by: Evil-Knievel on January 26, 2014, 10:20:37 PM
This message was too old and has been purged


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 10:29:35 PM
litecoin source is compiling for me any issue.

which os/version/arch do you use?

yes i can also compile any scrypt based coin without any issues.

i use OSX 10.7.5 and try the qt make for zetacoin (latest source).


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 10:32:41 PM
Open your .pro file in the QT editor, and add this line:

Code:
CONFIG -= x86_64


Bounty is appreciated to: 1MFwoNsmEFesZfQgNWJjbVJseNT4GZMSq6

i tried that but still got the same error.


Title: This message was too old and has been purged
Post by: Evil-Knievel on January 26, 2014, 10:34:48 PM
This message was too old and has been purged


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 10:59:17 PM
Open your .pro file in the QT editor, and add this line:

Code:
CONFIG -= x86_64


Bounty is appreciated to: 1MFwoNsmEFesZfQgNWJjbVJseNT4GZMSq6

i tried that but still got the same error.

Could you post the exact symbols, that are not being found? There must be some longer, more cryptic message.


http://oi41.tinypic.com/vinxur.jpg


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: Cytality on January 26, 2014, 11:16:09 PM
You're missing an object file when you run "gcc -o ..."


Title: This message was too old and has been purged
Post by: Evil-Knievel on January 26, 2014, 11:19:32 PM
This message was too old and has been purged


Title: Re: [BOUNTY] Error when compiling QT-wallet
Post by: bitsta on January 26, 2014, 11:48:21 PM
Aaaaaaah youre compiling on mac! now the issue is clear.

There are two implementations of the standard C++ library available on OS X: libstdc++ and libc++. They are not binary compatible and libMLi3 requires libstdc++.
On 10.8 and earlier libstdc++ is chosen by default, on 10.9 libc++ is chosen by default. To ensure compatibility with whatever fails, we need to choose libstdc++ manually.
To do this, add -stdlib=lib(std)c++ to the linking command.

Could you try adding those two lines to your .pro File?

Code:
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -stdlib=libc++

if this doesnt work try

Code:
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -stdlib=libstdc++

Always clean and rerun qmake before compiling.


doesn't work...