Pages:
Author

Topic: Why can't I compile the bitcoin source code? (Read 904 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
August 22, 2020, 07:51:36 AM
#94
**Update**

Okay so I left v0.16.0 and focused on v0.20.0.
I successfully build v0.20.0 using this guide, the problem is that I don't know if I have successfully created a new blockchain. When write getblockcount I get 0. Although it still shows me that I'm connecting to peers. Before I compile I had removed every single line starting with vSeeds.emplace_back so I don't make sense. I also had changed ports. (8333->6333, 18333->16333)
--snip--

At very least, changing port won't let you connect to different blockchain/network. You can change the port and connect to Bitcoin network without any problem, especially since there are few ISP that used to block port 8333.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Although it still shows me that I'm connecting to peers. Before I compile I had removed every single line starting with vSeeds.emplace_back so I don't make sense. I also had changed ports. (8333->6333, 18333->16333)
Your node probably connected to that IP by itself. The IP in a hardcoded set of nodes within the client itself[1].


[1] https://github.com/bitcoin/bitcoin/blob/adac12ae73e896e405e75b02a0a49c575d115b6e/contrib/seeds/nodes_main.txt#L34

So should I make that txt empty and then compile again?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
Although it still shows me that I'm connecting to peers. Before I compile I had removed every single line starting with vSeeds.emplace_back so I don't make sense. I also had changed ports. (8333->6333, 18333->16333)
Your node probably connected to that IP by itself. The IP in a hardcoded set of nodes within the client itself[1].


[1] https://github.com/bitcoin/bitcoin/blob/adac12ae73e896e405e75b02a0a49c575d115b6e/contrib/seeds/nodes_main.txt#L34
HCP
legendary
Activity: 2086
Merit: 4361
Question. Are, the compiled files of bitcoin core on my ubuntu, also usable on a windows system too? If not, is it possible to compile the source files from ubuntu and create the executables for windows?
No, the binaries are not cross-platform... Linux and Windows executables are fundamentally different. So you cannot simply copy the "bitcoin-qt" to windows and rename it "bitcoin-qt.exe".

Instead, you would need to follow the "build-windows.md" guide to cross-compile the Windows binaries using your Linux setup... this will build the Windows compatible ".exe" versions.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
**Update**

Okay so I left v0.16.0 and focused on v0.20.0.
I successfully build v0.20.0 using this guide, the problem is that I don't know if I have successfully created a new blockchain. When write getblockcount I get 0. Although it still shows me that I'm connecting to peers. Before I compile I had removed every single line starting with vSeeds.emplace_back so I don't make sense. I also had changed ports. (8333->6333, 18333->16333)







^ I shouldn't get that peer.

I think I will continue my issues about the altcoin creation on that guide, but if you have anything to say I would really want to know. If I have make a mistake, if I haven't make something important. It would be really helpful. Note that I did not create a genesis block, I left satoshi's genesis block as default since I don't care about the first block. Thus I skipped the entire 12th part of the guide.

Question. Are, the compiled files of bitcoin core on my ubuntu, also usable on a windows system too? If not, is it possible to compile the source files from ubuntu and create the executables for windows?
legendary
Activity: 1624
Merit: 2481
How can I get rid of every single installation I have made with bitcoin core on ubuntu? On windows I could simply go on %AppData% and remove the "Bitcoin".

You can not get rid of your installation by just deleting files in the AppData folder.
Removing everything from an installation is way harder to achieve on windows than on linux.


But.. how did we go to "Compiling and finding the executable works" to "Nothing is here" ?
You had it compiled already, what did you do in the meantime?



No... bitcoind is the Bitcoin Core daemon... basically the "server" component that runs in the background. I asked because I wanted to know if the rest of it had actually compiled properly. "bitcoind" seems to have been built "OK", so if "bitcoin-qt" is not being output in the "src" folder along with "bitcoind" and "bitcoin-cli", then it would appear that your compile didn't actually work properly (unless you told it to build without the GUI... Did you use --without-gui with "configure"? Huh)

The file actually is the compiled daemon.
And the compiled file bitcoin-qt is located in src/qt/

OP already was able to find and execute(?) that file.
HCP
legendary
Activity: 2086
Merit: 4361
Like I said, you'll probably need to capture all of the make output and then hunt through that to see if there are any obvious errors relating to building of "bitcoin-qt".

You should be able to use a command like:
Code:
make > make_output.txt
That will redirect the output from the screen to the file make_output.txt... you can then copy/paste the output to pastebin.com or something like that.


Can you also do a directory listing of the "./src" directory with "bitcoind" is located? Would prefer the text listing, rather than a screenshot of the file browser window.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
How can I get rid of every single installation I have made with bitcoin core on ubuntu? On windows I could simply go on %AppData% and remove the "Bitcoin".

I think the old version is getting interacted with the new one. Could that happen?

Edit: I'm right now building again. I think I had forgotten ./configure --with-incompatible-bdb

2nd Edit: Guys it still shows:

Code:
./src/qt/res/bitcoin-qt-res.rc
./doc/man/bitcoin-qt.1
HCP
legendary
Activity: 2086
Merit: 4361
Is it that?
No... bitcoind is the Bitcoin Core daemon... basically the "server" component that runs in the background. I asked because I wanted to know if the rest of it had actually compiled properly. "bitcoind" seems to have been built "OK", so if "bitcoin-qt" is not being output in the "src" folder along with "bitcoind" and "bitcoin-cli", then it would appear that your compile didn't actually work properly (unless you told it to build without the GUI... Did you use --without-gui with "configure"? Huh)

In any case, you'd need to look at the actual output from make to figure out why "bitcoin-qt" has not been built...


Because when I command that, this happens:
The error you're getting is because you've already run a later version of Bitcoin Core at some point which has upgraded your wallet.dat which will be in your "~/.bitcoin/wallets" folder... rename/move the existing wallet.dat and then try starting "bitcoind" again.

NOTE: bitcoind does NOT have a GUI... so once "bitcoind" is running, you will need to use "bitcoin-cli" from the command line to interact it.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Result:
Code:
/home/angelo/altcoin-master/test/functional/data/wallets/high_minversion/wallet.dat
/home/angelo/.bitcoin/wallets/wallet.dat
/home/angelo/.bitcoin/wallets/daf/wallet.dat
/home/angelo/bitcoin-master/test/functional/data/wallets/high_minversion/wallet.dat

Where should I move it?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
Where is wallet.dat located?
A neat little command I use in the terminal is:
Code:
find / -name wallet.dat -print 2>/dev/null
.

The output should be the directory the wallet.dat is in.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo

Because when I command that, this happens:

-zip-
Are you using your own wallet.dat? Might be the case of the wallet.dat not being backwards compatible (you're running 0.16.0 after-all). Try moving your wallet.dat to another directory and running the client again.

Where is wallet.dat located?
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange

Because when I command that, this happens:

-zip-
Are you using your own wallet.dat? Might be the case of the wallet.dat not being backwards compatible (you're running 0.16.0 after-all). Try moving your wallet.dat to another directory and running the client again.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
After compilation of v0.16.0, is there a file called "bitcoind" that has been created anywhere? Huh

Is it that?



Because when I command that, this happens:

HCP
legendary
Activity: 2086
Merit: 4361
After compilation of v0.16.0, is there a file called "bitcoind" that has been created anywhere? Huh
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I have a question. I want to compile Bitcoin Core v0.16.0. I successfully compile the files but once I write find . -type f -iname "bitcoin-qt*" I only get:

Code:
./src/qt/res/bitcoin-qt-res.rc
./doc/man/bitcoin-qt.1

None of them is the launcher right?
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Yeah! I did it. Part 1 is done. I have to face the second part now, and I'm creating a new thread for that.

https://bitcointalksearch.org/topic/trying-to-create-an-altcoin-5270019
legendary
Activity: 1624
Merit: 2481
This is the executable:
Code:
./src/qt/bitcoin-qt


So, either enter the directory ~/bitcoin-master/src/qt/ and enter:
Code:
./bitcoin-qt

or run the following from your home directory:
Code:
./bitcoin-master/src/qt/bitcoin-qt


P.s. You are almost there!  Cheesy
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Code:
./src/qt/res/bitcoin-qt-res.rc
./src/qt/bitcoin-qt
./build_msvc/bitcoin-qt/bitcoin-qt.vcxproj
./doc/man/bitcoin-qt.1
./contrib/bitcoin-qt.pro

And what of those 5 is the bitcoin-qt?
legendary
Activity: 1624
Merit: 2481
They don't necessarily have an extension. The extension is just part of the filename.

The file is named bitcoin-qt.
To run it, enter:
Code:
./bitcoin-qt

It might be the case, that the file is not marked as executable. In that case you first need to run:
Code:
sudo chmod 744 bitcoin-qt


If it says, the file can not be found, run the following in the bitcoin-master directory:
Code:
find . -type f -iname "bitcoin-qt*"
This should give you the location of the file.
Pages:
Jump to: