Bitcoin Forum
May 26, 2024, 09:23:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I ask you to help me compile the project.  (Read 217 times)
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 20, 2020, 03:44:23 PM
 #1

Good afternoon, dear masters.
I ask you to help me compile the project.

I'm certainly not a master, but I understand something and I compiled the version for CUDA.
but I can not compile the option for OPENCL

I ask for help.

https://github.com/djarumlights/BitCrack
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 20, 2020, 05:00:23 PM
 #2

How are you trying to compile this? On Linux, or Windows with Visual Studio, or Windows with MinGW/Msys2?

If Linux, what is the distribution you are compiling on?

On Linux there are extra packages that need to be installed for the OpenCL development headers. On Windows the OpenCL support is usually provided by the graphics driver.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 21, 2020, 03:58:53 AM
 #3

I was compiling on VS 2019
under Windows. All necessary libraries are.

ERROR:
E0322 use of object of abstract type of class "CLKeySearchDevice" is not allowed: clKeyFinder
C2259 "CLKeySearchDevice": unable to instantiate abstract class clKeyFinder
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 21, 2020, 08:38:48 AM
 #4

I was compiling on VS 2019
under Windows. All necessary libraries are.

ERROR:
E0322 use of object of abstract type of class "CLKeySearchDevice" is not allowed: clKeyFinder
C2259 "CLKeySearchDevice": unable to instantiate abstract class clKeyFinder

I have isolated problem to some file in the CLKeySearchDevice project. E0322 implies that some line is running clKeyFinder = CLKeySearchDevice(...)

I wanted to compile this myself to see the build logs but I've been having trouble installing OpenCL headers (CPU only, my servers have no GPUs to test on). I'll see if I can get them working later today.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 21, 2020, 11:15:46 AM
 #5

I am very grateful for your help.
I rechecked the code again. no reason.
the same file is compiled for different platforms. (KeyFinder -> clKeyFinder -> cuKeyFinder)
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 21, 2020, 01:25:36 PM
 #6

I am very grateful for your help.
I rechecked the code again. no reason.
the same file is compiled for different platforms. (KeyFinder -> clKeyFinder -> cuKeyFinder)

If you clone the parent repository https://github.com/ByLamacq/BitCrack, does it compile successfully?

Because I have previously compiled brichard19's BitCrack repository on Linux successfully (after adding a library to the MakeFile, but that's not my point). That means we know it's a known good version.

If you can successfully compile ByLamacq's fork then we know for starters that one of djarumlights' commits introduced the build error.

Otherwise it is one of the commits made by ByLamacq that doesn't work.



I don't think there are any source code differences between the Windows and Linux compilation, both should be running exactly the same C++ code so if for whatever reason I can't get OpenCL libraries on Windows then I will see if I can reproduce the error on my Linux box.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 21, 2020, 05:17:02 PM
 #7

"ByLamacq"  - going without problems.
everything works great!
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 21, 2020, 05:54:32 PM
 #8

I'm not a master, but I'm not dumb. But I can't understand why the code doesn't compile ... OMG!
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 22, 2020, 12:39:19 AM
 #9

Dumped from my error log:

Severity   Code   Description   Project   File   Line   Suppression State
Error   C2259   'CLKeySearchDevice': cannot instantiate abstract class   clKeyFinder   E:\Source\Repos\BitCrack\KeyFinder\main.cpp   253   

This is the context around the failing line:

Code:
#ifdef BUILD_OPENCL
    if(device.type == DeviceManager::DeviceType::OpenCL) {
        return new CLKeySearchDevice(device.physicalId, threads, pointsPerThread, blocks);   # line 253
    }
#endif

This code is the same for all three repos. It means this fork has a virtual method in CLKeySearchDevice\CLKeySearchDevice.cpp that was removed, and if there's an unimplemented virtual method in C++ then it becomes an abstract class.

I'll continue inspecting tomorrow.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 22, 2020, 10:54:48 AM
 #10

https://github.com/ByLamacq/BitCrack - I have compiled without problems.
forks on the tree below give an error only in OPENCL.
made comparisons of the source code, while I can not understand the reason.
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6761


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 22, 2020, 11:02:15 PM
Last edit: November 22, 2020, 11:21:36 PM by NotATether
 #11

Now I have OpenCL headers properly configured. It looks like there's more information if I make Visual Studio display the informational messages too.

Code:
Severity	Code	Description	Project	File	Line	Suppression State
Error C2259 'CLKeySearchDevice': cannot instantiate abstract class clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message see declaration of 'KeySearchDevice::init' clKeyFinder E:\Source\Repos\BitCrack\KeyFinderLib\KeySearchDevice.h 42
Message 'void KeySearchDevice::init(const secp256k1::uint256 &,const secp256k1::uint256 &,int,const secp256k1::uint256 &,bool)': is abstract clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message due to following members: clKeyFinder E:\Source\Repos\BitCrack\KeyFinder\main.cpp 254
Message see declaration of 'CLKeySearchDevice' clKeyFinder E:\Source\Repos\BitCrack\CLKeySearchDevice\CLKeySearchDevice.h 14

So apparently it's because KeySearchDevice::init is not defined. Maybe it must have been removed by the fork?



Found the problem.

The base class of CLKeySearchDevice, KeySearchDevice has a different init() method signature from the CLKeySearchDevice::init().

Code:
// KeySearchDevice.h

    // Initialize the device
    virtual void init(const secp256k1::uint256 &start, const secp256k1::uint256 &end, int compression, const secp256k1::uint256 &stride, bool randomMode) = 0;

// CLKeySearchDevice.h

    // Initialize the device
    virtual void init(const secp256k1::uint256 &start, int compression, const secp256k1::uint256 &stride);


Notice that end and randomMode parameters are missing from the subclass CLKeySearchDevice. Since KeySearchDevice::init() is abstract (it has = 0 at the end), CLKeySearchDevice::init() does not override it and you get this error.

I think that while the maintainer was updating the CUDA code he forgot to update the classes in the OpenCL classes. We need to modify the code to pass the additional parameters, even if they go unused.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 23, 2020, 08:20:44 AM
 #12

found the differences. I will rebuild today.
I hope this is it.
it's hard to look for errors in someone else's code (((  Cry

Thank you so much for your time.
I am very grateful that you help me.
Noname400 (OP)
Newbie
*
Offline Offline

Activity: 26
Merit: 0


View Profile
November 24, 2020, 06:29:15 PM
 #13

I found the reason.
thank you for your time.
good luck!
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!