Closed briard51 closed 7 years ago
Could you fully clean the build directory and compile again. If I understand you correct the first compile was fine only a make clean fails. Is this correct?
No, that's not the issue. I try to reproduce the issue I've got on my laptop with a clean build folder before the build.
Maybe someone from the community can help you, I have no MAC to reproduce the issue.
./xmr-stak
-------------------------------------------------------------------
xmr-stak 2.0.0-predev mining software.
Based on CPU mining code by wolf9466 (heavily optimized by fireice_uk).
NVIDIA mining code was written by KlausT and psychocrypt.
Brought to you by fireice_uk and psychocrypt under GPLv3.
Configurable dev donation level is set to 2.0 %
You can use following keys to display reports:
'h' - hashrate
'r' - results
'c' - connection
-------------------------------------------------------------------
WARNING: NVIDIA cannot load backend library: dlopen(./libxmrstak_cuda_backend.so, 1): image not found
WARNING: NVIDIA Backend disabled
[2017-10-27 16:13:25] : WARNING: backend NVIDIA disabled.
[2017-10-27 16:13:25] : hwloc: set_thisthread_membind not supported
[2017-10-27 16:13:25] : WARNING on MacOS thread affinity is only advisory.
[2017-10-27 16:13:25] : Starting single thread, affinity: 0.
[2017-10-27 16:13:25] : hwloc: set_thisthread_membind not supported
[2017-10-27 16:13:25] : WARNING on MacOS thread affinity is only advisory.
[2017-10-27 16:13:25] : Starting single thread, affinity: 2.
[2017-10-27 16:13:25] : hwloc: set_thisthread_membind not supported
[2017-10-27 16:13:25] : WARNING on MacOS thread affinity is only advisory.
[2017-10-27 16:13:25] : Starting single thread, affinity: 4.
[2017-10-27 16:13:25] : Connecting to pool xmr-eu1.nanopool.org:14444 ...
[2017-10-27 16:13:26] : Connected. Logging in...
[2017-10-27 16:13:26] : Difficulty changed. Now: 120001.
[2017-10-27 16:13:26] : Pool switched.
[2017-10-27 16:13:31] : New block detected.
So the issue is related with CUDA backend which isn't linked at the end of the compilation.
Thanx Psychocrypt for your answer!
@briard51 *.so are dynamic libraries. They are linked during runtime, not compilation. Can you go back to your make output and check if the nvidia backend compiled without errors?
Yes NVIDIA backend is not found due to the broken build.
@psychocrypt this is likely to be an issue on every MAC
The problems here are:
The first problem can get low-level technical very fast, do you feel up to this one or would you prefer if I handle it?
I post my CMakeOutput.log
The system is: Darwin - 17.0.0 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
The C compiler identification is AppleClang, found in "/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/3.9.4/CompilerIdC/a.out"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
The CXX compiler identification is AppleClang, found in "/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/3.9.4/CompilerIdCXX/a.out"
Determining if the C compiler works passed with the following output:
Change Dir: /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_84adb/fast"
gmake[1]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
/usr/local/bin/gmake -f CMakeFiles/cmTC_84adb.dir/build.make CMakeFiles/cmTC_84adb.dir/build
gmake[2]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_84adb.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -o CMakeFiles/cmTC_84adb.dir/testCCompiler.c.o -c /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_84adb
/usr/local/Cellar/cmake/3.9.4_1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84adb.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_84adb.dir/testCCompiler.c.o -o cmTC_84adb
gmake[2]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
gmake[1]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Detecting C compiler ABI info compiled with the following output:
Change Dir: /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_8ce1a/fast"
gmake[1]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
/usr/local/bin/gmake -f CMakeFiles/cmTC_8ce1a.dir/build.make CMakeFiles/cmTC_8ce1a.dir/build
gmake[2]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -o CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -c /usr/local/Cellar/cmake/3.9.4_1/share/cmake/Modules/CMakeCCompilerABI.c
Linking C executable cmTC_8ce1a
/usr/local/Cellar/cmake/3.9.4_1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ce1a.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wl,-search_paths_first -Wl,-headerpad_max_install_names -v -Wl,-v CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -o cmTC_8ce1a
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Found CUDA installation: /usr/local/cuda, version 8.0
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_8ce1a -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a
@(#)PROGRAM:ld PROJECT:ld64-302.3
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
Library search paths:
/usr/lib
/usr/local/lib
Framework search paths:
/Library/Frameworks/
/System/Library/Frameworks/
gmake[2]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
gmake[1]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp]
ignore line: []
ignore line: [Run Build Command:"/usr/local/bin/gmake" "cmTC_8ce1a/fast"]
ignore line: [gmake[1]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp']
ignore line: [/usr/local/bin/gmake -f CMakeFiles/cmTC_8ce1a.dir/build.make CMakeFiles/cmTC_8ce1a.dir/build]
ignore line: [gmake[2]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp']
ignore line: [Building C object CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o]
ignore line: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -o CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -c /usr/local/Cellar/cmake/3.9.4_1/share/cmake/Modules/CMakeCCompilerABI.c]
ignore line: [Linking C executable cmTC_8ce1a]
ignore line: [/usr/local/Cellar/cmake/3.9.4_1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ce1a.dir/link.txt --verbose=1]
ignore line: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wl,-search_paths_first -Wl,-headerpad_max_install_names -v -Wl,-v CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -o cmTC_8ce1a ]
ignore line: [Apple LLVM version 9.0.0 (clang-900.0.38)]
ignore line: [Target: x86_64-apple-darwin17.0.0]
ignore line: [Thread model: posix]
ignore line: [InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin]
ignore line: [Found CUDA installation: /usr/local/cuda, version 8.0]
link line: [ "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o cmTC_8ce1a -search_paths_first -headerpad_max_install_names -v CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a]
arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld] ==> ignore
arg [-demangle] ==> ignore
arg [-lto_library] ==> ignore, skip following value
arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib] ==> skip value of -lto_library
arg [-dynamic] ==> ignore
arg [-arch] ==> ignore
arg [x86_64] ==> ignore
arg [-macosx_version_min] ==> ignore
arg [10.13.0] ==> ignore
arg [-o] ==> ignore
arg [cmTC_8ce1a] ==> ignore
arg [-search_paths_first] ==> ignore
arg [-headerpad_max_install_names] ==> ignore
arg [-v] ==> ignore
arg [CMakeFiles/cmTC_8ce1a.dir/CMakeCCompilerABI.c.o] ==> ignore
arg [-lSystem] ==> lib [System]
arg [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a] ==> lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a]
Library search paths: [;/usr/lib;/usr/local/lib]
Framework search paths: [;/Library/Frameworks/;/System/Library/Frameworks/]
remove lib [System]
remove lib [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a]
collapse library dir [/usr/lib] ==> [/usr/lib]
collapse library dir [/usr/local/lib] ==> [/usr/local/lib]
collapse framework dir [/Library/Frameworks/] ==> [/Library/Frameworks]
collapse framework dir [/System/Library/Frameworks/] ==> [/System/Library/Frameworks]
implicit libs: []
implicit dirs: [/usr/lib;/usr/local/lib]
implicit fwks: [/Library/Frameworks;/System/Library/Frameworks]
Detecting C [-std=c11] compiler features compiled with the following output:
Change Dir: /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_25b28/fast"
gmake[1]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
/usr/local/bin/gmake -f CMakeFiles/cmTC_25b28.dir/build.make CMakeFiles/cmTC_25b28.dir/build
gmake[2]: Entering directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_25b28.dir/feature_tests.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -std=c11 -o CMakeFiles/cmTC_25b28.dir/feature_tests.c.o -c /Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/feature_tests.c
Linking C executable cmTC_25b28
/usr/local/Cellar/cmake/3.9.4_1/bin/cmake -E cmake_link_script CMakeFiles/cmTC_25b28.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cmTC_25b28.dir/feature_tests.c.o -o cmTC_25b28
gmake[2]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
gmake[1]: Leaving directory '/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/CMakeTmp'
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
The system is: Darwin - 17.0.0 - x86_64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: /Applications/Xcode82.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
The C compiler identification is AppleClang, found in "/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/3.9.4/CompilerIdC/a.out"
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler: /Applications/Xcode82.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
Build flags:
Id flags:
The output was:
0
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
The CXX compiler identification is AppleClang, found in "/Users/tux/Documents/coin/monero/xmr-stak/CMakeFiles/3.9.4/CompilerIdCXX/a.out"
When I read the log, my OS is on 10.13 or Xcode 8.2 seems to be develop until 10.12 and doesn't recognize my early version of OSX.
If it's true, my issue maybe concern only myself with my old Nvidia Geforce 550M which can't build with recent Xcode and CUDA9 (Xcode 8.3.3 for CUDA9). With CUDA 8 and Xcode 8.2, I succédant to build xmrig-nvidia.
So I don't know ..
Yes 550M is a fermi gpu (as I know) and fermi is no longer supported by nvidia with cuda 9.0. Pease check the nvidia page if there are also limitations on MacOS (naybe clang version, ...)
I'm wrong, my GPU is 650M.
I also try to install CUDA9 with XCODE 8.3 but the CUDA driver didn't work, that's why I downgrade to CUDA 8.
Could you please test #76 maybe this will solve your issue
I downloaded your zip from your own repo, I use this cmake flags:
cmake . -DMICROHTTPD_ENABLE=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCUDA_ARCH=30 -DOpenCL_ENABLE=OFF -DXMR-STAK_CURRENCY=monero
and I've got the same issue, sorry ...
[100%] Linking CXX shared library bin/libxmrstak_cuda_backend.dylib
Undefined symbols for architecture x86_64:
"bindMemoryToNUMANode(unsigned long)", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"win_exit()", referenced from:
xmrstak::nvidia::minethd::thread_starter(unsigned int, xmrstak::miner_work&) in minethd.cpp.o
"jconf::GetCurrency()", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"jconf::IsCurrencyMonero()", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
_cryptonight_extra_cpu_init in xmrstak_cuda_backend_generated_cuda_extra.cu.o
_cuda_get_deviceinfo in xmrstak_cuda_backend_generated_cuda_extra.cu.o
"jconf::jconf()", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
xmrstak::nvidia::minethd::self_test() in minethd.cpp.o
_cryptonight_extra_cpu_init in xmrstak_cuda_backend_generated_cuda_extra.cu.o
_cuda_get_deviceinfo in xmrstak_cuda_backend_generated_cuda_extra.cu.o
"printer::print_msg(verbosity, char const*, ...)", referenced from:
xmrstak::nvidia::jconf::parse_config(char const*) in jconf.cpp.o
xmrstak::nvidia::minethd::minethd(xmrstak::miner_work&, unsigned long, xmrstak::nvidia::jconf::thd_cfg const&) in minethd.cpp.o
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
xmrstak::nvidia::minethd::thread_starter(unsigned int, xmrstak::miner_work&) in minethd.cpp.o
xmrstak::nvidia::autoAdjust::printConfig() in minethd.cpp.o
xmrstak::nvidia::autoAdjust::generateThreadConfig() in minethd.cpp.o
"printer::printer()", referenced from:
xmrstak::nvidia::jconf::parse_config(char const*) in jconf.cpp.o
xmrstak::nvidia::minethd::minethd(xmrstak::miner_work&, unsigned long, xmrstak::nvidia::jconf::thd_cfg const&) in minethd.cpp.o
printer::inst() in minethd.cpp.o
xmrstak::nvidia::minethd::thread_starter(unsigned int, xmrstak::miner_work&) in minethd.cpp.o
xmrstak::nvidia::autoAdjust::printConfig() in minethd.cpp.o
xmrstak::nvidia::autoAdjust::generateThreadConfig() in minethd.cpp.o
"xmrstak::cpu::minethd::func_selector(bool, bool, bool)", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"xmrstak::cpu::minethd::thd_setaffinity(_opaque_pthread_t*, unsigned long long)", referenced from:
xmrstak::nvidia::minethd::minethd(xmrstak::miner_work&, unsigned long, xmrstak::nvidia::jconf::thd_cfg const&) in minethd.cpp.o
"xmrstak::cpu::minethd::minethd_alloc_ctx()", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"xmrstak::strcmp_i(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"executor::log_result_error(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
"executor::executor()", referenced from:
xmrstak::nvidia::minethd::work_main() in minethd.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/libxmrstak_cuda_backend.dylib] Error 1
make[1]: *** [CMakeFiles/xmrstak_cuda_backend.dir/all] Error 2
make: *** [all] Error 2
I think I need to check how OSX is dynamicly linking. I need to check how I can install CUDA in the OSX travis tests. The hard point is that I have no access to an OSX system. If you can provide me with ssh (no root access) to an OSX system for max 2 or 3 days where cuda, git and clang is installed I think I can fix it very fast.
@briard51 Could you please check if #84 is solving you linker issue.
Yes! This fix resolve the build issue! I haven't tested yet if the CUDA miner run.
Now the issue is the program doesn't recognize the libxmrstak_cuda_backend.dylib to launch the CUDA Miner. I tested to copy this file libxmrstak_cuda_backend.dylib to libxmrstak_cuda_backend.so and it works!
Thx I will add a fix for OSX that the file ending is .dylib
The runtime library issue should be solved with #85
I confirm that your two changes resolves the issue with OSX Nvidia devices !
I tested all night long xmr-stak and it's amazing!
Thank you for everything! :-)
THX for the tests and for opening the issue. The community feedback is very important to increase the code quallity.
Hi,
Thank your for developing this great xmr miner! After successful build on Linux, I would like to build on my MacBook Pro Retina 2012 (with Nvidia inside). My laptop begins to be to old to support CUDA 9, so I use the latest CUDA 8 with Xcode 8.2
sudo xcode-select -s /Applications/Xcode82.app/Contents/Developer/
I choose to use the cmake options in the .travis.yml for Mac :
cmake -DMICROHTTPD_ENABLE=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DOpenCL_ENABLE=OFF ..
in xmr-stak/build folder. No issue when configuring the build with cmake, then after make clean and make, I've got this issue:I don't know how to resolve this issue ...
Thanks in advance for your help! 👍