Bitcoin Forum
November 16, 2018, 09:33:58 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: « 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 [59] 60 »
  Print  
Author Topic: Building headless Bitcoin and Bitcoin-qt on Windows  (Read 416038 times)
mmortal03
Legendary
*
Offline Offline

Activity: 1739
Merit: 1003


View Profile
March 14, 2017, 01:44:39 AM
 #1161

Ok, I'm giving this a shot again after seven months. The following steps have gotten me the furthest, but I end up getting the following invalid pointer error when it starts to build the executables. My steps can likely be cleaned up, but I'm not going to try to do that until we know what works. Obviously, to run it on your system, change the user directory of "mmortal03" to your user name.

The invalid pointer error that I get is:
Code:
  CXXLD    bitcoind.exe
*** Error in `/usr/bin/x86_64-w64-mingw32-ld': free(): invalid pointer: 0x0000000001acce08 ***
collect2: error: ld terminated with signal 6 [Aborted], core dumped
make[2]: *** [bitcoind.exe] Error 1
make[2]: Leaving directory `/home/mmortal03/bitcoin/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mmortal03/bitcoin/src'
make: *** [all-recursive] Error 1


My steps to compile 64-bit Bitcoin Core on bash for Windows:

sudo apt-get update
sudo apt-get install -y build-essential libtool autotools-dev autoconf automake
sudo apt-get install -y libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
sudo apt-get install -y libqt5core5a pkg-config git
sudo apt-get install -y g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev curl
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/depends
make HOST=x86_64-w64-mingw32

cd /home/mmortal03/bitcoin/src/secp256k1
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32

cd /home/mmortal03/bitcoin/src/univalue
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32

cd /home/mmortal03/bitcoin
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no
make HOST=x86_64-w64-mingw32
1542404038
Hero Member
*
Offline Offline

Posts: 1542404038

View Profile Personal Message (Offline)

Ignore
1542404038
Reply with quote  #2

1542404038
Report to moderator
1542404038
Hero Member
*
Offline Offline

Posts: 1542404038

View Profile Personal Message (Offline)

Ignore
1542404038
Reply with quote  #2

1542404038
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542404038
Hero Member
*
Offline Offline

Posts: 1542404038

View Profile Personal Message (Offline)

Ignore
1542404038
Reply with quote  #2

1542404038
Report to moderator
1542404038
Hero Member
*
Offline Offline

Posts: 1542404038

View Profile Personal Message (Offline)

Ignore
1542404038
Reply with quote  #2

1542404038
Report to moderator
1542404038
Hero Member
*
Offline Offline

Posts: 1542404038

View Profile Personal Message (Offline)

Ignore
1542404038
Reply with quote  #2

1542404038
Report to moderator
mmortal03
Legendary
*
Offline Offline

Activity: 1739
Merit: 1003


View Profile
March 14, 2017, 02:54:54 AM
 #1162

I may have found a solution. I ran "make clean" to try things again, then added "--with-gnu-ld" to the configure line, and finally ran make, and the executables were built. Now I've got to test the executables, and test all of this on a fresh machine to see if it works from scratch.

make clean
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no --with-gnu-ld
make HOST=x86_64-w64-mingw32

Edit: Nope, "--with-gnu-ld" doesn't solve it on a fresh machine, so it must've been something additional. I had continued the make process all the way through by running make multiple times, then ran "make clean", then making again; that got me to the executables, for whatever reason. Testing more now. Possibly using the "-k" parameter on make will get you to the point where you can "make clean" and make it again, which would be absurd if that's what it takes.

Edit 2: Yep, that seems to be the trick. I'm going to test it all again without using "--with-gnu-ld" and see what happens.

Edit 3: Yeah, "--with-gnu-ld" was just a coincidence. It seems to be unnecessary here. The solution was to continue to run make past the errors, then run make clean, and then make again. Will post an updated set of steps once I test a few more things.
chrysophylax
Legendary
*
Offline Offline

Activity: 1316
Merit: 1074


--- ChainWorks Industries ---


View Profile WWW
March 14, 2017, 06:29:45 AM
 #1163

