Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Zilon on March 04, 2022, 10:01:29 AM



Title: Is there a new code to download bitcoin source code
Post by: Zilon on March 04, 2022, 10:01:29 AM
I tried playing around the source code on github after downloading i tried copying the code using "clone" but can't get the exact output as shown in the example, I tried the code i got from a booklet but its not responding
This is meant to be the expected output
In this example, we are using the git command to create a local copy (“clone”) of the source code:
Code:
$ git clone https://github.com/bitcoin/bitcoin.git
Cloning into 'bitcoin'...
remote: Counting objects: 66193, done.
remote: Total 66193 (delta 0), reused 0 (delta 0), pack-reused 66193
Receiving objects: 100% (66193/66193), 63.39 MiB | 574.00 KiB/s, done.
Resolving deltas: 100% (48395/48395), done.
Checking connectivity... done.
$
my output could there be a better code for this?
https://i.ibb.co/Jy80npQ/Capture-1-1.png (https://imgbb.com/)
free photo hosting (https://imgbb.com/)


Title: Re: Is there a new code to download bitcoin source code
Post by: PawGo on March 04, 2022, 10:08:30 AM
Are you doing this in your user home folder? It seems like you try to create a folder where you have no permissions.
Which system do you use?


Title: Re: Is there a new code to download bitcoin source code
Post by: NeuroticFish on March 04, 2022, 10:11:35 AM
You have no rights.
I think that you have to do something similar to the solutions proposed here: https://stackoverflow.com/questions/16376035/fatal-could-not-create-work-tree-dir-kivy


Title: Re: Is there a new code to download bitcoin source code
Post by: Zilon on March 04, 2022, 10:13:15 AM
Are you doing this in your user home folder? It seems like you try to create a folder where you have no permissions.
Which system do you use?
I think it's on my user home folder. 

You have no rights.
I think that you have to do something similar to the solutions proposed here: https://stackoverflow.com/questions/16376035/fatal-could-not-create-work-tree-dir-kivy
Thank you and can i get a resent book with updated codes so i don't get stucked again. if there could be a recommendable academy it can also serve the same purpose be it free or paid courses


Title: Re: Is there a new code to download bitcoin source code
Post by: BlackHatCoiner on March 04, 2022, 11:09:20 AM
Thank you and can i get a resent book with updated codes so i don't get stucked again. if there could be a recommendable academy it can also serve the same purpose be it free or paid courses
What are you trying to accomplish?


Title: Re: Is there a new code to download bitcoin source code
Post by: Zilon on March 04, 2022, 11:21:04 AM
What are you trying to accomplish?
Getting to know how the bitcoin software works then proceed to developing a wallet but this very part is like an introduction on how to get the source code from git but wasn't getting the output as shown in the example i was given


Title: Re: Is there a new code to download bitcoin source code
Post by: BlackHatCoiner on March 04, 2022, 11:50:49 AM
Getting to know how the bitcoin software works
Bitcoin Core is an implementation of a Bitcoin client, and the most popular. But, to understand how it works you don't have to look into the source code; you'll understand few things there, especially if your programming skills aren't the best.

I recommend you to take a look on developer.bitcoin.org/devguide (https://developer.bitcoin.org/devguide/).

then proceed to developing a wallet
That's a very difficult thing to do, unless you follow a tutorial and understand little things of each step.


Title: Re: Is there a new code to download bitcoin source code
Post by: vjudeu on March 04, 2022, 12:03:08 PM
Quote
I think it's on my user home folder.
It is not, unless you are a root on Windows (which is very uncommon, because it means having System rights that are far higher than Administrator privileges).

To clarify things: "~" is your home, "/" is the root of the filesystem inside Git Bash for Windows.


Title: Re: Is there a new code to download bitcoin source code
Post by: NotATether on March 04, 2022, 04:31:38 PM
I recommend you to take a look on developer.bitcoin.org/devguide (https://developer.bitcoin.org/devguide/).

That only describes the P2P protocol, consensus rules and RPC commands, for actual documentation for what the C++ is doing you need to consult the Doxygen pages on bitcoincore.org (https://doxygen.bitcoincore.org/).


Title: Re: Is there a new code to download bitcoin source code
Post by: nullama on March 07, 2022, 10:48:20 PM

Why are you using MinGW?, you can install git for windows: https://git-scm.com/download/win

The error you're getting is because you're trying to clone the repository at root (/), and as a normal user you don't have permission to write in that directory. Just write this before your command and it should work:

Code:
cd ~

After you write that you'll be at your home directory, which should be writable by that user.


Title: Re: Is there a new code to download bitcoin source code
Post by: NotATether on March 08, 2022, 08:55:46 AM
Why are you using MinGW?, you can install git for windows: https://git-scm.com/download/win

The error you're getting is because you're trying to clone the repository at root (/), and as a normal user you don't have permission to write in that directory. Just write this before your command and it should work:

Code:
cd ~

After you write that you'll be at your home directory, which should be writable by that user.

MinGW is needed to compile Bitcoin Core on Windows (the build system does not support Visual Studio and MSVC).


Title: Re: Is there a new code to download bitcoin source code
Post by: nullama on March 08, 2022, 09:43:04 AM
MinGW is needed to compile Bitcoin Core on Windows (the build system does not support Visual Studio and MSVC).

That would be ironic since the first version of Bitcoin was windows only.

The official docs (https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md) say this:

Quote
The options known to work for building Bitcoin Core on Windows are:
    On Linux, using the Mingw-w64 cross compiler tool chain.
    On Windows, using Windows Subsystem for Linux (WSL) and Mingw-w64.
    On Windows, using Microsoft Visual Studio. See README.md.

In particular, here are the building instructions for Visual Studio on Windows: https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md


Title: Re: Is there a new code to download bitcoin source code
Post by: NotATether on March 09, 2022, 09:29:02 AM
MinGW is needed to compile Bitcoin Core on Windows (the build system does not support Visual Studio and MSVC).

That would be ironic since the first version of Bitcoin was windows only.

The official docs (https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md) say this:

Quote
The options known to work for building Bitcoin Core on Windows are:
    On Linux, using the Mingw-w64 cross compiler tool chain.
    On Windows, using Windows Subsystem for Linux (WSL) and Mingw-w64.
    On Windows, using Microsoft Visual Studio. See README.md.

In particular, here are the building instructions for Visual Studio on Windows: https://github.com/bitcoin/bitcoin/blob/master/build_msvc/README.md

Yeah. I must have confused Greg Maxwell's warning a couple years ago that Bitcoin Core compilation on VS can't be completely verified (the post is here somewhere) with non-support.


Title: Re: Is there a new code to download bitcoin source code
Post by: n0nce on March 10, 2022, 12:05:55 AM
then proceed to developing a wallet
That's a very difficult thing to do, unless you follow a tutorial and understand little things of each step.
Then again, I'm not sure that it's the best idea for someone to try writing a Bitcoin wallet if they seem not to have any programming experience (as evidenced by already struggling to clone a Git repository).
Not to mention that there are already tons of great open-source Bitcoin clients that one may want to contribute to instead of creating something from scratch. Unless of course it's something more specialized, but then again it would get more complex and probably even less suited for a novice coder.

I would suggest learning to program with various languages with simpler, lower goals at first and when you feel confident that you understand what you're doing, think about what you're trying to build, what's the best way to get there and then start writing the code for it.

Similar to Satoshi in a way. ;D He released the whitepaper first, and the code a few months later after he got confirmation that the idea was good, the maths and logic was sound and he was obviously confident in his ability to write down the initial code.


Title: Re: Is there a new code to download bitcoin source code
Post by: garlonicon on March 10, 2022, 05:28:59 AM
Quote
Similar to Satoshi in a way. ;D He released the whitepaper first, and the code a few months later after he got confirmation that the idea was good, the maths and logic was sound and he was obviously confident in his ability to write down the initial code.
I think he coded and tested things first (without releasing), then wrote the whitepaper, but we will never know for sure, we can only guess.

But you are right, getting general programming skills first is a good idea.