Closed 0xIslamTaha closed 6 years ago
I'm having the same problem. The directory that is trying to be accessed doesn't exist (project directory). Also, there is no cryptonight_lib.dll.
You must first build https://github.com/LysanderGG/Simple-XMR-Miner/tree/master/cryptonight_lib There is a CMake file.
If you are on Ubuntu you will probably need to replace the cryptonight_lib.dll by cryptonight_lib.so in the python script.
I will review the build process and document it as it is indeed not documented at all at the moment.
@LysanderGG Thanks for fast reply. This is a nice project. Is that possible to make it pure python or to do a static build for this library?
Pure python would be pretty long to implement and pretty slow, the current C library is taken from another project. Static library would be possible with a Python Extension (https://docs.python.org/2/extending/extending.html).
Did you succeed in building the .so?
I'm trying to update my cmake right now once I do it, I will update you.
I found an issue in the nightminer script, as it gonna hanging after couple of minutes. Did u face the same issue? and if yes, Did u find a solution to it?
Not after a couple of minutes but I have a deconnection (exception) after few hours or days sometimes. Do you know where it is hanging? Have an exception message?
@LysanderGG I didnt get anything, no error nor exceptions Its only stop printing the hash rate messages. btw, I'm using Python 2.7.12
here is the issue: https://github.com/ricmoo/nightminer/issues/8
If u dont mind, do u get a nice hash rate using your tool or using nighminer one? As I got ~2KH using ltc-libraray
Note that my project is written in python 3 as specified in the readme. I haven't encountered the problem you are talking about (on windows).
About the hashrate, ltc is not profitable at all with a cpu or gpu, only ASIC are profitable now. For XMR, I get a relatively correct hashrate as written in the readme but nowhere near the best miners (around 40%).
I tried to build it, but it threw this error
➜ cryptonight_lib git:(master) cmake .
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib
➜ cryptonight_lib git:(master) ✗ make
Scanning dependencies of target cryptonight_lib
[ 8%] Building C object CMakeFiles/cryptonight_lib.dir/main.c.o
/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib/main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
__declspec(dllexport) void foo()
^
/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib/main.c: In function ‘__declspec’:
/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib/main.c:4:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
{
^
/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib/main.c:3:1: warning: type of ‘dllexport’ defaults to ‘int’ [-Wimplicit-int]
__declspec(dllexport) void foo()
^
/home/islamtaha/PycharmProjects/minerTools/Simple-XMR-Miner/cryptonight_lib/main.c:6:1: error: expected ‘{’ at end of input
}
^
CMakeFiles/cryptonight_lib.dir/build.make:62: recipe for target 'CMakeFiles/cryptonight_lib.dir/main.c.o' failed
make[2]: *** [CMakeFiles/cryptonight_lib.dir/main.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cryptonight_lib.dir/all' failed
make[1]: *** [CMakeFiles/cryptonight_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
➜ cryptonight_lib git:(master) ✗
Erf, it is windows dependent code for symbol export. It should compile if you remove __declspec(dllexport), I will add a define to support win/linux. You can also exclude main.c from the compilation as it was added by error.
it would be nice if u add a doc for linux users :) I will do what u said and update u
I committed the fixes suggested in https://github.com/LysanderGG/Simple-XMR-Miner/issues/3#issuecomment-359450551
I tested it, but its till doesn't work
CMakeFiles/cryptonight_lib.dir/build.make:62: recipe for target 'CMakeFiles/cryptonight_lib.dir/cryptonight.c.o' failed
make[2]: *** [CMakeFiles/cryptonight_lib.dir/cryptonight.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/cryptonight_lib.dir/all' failed
make[1]: *** [CMakeFiles/cryptonight_lib.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Thank you for the return. I will try to compile it on linux when I have time.
@LysanderGG That would be nice. Thanks for your effort.
@islamTaha12 I had some time to make the project compile on Linux, you should be able to compile cryptonight_lib and then running the python script should work. Please try and tell me if you had any problem.
I can confirm compilation on linux works, also on OSX.
Thank you for the confirmation!
I close the issue.
I cloned the repo and tried to run it but It threw this error. It would be nice if u can help
OS ubuntu 16.04