I may have found a solution. I ran "make clean" to try things again, then added "--with-gnu-ld" to the configure line, and finally ran make, and the executables were built. Now I've got to test the executables, and test all of this on a fresh machine to see if it works from scratch.

make clean
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no --with-gnu-ld
make HOST=x86_64-w64-mingw32

Edit: Nope, "--with-gnu-ld" doesn't solve it on a fresh machine, so it must've been something additional. I had continued the make process all the way through by running make multiple times, then ran "make clean", then making again; that got me to the executables, for whatever reason. Testing more now. Possibly using the "-k" parameter on make will get you to the point where you can "make clean" and make it again, which would be absurd if that's what it takes.

Edit 2: Yep, that seems to be the trick. I'm going to test it all again without using "--with-gnu-ld" and see what happens.

so are you testing this with the latest bitcoin on git? ... or some other coin? ...

seems you are starting to get some success here ...

#crysx

GRN - Gfz2cXMkhMZYWSFvLEMnM8bXk7X5Mtq2J2 . Exchange - https://www.cryptopia.co.nz/Exchange/?market=GRN_BTC . CWI-Thread - https://bitcointalk.org/index.php?topic=1563601 . EMail - crysx@gnxs.com . CWI-Pyroxene (theMine) - http://pyroxene.chainworksindustries.com/ .
mmortal03
Legendary
*
Offline Offline

Activity: 1739
Merit: 1003


View Profile
March 14, 2017, 08:27:09 AM
 #1164

I may have found a solution. I ran "make clean" to try things again, then added "--with-gnu-ld" to the configure line, and finally ran make, and the executables were built. Now I've got to test the executables, and test all of this on a fresh machine to see if it works from scratch.

make clean
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no --with-gnu-ld
make HOST=x86_64-w64-mingw32

Edit: Nope, "--with-gnu-ld" doesn't solve it on a fresh machine, so it must've been something additional. I had continued the make process all the way through by running make multiple times, then ran "make clean", then making again; that got me to the executables, for whatever reason. Testing more now. Possibly using the "-k" parameter on make will get you to the point where you can "make clean" and make it again, which would be absurd if that's what it takes.

Edit 2: Yep, that seems to be the trick. I'm going to test it all again without using "--with-gnu-ld" and see what happens.

so are you testing this with the latest bitcoin on git? ... or some other coin? ...

seems you are starting to get some success here ...

#crysx

Yeah, the latest on github. I'm pretty certain I've got it to work now. I've tested the bitcoin-qt.exe that I built, and it seems to be working, downloading the blockchain. I've also tested compiling it this way on another fresh machine, and that seemed to work, too. I'll post a revised set of steps once I'm finished with some final testing.
mmortal03
Legendary
*
Offline Offline

Activity: 1739
Merit: 1003


View Profile
March 14, 2017, 11:21:08 AM
 #1165

Here are my steps that work. I'm pretty sure that some of the following steps are unnecessary, but I know that it works.

If anyone can help cut out the stuff that's superfluous, that'd be great.

Steps to compile Bitcoin Core 64-bit using "Bash on Ubuntu on Windows":

//To run this on your system, change the user directory of "mmortal03" in the steps below to whatever your bash user name is.

sudo apt-get update
sudo apt-get upgrade
//restart bash to be safe

sudo apt-get install -y build-essential libtool autotools-dev autoconf automake curl
sudo apt-get install -y libqt5gui5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
sudo apt-get install -y libqt5core5a pkg-config git libdb4.8-dev libdb4.8++-dev
sudo apt-get install -y g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
//restart bash to be safe

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git checkout v0.14.0
//or git checkout master
//or git checkout f8a709161f3710fe62e05988a9101933944489fb .

cd /home/mmortal03/bitcoin/depends
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin/src/secp256k1
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin/src/univalue
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32 -j4

cd /home/mmortal03/bitcoin
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
./configure --prefix=$PWD/depends/x86_64-w64-mingw32 --with-gui=qt5 --enable-tests=no --disable-gui-tests --disable-bench
make -k HOST=x86_64-w64-mingw32 -j4
//ignore any invalid pointer errors here, as the clean in next step should fix it

make clean
make HOST=x86_64-w64-mingw32 -j4

