Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS 10.13.1: Error when building (GpuContext.h implicit instantiation of undefined template) #3

Closed
mxjoe opened this issue Oct 30, 2017 · 8 comments
Labels

Comments

@mxjoe
Copy link

mxjoe commented Oct 30, 2017

At first, thank you so much for the AMD version! 👍🏻

I tried to built xmrig-amd under macOS 10.13.1, cmake .. worked but make failed with following error. Versions of xmrig built fine in the past.

Scanning dependencies of target xmrig-amd [ 2%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/Api.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] In file included from /Users/se/xmrig-amd/src/api/Api.cpp:28: In file included from /Users/se/xmrig-amd/src/api/ApiState.h:32: In file included from /Users/se/xmrig-amd/src/workers/OclThread.h:31: /Users/se/xmrig-amd/src/amd/GpuContext.h:68:17: error: implicit instantiation of undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >' std::string name; ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:193:32: note: template is declared here class _LIBCPP_TEMPLATE_VIS basic_string; ^ 1 error generated. make[2]: *** [CMakeFiles/xmrig-amd.dir/src/api/Api.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmrig-amd.dir/all] Error 2 make: *** [all] Error 2

@mxjoe mxjoe changed the title Error when building (GpuContext.h implicit instantiation of undefined template) macOS: Error when building (GpuContext.h implicit instantiation of undefined template) Oct 30, 2017
@mxjoe mxjoe changed the title macOS: Error when building (GpuContext.h implicit instantiation of undefined template) macOS 10.13.1: Error when building (GpuContext.h implicit instantiation of undefined template) Oct 30, 2017
@xmrig xmrig added the bug label Oct 30, 2017
@xmrig
Copy link
Owner

xmrig commented Oct 30, 2017

Should be fixed in 5cd1a9b but I don't check macOS build, others errors may exists.
Thank you.

@mxjoe
Copy link
Author

mxjoe commented Oct 30, 2017

Thanks for your fast reply, you rock!

I pulled the updated code and it does now stop compiling at a different point. Please see attached log.

Scanning dependencies of target xmrig-amd [ 2%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/Api.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 4%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/ApiState.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 7%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/NetworkState.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 9%] Building CXX object CMakeFiles/xmrig-amd.dir/src/App.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 12%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Console.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 14%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Cpu_stub.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 17%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/ConsoleLog.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 19%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/FileLog.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 21%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/Log.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 24%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Client.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 26%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Job.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 29%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Network.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 31%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/DonateStrategy.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 34%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/FailoverStrategy.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 36%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/SinglePoolStrategy.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 39%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/SubmitResult.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 41%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Url.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 43%] Building CXX object CMakeFiles/xmrig-amd.dir/src/amd/OclCLI.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] [ 46%] Building CXX object CMakeFiles/xmrig-amd.dir/src/amd/OclGPU.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] /Users/se/xmrig-amd/src/amd/OclGPU.cpp:34:10: fatal error: 'CL/cl_ext.h' file not found #include <CL/cl_ext.h> ^~~~~~~~~~~~~ 1 error generated. make[2]: *** [CMakeFiles/xmrig-amd.dir/src/amd/OclGPU.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmrig-amd.dir/all] Error 2 make: *** [all] Error 2

xmrig added a commit that referenced this issue Oct 30, 2017
@xmrig
Copy link
Owner

xmrig commented Oct 30, 2017

Oh sorry forgot about this header, fix build again.

@mxjoe
Copy link
Author

mxjoe commented Oct 30, 2017

Thanks for fixing but there seems to exist another bug.

[ 2%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Options.cpp.o clang: warning: argument unused during compilation: '-s' [-Wunused-command-line-argument] In file included from /Users/se/xmrig-amd/src/Options.cpp:42: /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:1259:22: error: call to constructor of 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >' is ambiguous GenericValue v(value); ^ ~~~~~ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:1330:16: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<unsigned long>' requested here return AddMember(n, value, allocator); ^ /Users/se/xmrig-amd/src/Options.cpp:238:13: note: in instantiation of function template specialization 'rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::AddMember<unsigned long>' requested here obj.AddMember("index", thread->index(), allocator); ^ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:634:14: note: candidate constructor explicit GenericValue(int i) RAPIDJSON_NOEXCEPT : data_() { ^ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:640:14: note: candidate constructor explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_() { ^ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:646:14: note: candidate constructor explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_() { ^ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:661:14: note: candidate constructor explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() { ^ /Users/se/xmrig-amd/src/3rdparty/rapidjson/document.h:673:14: note: candidate constructor explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_() { data_.n.d = d; data_.f.flags = kNumberDoubleFlag; } ^ 1 error generated. make[2]: *** [CMakeFiles/xmrig-amd.dir/src/Options.cpp.o] Error 1 make[1]: *** [CMakeFiles/xmrig-amd.dir/all] Error 2 make: *** [all] Error 2

xmrig added a commit that referenced this issue Oct 30, 2017
@xmrig
Copy link
Owner

xmrig commented Oct 30, 2017

Build now finally fixed, I checked it.
Thank you.

@mxjoe
Copy link
Author

mxjoe commented Oct 31, 2017

Yes, it builds fine now, although it seems not to find the AMD GPU when started, but that's a different story. Nevertheless, thank you! 👍🏻

Scanning dependencies of target xmrig-amd [ 2%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/Api.cpp.o [ 4%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/ApiState.cpp.o [ 7%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/NetworkState.cpp.o [ 9%] Building CXX object CMakeFiles/xmrig-amd.dir/src/App.cpp.o [ 12%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Console.cpp.o [ 14%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Cpu_stub.cpp.o [ 17%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/ConsoleLog.cpp.o [ 19%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/FileLog.cpp.o [ 21%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/Log.cpp.o [ 24%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Client.cpp.o [ 26%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Job.cpp.o [ 29%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Network.cpp.o [ 31%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/DonateStrategy.cpp.o [ 34%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/FailoverStrategy.cpp.o [ 36%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/strategies/SinglePoolStrategy.cpp.o [ 39%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/SubmitResult.cpp.o [ 41%] Building CXX object CMakeFiles/xmrig-amd.dir/src/net/Url.cpp.o [ 43%] Building CXX object CMakeFiles/xmrig-amd.dir/src/amd/OclCLI.cpp.o [ 46%] Building CXX object CMakeFiles/xmrig-amd.dir/src/amd/OclGPU.cpp.o [ 48%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Options.cpp.o [ 51%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Platform.cpp.o [ 53%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Summary.cpp.o [ 56%] Building CXX object CMakeFiles/xmrig-amd.dir/src/workers/OclWorker.cpp.o [ 58%] Building CXX object CMakeFiles/xmrig-amd.dir/src/workers/OclThread.cpp.o [ 60%] Building CXX object CMakeFiles/xmrig-amd.dir/src/workers/Handle.cpp.o [ 63%] Building CXX object CMakeFiles/xmrig-amd.dir/src/workers/Hashrate.cpp.o [ 65%] Building CXX object CMakeFiles/xmrig-amd.dir/src/workers/Workers.cpp.o [ 68%] Building CXX object CMakeFiles/xmrig-amd.dir/src/xmrig.cpp.o [ 70%] Building CXX object CMakeFiles/xmrig-amd.dir/src/App_unix.cpp.o [ 73%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Cpu_mac.cpp.o [ 75%] Building CXX object CMakeFiles/xmrig-amd.dir/src/Platform_mac.cpp.o [ 78%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_keccak.c.o [ 80%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_groestl.c.o [ 82%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_blake256.c.o [ 85%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_jh.c.o [ 87%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/c_skein.c.o [ 90%] Building C object CMakeFiles/xmrig-amd.dir/src/crypto/soft_aes.c.o [ 92%] Building CXX object CMakeFiles/xmrig-amd.dir/src/crypto/CryptoNight.cpp.o [ 95%] Building CXX object CMakeFiles/xmrig-amd.dir/src/log/SysLog.cpp.o [ 97%] Building CXX object CMakeFiles/xmrig-amd.dir/src/api/Httpd.cpp.o [100%] Linking CXX executable xmrig-amd [100%] Built target xmrig-amd

@mxjoe mxjoe closed this as completed Oct 31, 2017
@Canubiz
Copy link

Canubiz commented Jan 13, 2018

@mxjoe - may I ask how exactly you managed to build this? It seems the build instructions are gone and the wiki is disabled completely now. Sharing any details would be highly appreciated. :) 👍

@mxjoe
Copy link
Author

mxjoe commented Jan 18, 2018

@Canubiz Sure, I followed the instructions for xmrig, it worked: https://github.com/xmrig/xmrig/wiki/OS-X-Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants