Bitcoin Forum
February 01, 2023, 03:09:08 AM *
News: Latest Bitcoin Core release: 24.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Compile Bitcoin first version on Linux - Windres issues  (Read 150 times)
seaona (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
October 30, 2021, 07:03:57 AM
Merited by Welsh (2)
 #1

Hi,

I'm trying to compile and run Bitcoin first version on Linux, but I am encountering some trouble in the process of installing wxWidgets. The steps I followed are the ones described on "A Dissection of Bitcoin":

1. Checkout the version I want
Code:
git checkout 4405b78d6059e536c36974088a8ed4d9f0f29898

2. Download wxWidgets

3.
Code:
cd bc/wxWidgets-2.8.12
./configure --with-msw --enable-debug --enable-debug_gdb --disable-shared
make

I get stuck when I run ./configure ... , getting this message:
Quote
"configure: error: Required windres program not found"


 I've tried to look for this package but seems that is not that easy to find for Linux. So my questions are:
  • has someone successfully compiled the first version on Linux? seems to me that the versions is "targeting" only windows users. Is this correct?
  • did you also have the same issues? how did you solve it

Thanks in advance!
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1675220948
Hero Member
*
Offline Offline

Posts: 1675220948

View Profile Personal Message (Offline)

Ignore
1675220948
Reply with quote  #2

1675220948
Report to moderator
ETFbitcoin
Legendary
*
Offline Offline

Activity: 2408
Merit: 5700


DO NOT store your coin on third-party service!


View Profile
October 30, 2021, 11:29:56 AM
Merited by Welsh (4)
 #2

1. Checkout the version I want
Code:
git checkout 4405b78d6059e536c36974088a8ed4d9f0f29898

Actually it's not first version. There are few older version which can be found at https://satoshi.nakamotoinstitute.org/code/.

  • has someone successfully compiled the first version on Linux? seems to me that the versions is "targeting" only windows users. Is this correct?

Correct, very early version of Bitcoin Qt only target Windows. If you check old discussion, few user criticize Satoshi due to Windows only build.

  • did you also have the same issues? how did you solve it

I never tried running old version, but i would download compiled version and run it with WINE.

seaona (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
October 31, 2021, 07:19:54 AM
Merited by Welsh (1), ETFbitcoin (1)
 #3

Thank you very much, this clarifies a lot!

In case it's useful for someone, I've research a bit and found the support for Unix was included here:
https://github.com/bitcoin/bitcoin/commit/fba40889418cb1861440a3fdccee048c69f0fb89

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2408
Merit: 5700


DO NOT store your coin on third-party service!


View Profile
October 31, 2021, 10:43:59 AM
 #4

in first bitcoin core was "earn bitcoin" tab.
How do you think it can be still enabled?

Can you be more specific? What version of Bitcoin-Qt/Bitcoin Core you're referring? Can you show screenshot of "Earn Bitcoin" tab? Without additional information, i only could guess that you mistake it with built-in mining feature which use CPU.

HCP
Legendary
*
Offline Offline

Activity: 1960
Merit: 4262

<insert witty quote here>


View Profile
October 31, 2021, 10:56:47 PM
 #5

Are you talking about the "Generate Bitcoins" menu option that was in the original client? Huh

I'm not aware of any "Earn Bitcoins" tab... mind you, I never used the original client, and, as it turns out, there don't seem to be many screenshots of it floating around on the internet... at least, not of the "options" menu. Only the main screen like this one:


(source: https://twitter.com/bit_fix/status/505105572946247680)


nc50lc
Legendary
*
Offline Offline

Activity: 1946
Merit: 4106


Self-proclaimed Genius ㊙️


View Profile
November 01, 2021, 04:11:29 AM
Merited by Welsh (2), stompix (1), ETFbitcoin (1)
 #6

in first bitcoin core was "earn bitcoin" tab.
How do you think it can be still enabled?
You mean this button? (same as above)
I have 0.1 installed and the only similar name is "Generate Coins" which will use your CPU to mine blocks, thus "earn bitcoin".
It's a toggle button, clicking it will activate it (there will be a check mark) and CPU mining will run in the background.


Even if you can somehow connect v0.1 to the network, that feature will work but you won't be able to win a block due to the current difficulty.

ETFbitcoin
Legendary
*
Offline Offline

Activity: 2408
Merit: 5700


DO NOT store your coin on third-party service!


View Profile
November 01, 2021, 10:48:19 AM
 #7

Question has any one check that we can minning block as minus block - like ( example -10)?

If you mean negative block height, it's impossible. But if you mean mining previous block (e.g. you mine block #1000 while current highest block height is #1005) with intention of double-spend, theoretically it's possible if you have 51% hashrate.

HCP
Legendary
*
Offline Offline

Activity: 1960
Merit: 4262

<insert witty quote here>


View Profile
November 01, 2021, 09:30:57 PM
 #8

Question has any one check that we can minning block as minus block - like ( example -10)?
The "generate bitcoins" option just enables the builtin CPU-based miner. It doesn't do anything that a "normal" miner does and, being as old as it is, is probably not terribly well optimised.

What do you mean by a "minus block"? Huh What exactly are you trying to achieve here? Huh

nc50lc
Legendary
*
Offline Offline

Activity: 1946
Merit: 4106


Self-proclaimed Genius ㊙️


View Profile
November 02, 2021, 06:09:12 AM
Merited by vjudeu (2)
 #9

-snip-
Question has any one check that we can minning block as minus block - like ( example -10)?
Blockchain starts at the genesis block, I don't think you can mine blocks further below that.
Do you have any reference on use-cases where there's a -10 block height in a blockchain?

Anyways, this seems off-topic to the OP, you might need to start a new thread for that topic.

vjudeu
Sr. Member
****
Offline Offline

Activity: 342
Merit: 564


View Profile
November 02, 2021, 08:17:39 AM
Merited by nc50lc (2)
 #10

Quote
Blockchain starts at the genesis block, I don't think you can mine blocks further below that.
To mine -1 block or earlier, you need SHA-256 collision. You can replace 64-rounds SHA-256 with 16-rounds SHA-256 and see what happens when you feed that with SHA-256 collisions or preimages, but I guess the client would rather crash than accept -10 block header (or even -1 block header). Also, for each block except Genesis, you have to provide previous block header first, so you can try to submit block header -1, but you will get an error saying that you need block header -2 first. Maybe you could meet that condition by having two blocks with the same hashes, but then other functions will crash, like getting block by hash. Anyway, by mining negative blocks, you will break your client.
j2002ba2
Full Member
***
Offline Offline

Activity: 187
Merit: 382


View Profile
November 02, 2021, 08:57:45 AM
Merited by nc50lc (1), vjudeu (1)
 #11

Quote
Blockchain starts at the genesis block, I don't think you can mine blocks further below that.
To mine -1 block or earlier, you need SHA-256 collision.
Besides that, there's 36.8% chance that there cannot be block with hash zero. If only single SHA was used, then no problem. But double SHA means 256-bit to 256-bit random mapping at the second SHA, and about 1/e of the possible outputs are unreachable.

vjudeu
Sr. Member
****
Offline Offline

Activity: 342
Merit: 564


View Profile
November 02, 2021, 01:00:45 PM
 #12

Quote
Besides that, there's 36.8% chance that there cannot be block with hash zero.
Yes, but there is still quite high chance that there could exist different Genesis Block with the same hash (a collision). Then, if you can reach the same SHA-256 for two 80-byte block headers, then you can replace previous block hash with something else. And then it may be possible to create previous block. But to be 100% sure, some experiments with faked hash functions are needed.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!