You can browse to C:\Users\mmortal03\AppData\Local\lxss\home\mmortal03\bitcoin,
and search for *.exe to pull up the executables. Copy them elsewhere and you should be good to go.
nomadsena
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
April 14, 2017, 01:42:56 PM
 #1166

hi
dose anyone here know how to compile windows qt wallet for altcoins or can someone point me a link to some guide. It would be a huge help. thanks
AdolfinWolf
Hero Member
*****
Offline Offline

Activity: 854
Merit: 685



View Profile
April 24, 2017, 12:10:31 PM
 #1167

Not sure what i am doing wrong, and if this an error i should care about, when i try to "make" berkeley, see


Quote
2.2 Berkeley DB: http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
We'll use version 4.8 to preserve binary wallet compatibility.
From a MinGW shell unpack the source archive, configure and make:








I get this error. Does anyone knows what i am doing wrong, and how i could resolve it?

I've set this

Quote
1.3. Ensure that mingw-builds bin folder is set in your PATH environment variable. On Windows 7 your path should look something like:
Code:

Code:
C:\mingw32\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

As my path in environment variables, is that correct? Or?

It looks like this,



I've simply pasted it in there, i am not sure if that is the right thing to do?


ARTISTCOLONY
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
May 23, 2017, 06:44:49 PM
 #1168

DOGE===> is it easy to build? Cool lol
hexafraction
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250

Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ


View Profile
May 23, 2017, 08:21:01 PM
 #1169

Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.

I have recently become active again after a long period of inactivity. Cryptographic proof that my account has not been compromised is available.
ARTISTCOLONY
Newbie
*
Offline Offline

Activity: 56
Merit: 0


View Profile
May 23, 2017, 10:49:17 PM
 #1170

Is the DOGE client easy to build?

Not much of a difference; shouldn't be hard to build with similar steps and a proper toolchain. Also, I've revised your message (in my quote of it) to better convey your inquiry without useless fluff.

i was able to do bitcoin 9 and 10 using the op!! .... ETC ethereum i might give it a whirl sometime ~ visual studio i'm going to check out BTC way too<<<
Table8
Newbie
*
Offline Offline

Activity: 33
Merit: 0


View Profile
June 12, 2017, 02:56:50 PM
 #1171

I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x20 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8b73): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8c29): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.
bushstar
Hero Member
*****
Offline Offline

Activity: 601
Merit: 518


View Profile
June 21, 2017, 07:03:48 PM
 #1172

Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB
AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 22, 2017, 09:02:02 PM
 #1173

I'm having an issue compiling an alt qt. From what I can tell, this is an issue with building a static/shared dependency miniupnpc. For the life of me I can't get past this error though no matter what I try.

Things I've tried;
  • Compile shared and static miniupnpc with  mingw32-make makefile.mingw upnpc-shared/static
  • Tried disabling miniupnpc by qmake use_upnp=-
  • Tried grabbing an old version of miniupnpc and using that
  • Successfully built Bitcoind and Bitcoin-QT to make sure all deps were good

Here is the error.
Code:
./build\net.o:net.cpp:(.text+0x8673): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x86aa): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x86eb): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x8767): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x877a): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8867): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x897b): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x899a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89a9): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x20 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:311: recipe for target 'release\coin-qt.exe' failed
mingw32-make: *** [release\coin-qt.exe] Error 1

Any suggestions or guidance would be much appreciated.

Well my apologies. 5 minutes after posting this I figured it out. Based on this, I figured out that I needed to add this line to my Makefile.Release generated by qmake.

Code:
DEFINES       = -DMINIUPNP_STATICLIB

I am getting same error.
Tried adding line below to Make.Release file still same error.
Code:
DEFINES       = -DMINIUPNP_STATICLIB

Here's the error code.
Code:
./build\net.o:net.cpp:(.text+0x88f3): undefined reference to `_imp__upnpDiscover
'
./build\net.o:net.cpp:(.text+0x892a): undefined reference to `_imp__UPNP_GetVali
dIGD'
./build\net.o:net.cpp:(.text+0x896b): undefined reference to `_imp__UPNP_GetExte
rnalIPAddress'
./build\net.o:net.cpp:(.text+0x89e7): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x89fa): undefined reference to `_imp__FreeUPNPUrls
'
./build\net.o:net.cpp:(.text+0x8ae7): undefined reference to `_imp__strupnperror
'
./build\net.o:net.cpp:(.text+0x8b73): undefined reference to `_imp__UPNP_AddPort
Mapping'
./build\net.o:net.cpp:(.text+0x8bfb): undefined reference to `_imp__UPNP_DeleteP
ortMapping'
./build\net.o:net.cpp:(.text+0x8c1a): undefined reference to `_imp__freeUPNPDevl
ist'
./build\net.o:net.cpp:(.text+0x8c29): undefined reference to `_imp__FreeUPNPUrls
'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\net.o: bad reloc address 0x960 in section `.data'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\mycoin-qt.exe' failed
mingw32-make: *** [release\mycoin-qt.exe] Error 1

C:\mycoin>

anything to fix in net.cpp?

Thanks in advance.

Update.
Solved....

Managed to compiled qt without UPNP.

Now the problem is I can not connect 2 wallet peering because UPNP is disabled and have not set up nodes yet on my vps.
Error 'connections timeout' continuously.

Tried adding private IPs of both client machines in both clients .conf files.

Any trick to connect 2 clients peering without UPNP.
Or trick to enable UPNP without re-compiling.

Thanks in advance.


Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

main.h
/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 1000000;                      // 1000KB block hard limit
/** Obsolete: maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/4;         // 250KB  block soft limit
/** Default for -blockmaxsize, maximum size for mined blocks **/
static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 250000;
/** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 17000;
/** The maximum size for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 25;
/** The maximum size of a blk?Huh?.dat file (since 0.Cool */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?Huh?.dat files (since 0.Cool */
static const unsigned int BLOCKFILE_CHUNK_SIZE = 0x1000000; // 16 MiB
/** The pre-allocation chunk size for rev?Huh?.dat files (since 0.Cool */
static const unsigned int UNDOFILE_CHUNK_SIZE = 0x100000; // 1 MiB
/** Fake height value used in CCoins to signify they are only in the memory pool (since 0.Cool */
static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
/** Dust Soft Limit, allowed with additional fee per output */
static const int64 DUST_SOFT_LIMIT = 100000; // 0.001 MYCOIN
/** Dust Hard Limit, ignored as wallet inputs (mininput default) */
static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 MYCOIN mininput
/** No amount larger than this (in satoshi) is valid */
static const int64 MAX_MONEY = 10000000 * COIN;
inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
static const int COINBASE_MATURITY = 1;
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
/** Maximum number of script-checking threads allowed */
static const int MAX_SCRIPTCHECK_THREADS = 16;
#ifdef USE_UPNP
static const int fHaveUPnP = true;
#else
static const int fHaveUPnP = false;
#endif


main.cpp

    int64 nSubsidy = 10000000 * COIN;
static const int64 nTargetTimespan = 10 * 30; // MYCOIN: 5 minutes
static const int64 nTargetSpacing = 1 * 30; // MYCOIN: 30 seconds

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.


How did you get past this? I'm still stuck.  Your post doesn't tell me how to solve it, specifically you compiled the qt w/ out UPNP

"Let's make money out of AIR,".  - an AIRcoin user
AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 22, 2017, 09:03:53 PM
 #1174

Update..
Managed to connect wallets and it's working fine.
Now the issue is i configured Max_Money 10Million and nsubsidy 1billion it means 100 percent premined at first block and 1 transaction for coinbase maturity.
But everytime i enter setgenerate true -1 in client consol new block is mined with another 10Million coins and all coins are immature.
Any help, how to set max money supply and 100 percent premined in src code i have done as following.

I want to make 10million coin maximum, 100 percent premined and no more than 10million coins can generate.

Your help will be appriciated.
Thanks in advance.

You want to do the following in the GetBlockValue in main.cpp, this will generate 10 million a block until after 100 blocks making 1 billion total.

Code:
int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 10000000 * COIN;

    if (nHeight > 100)
       nSubsidy = 0 * COIN;

    return nSubsidy + nFees;
}

For the UPNP issue try replacing the USE_UPNP line with this one, it is what gets rid of your error for me.

Code:
DEFINES += USE_UPNP=$$USE_UPNP MINIUPNP_STATICLIB

Which UPNP line? The one in *coinqt.pro? I tried that and it didn't overcome the problem for me: I'm using Windows 8.1 to do this, on normal Windows CMD and mingw49, boost 1.55..., miniupnpc.1.9.2015... db.4.8.30.NC, openssl-1.0.1j, Qt version 4.8.6

"Let's make money out of AIR,".  - an AIRcoin user
AIRCOINDEV O
Member
**
Offline Offline

Activity: 105
Merit: 10

Proteus?


View Profile WWW
June 23, 2017, 02:56:02 AM
 #1175

Code:
include\QtGui" -I"..\Qt\4.8.6\include" -I"src" -I"src\json" -I"src\qt" -I"..\deps"
 -I"MINIUPNPC_LIB_PATH=C:\deps\miniupnpc" -I"src\leveldb\include" -I"src\leveldb
\helpers" -I"..\deps\boost_1_55_0" -I"..\deps\db-4.8.30.NC\build_unix" -I"..\dep
s\openssl-1.0.1j\include" -I"..\deps\qrencode-3.4.4" -I"..\Qt\4.8.6\include\Acti
veQt" -I"build" -I"build" -I"..\Qt\4.8.6\mkspecs\default" -o build\qrc_bitcoin.o
 release\qrc_bitcoin.cpp
g++ -Wl,--dynamicbase -Wl,--nxcompat -Wl,--large-address-aware -static -static-l
ibgcc -static-libstdc++ -Wl,-s -mthreads -Wl,-subsystem,windows -o release\clone
coin-qt.exe object_script.clonecoin-qt.Release  -L"c:\Qt\4.8.6\lib" -lmingwthrd
-lmingw32 -lqtmain build\bitcoin-qt_res.o -lqrencode -lminiupnpc -liphlpapi C:/C
lonecoin/src/leveldb/libleveldb.a C:/Clonecoin/src/leveldb/libmemenv.a -lshlwapi
 -LC:\deps\boost_1_55_0/stage/lib -LC:\deps\db-4.8.30.NC\build_unix -LC:\deps\op
enssl-1.0.1j -LC:\deps\qrencode-3.4.4\.libs -lssl -lcrypto -ldb_cxx -lshlwapi -l
mswsock -lboost_system-mgw49-mt-s-1_55 -lboost_filesystem-mgw49-mt-s-1_55 -lboos
t_program_options-mgw49-mt-s-1_55 -lboost_thread-mgw49-mt-s-1_55 -lboost_chrono-
mgw49-mt-s-1_55 -lQtGui -lQtNetwork -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinm
m -lwinspool -lmsimg32 -lQtCore -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -lu
ser32 -lkernel32
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bi
n/ld.exe: cannot find -lminiupnpc
collect2.exe: error: ld returned 1 exit status
Makefile.Release:291: recipe for target 'release\clonecoin-qt.exe' failed
mingw32-make: *** [release\clonecoin-qt.exe] Error 1

The above is the result when I compile in regular old Windows CMD with what you see below in my *coin-qt.pro file.

Code:
# Dependency library locations can be customized with:
#    BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
#    BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
BOOST_LIB_SUFFIX=-mgw49-mt-s-1_55
BOOST_INCLUDE_PATH=C:\deps\boost_1_55_0
BOOST_LIB_PATH=C:\deps\boost_1_55_0\stage\lib
BDB_INCLUDE_PATH=C:\deps\db-4.8.30.NC\build_unix
BDB_LIB_PATH=C:\deps\db-4.8.30.NC\build_unix
OPENSSL_INCLUDE_PATH=C:\deps\openssl-1.0.1j\include
OPENSSL_LIB_PATH=C:\deps\openssl-1.0.1j
MINIUPNPC_INCLUDE_PATH=C:\deps\
MINIUPNPC_LIB_PATH=C:\deps\miniupnpc
QRENCODE_INCLUDE_PATH=C:\deps\qrencode-3.4.4
QRENCODE_LIB_PATH=C:\deps\qrencode-3.4.4\.libs
OBJECTS_DIR = build
MOC_DIR = build
UI_DIR = build



"Let's make money out of AIR,".  - an AIRcoin user
powerfull
Sr. Member
****
Offline Offline

Activity: 250
Merit: 250


View Profile
July 08, 2017, 09:26:53 AM
 #1176

windows7 -- with secp256k1  ,the error as follow , how to fix it , thanks


Code:
./build\key.o:key.cpp:(.text+0x79a): undefined reference to `secp256k1_context_d
estroy'
./build\key.o:key.cpp:(.text+0x8b8): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0x8f3): undefined reference to `secp256k1_ecdsa_sig
n_recoverable'
./build\key.o:key.cpp:(.text+0x919): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0x98a): undefined reference to `secp256k1_ecdsa_rec
overable_signature_serialize_compact'
./build\key.o:key.cpp:(.text+0xa75): undefined reference to `secp256k1_nonce_fun
ction_rfc6979'
./build\key.o:key.cpp:(.text+0xa9d): undefined reference to `secp256k1_ecdsa_sig
n'
./build\key.o:key.cpp:(.text+0xadc): undefined reference to `secp256k1_ecdsa_sig
nature_serialize_der'
./build\key.o:key.cpp:(.text+0xe89): undefined reference to `secp256k1_ec_pubkey
_create'
./build\key.o:key.cpp:(.text+0xf3c): undefined reference to `secp256k1_ec_pubkey
_serialize'
./build\key.o:key.cpp:(.text+0x11a8): undefined reference to `secp256k1_ec_privk
ey_tweak_add'
./build\key.o:key.cpp:(.text+0x144a): undefined reference to `secp256k1_ec_secke
y_verify'
./build\key.o:key.cpp:(.text+0x15b2): undefined reference to `secp256k1_context_
create'
./build\key.o:key.cpp:(.text+0x15e0): undefined reference to `secp256k1_context_
randomize'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: ./build\key.o: bad reloc address 0x1c in section `.text$_ZN21LockedPag
eManagerBaseI16MemoryPageLockerE11UnlockRangeEPvj[__ZN21LockedPageManagerBaseI16
MemoryPageLockerE11UnlockRangeEPvj]'
C:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-mingw32/bi
n/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Nikoloz
Sr. Member
****
Offline Offline

Activity: 297
Merit: 250


View Profile
July 09, 2017, 03:27:39 AM
 #1177

Hi All ! where I can download  wallet qt ?
xgast
Newbie
*
Offline Offline

Activity: 53
Merit: 0


View Profile
July 09, 2017, 09:04:40 AM
 #1178

Hi All ! where I can download  wallet qt ?

Just to share.., the storage space of bitcoin wallet (bitcoin wallet) is divided into 2 types:
1. Online wallet (ewallet)
2. Wallet computer
Online wallet (ewallet) uses a website already provided by online wallet / wallet service providers. The computer wallet is installed on your computer. Both wallet / wallet above have their own weaknesses and advantages.

If you want to use bitcoin wallet immediately you can use online bitcoin storage service or called ewallet are:
1. Blockchain.info
2. Coinbase.com
3. Strongcoin.com
The above providers can be trusted.

Beside online wallet there are 2 ways to create a wallet computer:
1. Bitcoin.qt
2. Multibit

Bitcoin.qt is the original wallet that has a very complete function with excellent security. You can download the wallet here.. https://bitcoin.org/en/choose-your-wallet. It takes quite a long time to synchronize with the bitcoin network each time we use. File sizenya also very large reach up to tens of gigabite. While multibit is much different from bitcoin.qt. Multibit very light, speed and ease of use. The time required for synchronization in just minutes. I hope it’s help for some newbie.
freemanjackal
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250

FINANCIAL FREEDOM, PROFESSIONAL STRATEGY


View Profile
July 24, 2017, 01:12:14 PM
 #1179

i would like to compile the windows binaries in ubuntu, any useful guide??

achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 1582
Merit: 1750


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
July 24, 2017, 04:32:44 PM
 #1180

i would like to compile the windows binaries in ubuntu, any useful guide??
There are instructions for cross compiling here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

Pages: « 1 ... 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 [59] 60 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!