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

Build kawpow on OSX #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Build kawpow on OSX #27

wants to merge 2 commits into from

Conversation

hwh57
Copy link

@hwh57 hwh57 commented May 11, 2020

These changes get kawpow to build on OSX (Catalina 10.15.4) however it still doesn't mine. Perhaps someone with an iGPU (I'm using an eGPU) can try it out:

[CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (517)
Break on OpenCLErrorBreak to debug.
OpenCL Warning : clBuildProgram failed: could not build program for 0x1021c00 (AMD Radeon RX 570 Compute Engine) (err:-2)
Break on OpenCLWarningBreak to debug.
[CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log:
Error returned by cvms_element_build_from_source

Break on OpenCLErrorBreak to debug.

@userid6789
Copy link

userid6789 commented May 18, 2020

These changes get kawpow to build on OSX (Catalina 10.15.4) however it still doesn't mine. Perhaps someone with an iGPU (I'm using an eGPU) can try it out:

Can you post your commands here to compile on Mac OS? (using cmake)

@hwh57
Copy link
Author

hwh57 commented May 19, 2020

Sure, I essentially used the commands from the README modified for my GPU type (AMD RX 570):

cd kawpowminer
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF
make -sj $(nproc)

I needed to install xcode and cmake (via homebrew) but that was it.

@userid6789
Copy link

Sure, I essentially used the commands from the README modified for my GPU type (AMD RX 570):
I needed to install xcode and cmake (via homebrew) but that was it.

Thank You! That got me a whole lot closer. It's compiling for me using your git branch, but with errors. Looks like it's trying to find OpenCL2.2 but I believe most Macs use OpenCL 1.2.

@uhrohraggy
Copy link

uhrohraggy commented Jun 20, 2020

This fork allowed me to get past the Apple clang error with the master build. Agree am not able to mine but can build. Am on Catalina 10.15.5 (19F101), GPU Intel Iris Graphics 540 1536 MB

Here's the output with the same build steps as @hwh57

MacBook-Pro.local:~/kpm/mac-fork/kawpowminer/build/kawpowminer$ ./kawpowminer -P stratum://foo.barWorker:[email protected]:8888


kawpowminer 1.2.3+commit.6defed0d
Build: darwin/release/appleclang

 i 21:53:36           Configured pool rvn.suprnova.cc:8888
 i 21:53:36           Selected pool rvn.suprnova.cc:8888
 i 21:53:39           Negotiation of EthereumStratum/2.0.0 failed. Trying another ...
 i 21:53:39           Negotiation of EthereumStratum/1.0.0 (NiceHash) failed. Trying another ...
 m 21:53:41           0:00 A0 0.00 h - 
 i 21:53:42           Negotiation of Eth-Proxy compatible failed. Trying another ...
 i 21:53:42           Stratum mode : Stratum
 i 21:53:42           Established connection to rvn.suprnova.cc [5.39.65.109:8888]
 i 21:53:42           Spinning up miners...
 i 21:53:42           Extranonce set to 6de55d
 i 21:53:42           New target set to: 00000004fb000000000000000000000000000000000000000000000000000000
 i 21:53:42           Epoch : 171 Difficulty : 862.35 Mh
 i 21:53:42           Job: a68fcdb3… block 1283654 rvn.suprnova.cc [5.39.65.109:8888]
cl 21:53:42 cl-0      Creating buffers
cl 21:53:42 cl-0      Using PciId :  Intel(R) Iris(TM) Graphics 540 OpenCL 1.2  Memory : 1.50 GB
 i 21:53:42 cl-0      Adjusting CL work multiplier for 48 CUs. Adjusted work multiplier: 43,691
 i 21:53:44           Authorized worker uhrohraggy.wrkrdYQ6wr16ZfvE
cl 21:53:44 cl-0      Unable to lower compiler priority.
 X 21:53:45 cl-0      OpenCL kernel build log:
<program source>:218:6: warning: no previous prototype for function 'keccak_f800_round'
void keccak_f800_round(uint32_t st[25], const int r)
     ^
<program source>:263:10: warning: no previous prototype for function 'keccak_f800'
uint64_t keccak_f800(uint32_t* st)
         ^
<program source>:270:1: warning: control reaches end of non-void function
}
^
<program source>:282:10: warning: no previous prototype for function 'kiss99'
uint32_t kiss99(kiss99_t* st)
         ^
<program source>:294:6: warning: no previous prototype for function 'fill_mix'
void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix)
     ^
<program source>:407:18: error: passing 'uint32_t *' (aka 'unsigned int *') to parameter of type '__local uint32_t *' (aka '__local unsigned int *') changes address space of pointer
        fill_mix(share[group_id].uint32s, lane_id, mix);
                 ^~~~~~~~~~~~~~~~~~~~~~~
<program source>:294:31: note: passing argument to parameter 'seed' here
void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix)
                              ^
<program source>:489:9: warning: 'FNV_PRIME' macro redefined
#define FNV_PRIME 0x01000193
        ^
<program source>:183:9: note: previous definition is here
#define FNV_PRIME 0x1000193
        ^
<program source>:535:26: warning: unknown OpenCL extension 'cl_amd_media_ops' - ignoring
#pragma OPENCL EXTENSION cl_amd_media_ops : enable
                         ^
<program source>:540:16: warning: implicit declaration of function 'amd_bitalign' is invalid in C99
        return amd_bitalign((vv).xy, (vv).yx, 32 - r);
               ^

 X 21:53:45 cl-0      OpenCL kernel build error (-11):
clBuildProgram
cl 21:53:45 cl-0      Loaded period 427,884 progpow kernel
cl 21:53:45 cl-0      Unable to lower compiler priority.
 X 21:53:45 cl-0      OpenCL kernel build log:
<program source>:218:6: warning: no previous prototype for function 'keccak_f800_round'
void keccak_f800_round(uint32_t st[25], const int r)
     ^
<program source>:263:10: warning: no previous prototype for function 'keccak_f800'
uint64_t keccak_f800(uint32_t* st)
         ^
<program source>:270:1: warning: control reaches end of non-void function
}
^
<program source>:282:10: warning: no previous prototype for function 'kiss99'
uint32_t kiss99(kiss99_t* st)
         ^
<program source>:294:6: warning: no previous prototype for function 'fill_mix'
void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix)
     ^
<program source>:407:18: error: passing 'uint32_t *' (aka 'unsigned int *') to parameter of type '__local uint32_t *' (aka '__local unsigned int *') changes address space of pointer
        fill_mix(share[group_id].uint32s, lane_id, mix);
                 ^~~~~~~~~~~~~~~~~~~~~~~
<program source>:294:31: note: passing argument to parameter 'seed' here
void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix)
                              ^
<program source>:489:9: warning: 'FNV_PRIME' macro redefined
#define FNV_PRIME 0x01000193
        ^
<program source>:183:9: note: previous definition is here
#define FNV_PRIME 0x1000193
        ^
<program source>:535:26: warning: unknown OpenCL extension 'cl_amd_media_ops' - ignoring
#pragma OPENCL EXTENSION cl_amd_media_ops : enable
                         ^
<program source>:540:16: warning: implicit declaration of function 'amd_bitalign' is invalid in C99
        return amd_bitalign((vv).xy, (vv).yx, 32 - r);
               ^

 X 21:53:45 cl-0      OpenCL kernel build error (-11):
clBuildProgram
 m 21:53:46           0:00 A0 0.00 h - cl0 0.00
 m 21:53:51           0:00 A0 0.00 h - cl0 0.00
 m 21:53:56           0:00 A0 0.00 h - cl0 0.00
 i 21:54:00           Job: 87035900… block 1283655 rvn.suprnova.cc [5.39.65.109:8888]
 m 21:54:01           0:00 A0 0.00 h - cl0 0.00
 m 21:54:06           0:00 A0 0.00 h - cl0 0.00

@uhrohraggy
Copy link

When I run cmake .. -DETHASHCUDA=ON it complains on not finding CUDA

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.18/Modules/FindCUDA.cmake:715 (message):
  Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
  libhwmon/CMakeLists.txt:19 (find_package)

but having an Intel graphics card, I don't think it supports CUDA.

If I run cmake .. -DETHASHCUDA=OFF it builds successfully but during make -sj $(nproc) I see the following warnings:

[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 40%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolURI.cpp.o
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapadl.cpp:40:2: warning: "Unrecognized platform: need ADL DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need ADL DLL path for this platform..."
 ^
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapnvml.cpp:52:2: warning: "Unrecognized platform: need NVML DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need NVML DLL path for this platform..."
 ^
[ 42%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
1 warning generated.
1 warning generated.
[ 48%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o

Hope it helps

@mrsubtle
Copy link

When I run cmake .. -DETHASHCUDA=ON it complains on not finding CUDA

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.18/Modules/FindCUDA.cmake:715 (message):
  Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
  libhwmon/CMakeLists.txt:19 (find_package)

but having an Intel graphics card, I don't think it supports CUDA.

If I run cmake .. -DETHASHCUDA=OFF it builds successfully but during make -sj $(nproc) I see the following warnings:

[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 40%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolURI.cpp.o
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapadl.cpp:40:2: warning: "Unrecognized platform: need ADL DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need ADL DLL path for this platform..."
 ^
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapnvml.cpp:52:2: warning: "Unrecognized platform: need NVML DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need NVML DLL path for this platform..."
 ^
[ 42%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
1 warning generated.
1 warning generated.
[ 48%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o

Hope it helps

CUDA would only be for your Mac with an NVIDIA card--if you have an AMD card, you should use...

cd kawpowminer
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF
make -sj $(nproc)

...as suggested above. There could still be problems with newer AMD cards and Macs that don't have driver support for OpenCL. At least, as I understand it.
I'll also give this build a try on my 16" MBP (AMD Radeon Pro 5500M 8GB) and see how it works.

@mrsubtle
Copy link

Looks like I'm unable to build the project.

MACUSER_ID@WMACMACUSER_ID kawpowminer-hwh57 % git submodule update --init --recursive
mkdir build
cd build
cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF
make -sj $(nproc)
-- [cable ] Cable 0.2.14 initialized
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [cable ] Build type: Release
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /Users/MACUSER_ID/.hunter
-- [hunter] [ Hunter-ID: 88ea6d3 | Toolchain-ID: 99f2527 | Config-ID: 7ff0f2a ]
-- [hunter] BOOST_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.72.0-p1)
-- [hunter] BOOST_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.72.0-p1)
-- [hunter] BOOST_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.72.0-p1)
-- [hunter] BOOST_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.72.0-p1)
-- Boost version: 1.72.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- [hunter] JSONCPP_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.8.0)
-- [hunter] ETHASH_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.0.0)
----------------------------------------------------------------------------
-- CMake 3.19.7
-- Build Release / Darwin
----------------------------------------------------------------- components
-- ETHASHCL         Build OpenCL components                      ON
-- ETHASHCUDA       Build CUDA components                        OFF
-- ETHASHCPU        Build CPU components (only for development)  OFF
-- ETHDBUS          Build D-Bus components                       OFF
-- APICORE          Build API Server components                  ON
-- DEVBUILD         Build with dev logging                       OFF
----------------------------------------------------------------------------

-- Performing Test ffunction-sections
-- Performing Test ffunction-sections - Success
-- Performing Test fdata-sections
-- Performing Test fdata-sections - Success
-- Performing Test Wl,--gc-sections
-- Performing Test Wl,--gc-sections - Success
-- Found Git: /usr/bin/git (found version "2.24.3 (Apple Git-128)") 
-- [hunter] OPENSSL_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.1.1d)
-- Found OpenSSL: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libssl.a;/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libcrypto.a (found version "1.1.1d") 
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - not found
-- Looking for CL_VERSION_1_2
-- Looking for CL_VERSION_1_2 - found
-- Found OpenCL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenCL.framework (found version "1.2") 
-- [hunter] CLI11_ROOT: /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install (ver.: 1.8.0)
CMake Warning (dev) at kawpowminer/CMakeLists.txt:17 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable CLI11_ROOT is set to:

    /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install

  Environment variable CLI11_ROOT is set to:

    /Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /Users/MACUSER_ID/Documents/_mine/RVN/kawpowminer-hwh57/build
Scanning dependencies of target kawpowminer-buildinfo-git
Scanning dependencies of target progpow
Scanning dependencies of target devcore
[  2%] Building CXX object libprogpow/CMakeFiles/progpow.dir/ProgPow.cpp.o
[  2%] Built target kawpowminer-buildinfo-git
[  5%] Updating kawpowminer-buildinfo:
       Project Version:  1.2.3+commit.6defed0d (prerelease)
       System Name:      darwin
       System Processor: x86_64
       Compiler ID:      appleclang
       Compiler Version: 12.0.0.12000032
       Build Type:       release
       Git Info:           6defed0d329f2330a58e2ab73841a29a74343928
       Timestamp:        2021-03-18T14:49:42
Scanning dependencies of target kawpowminer-buildinfo
[  8%] Building C object CMakeFiles/kawpowminer-buildinfo.dir/kawpowminer/buildinfo.c.o
[ 11%] Linking C static library kawpowminer/libkawpowminer-buildinfo.a
[ 11%] Built target kawpowminer-buildinfo
[ 14%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 17%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 20%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 22%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 25%] Linking CXX static library libprogpow.a
[ 25%] Built target progpow
[ 28%] Linking CXX static library libdevcore.a
[ 28%] Built target devcore
Scanning dependencies of target hwmon
Scanning dependencies of target poolprotocols
[ 31%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o
[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapnvml.cpp.o
[ 40%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wraphelper.cpp.o
[ 40%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 42%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolURI.cpp.o
[ 45%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
[ 48%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/testing/SimulateClient.cpp.o
[ 57%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/uint256.cpp.o
[ 60%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/EthStratumClient.cpp.o
[ 60%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/utilstrencodings.cpp.o
[ 60%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/stratum/arith_uint256.cpp.o
[ 62%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/getwork/EthGetworkClient.cpp.o
/Users/MACUSER_ID/Documents/_mine/RVN/kawpowminer-hwh57/libhwmon/wrapnvml.cpp:52:2: warning: 
      "Unrecognized platform: need NVML DLL path for this platform..."
      [-W#warnings]
#warning "Unrecognized platform: need NVML DLL path for this platform..."
 ^
/Users/MACUSER_ID/Documents/_mine/RVN/kawpowminer-hwh57/libhwmon/wrapadl.cpp:40:2: warning: 
      "Unrecognized platform: need ADL DLL path for this platform..."
      [-W#warnings]
#warning "Unrecognized platform: need ADL DLL path for this platform..."
 ^
1 warning generated.
1 warning generated.
[ 65%] Linking CXX static library libhwmon.a
[ 65%] Built target hwmon
[ 68%] Generating OpenCL Kernel
Scanning dependencies of target ethash-cl
/Users/MACUSER_ID/Documents/_mine/RVN/kawpowminer-hwh57/libpoolprotocols/stratum/EthStratumClient.cpp:1394:26: warning: 
      unused variable 'fCancelJob' [-Wunused-variable]
                    bool fCancelJob = jPrm.get(Json::Value::ArrayIndex(p...
                         ^
[ 71%] Building CXX object libethash-cl/CMakeFiles/ethash-cl.dir/CLMiner.cpp.o
[ 74%] Linking CXX static library libethash-cl.a
[ 74%] Built target ethash-cl
Scanning dependencies of target ethcore
[ 77%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o
[ 80%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Farm.cpp.o
[ 82%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Miner.cpp.o
1 warning generated.
[ 85%] Linking CXX static library libpoolprotocols.a
[ 85%] Built target poolprotocols
[ 88%] Linking CXX static library libethcore.a
[ 88%] Built target ethcore
Scanning dependencies of target apicore
[ 91%] Building CXX object libapicore/CMakeFiles/apicore.dir/ApiServer.cpp.o
[ 94%] Linking CXX static library libapicore.a
[ 94%] Built target apicore
Scanning dependencies of target kawpowminer
[ 97%] Building CXX object kawpowminer/CMakeFiles/kawpowminer.dir/main.cpp.o
[100%] Linking CXX executable kawpowminer
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_alloc_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_ptr boost::exception_detail::get_static_exception_object<boost::exception_detail::bad_exception_>()::ep' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::rethrow() const' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'typeinfo for boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>::rethrow() const' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'typeinfo for boost::exception_detail::clone_impl<boost::exception_detail::bad_alloc_>' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'boost::exception_detail::clone_impl<boost::exception_detail::bad_exception_>::rethrow() const' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'typeinfo for boost::exception_detail::clone_impl<boost::exception_detail::bad_exception_>' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'virtual thunk to boost::exception_detail::clone_impl<boost::exception_detail::bad_exception_>::rethrow() const' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'typeinfo for boost::exception_detail::clone_impl<boost::exception_detail::bad_exception_>' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.5' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_alloc_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.5' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_alloc_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.5' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_alloc_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.6' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_exception_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.6' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_exception_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '___cxx_global_var_init.6' from file '/Users/MACUSER_ID/.hunter/_Base/88ea6d3/99f2527/7ff0f2a/Install/lib/libboost_thread-mt-x64.a(thread.o)' to global weak symbol 'guard variable for boost::exception_detail::exception_ptr_static_exception_object<boost::exception_detail::bad_exception_>::e' from file 'CMakeFiles/kawpowminer.dir/main.cpp.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
[100%] Built target kawpowminer

@AMJ-7
Copy link

AMJ-7 commented Mar 19, 2021

When I run cmake .. -DETHASHCUDA=ON it complains on not finding CUDA

CMake Error at /Applications/CMake.app/Contents/share/cmake-3.18/Modules/FindCUDA.cmake:715 (message):
  Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
  libhwmon/CMakeLists.txt:19 (find_package)

but having an Intel graphics card, I don't think it supports CUDA.
If I run cmake .. -DETHASHCUDA=OFF it builds successfully but during make -sj $(nproc) I see the following warnings:

[ 37%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 40%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolURI.cpp.o
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapadl.cpp:40:2: warning: "Unrecognized platform: need ADL DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need ADL DLL path for this platform..."
 ^
/Users/michaelmoore/kpm/mac-fork/kawpowminer/libhwmon/wrapnvml.cpp:52:2: warning: "Unrecognized platform: need NVML DLL path for this platform..." [-W#warnings]
#warning "Unrecognized platform: need NVML DLL path for this platform..."
 ^
[ 42%] Building CXX object libpoolprotocols/CMakeFiles/poolprotocols.dir/PoolManager.cpp.o
1 warning generated.
1 warning generated.
[ 48%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o

Hope it helps

CUDA would only be for your Mac with an NVIDIA card--if you have an AMD card, you should use...

cd kawpowminer
git submodule update --init --recursive
mkdir build
cd build
cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF
make -sj $(nproc)

...as suggested above. There could still be problems with newer AMD cards and Macs that don't have driver support for OpenCL. At least, as I understand it.
I'll also give this build a try on my 16" MBP (AMD Radeon Pro 5500M 8GB) and see how it works.

Thank. you helped me a lot :D

@AMJ-7
Copy link

AMJ-7 commented Mar 19, 2021

After successfully building, i faced these issues :(

macbook pro 16" (AMD Radeon Pro 5500M 4GB) - Big Sur 11.2.2

kawpowminer 1.2.3+commit.6defed0d
Build: darwin/release/appleclang

i 19:37:56 Configured pool rvn.cruxpool.com:9999
i 19:37:56 Selected pool rvn.cruxpool.com:9999
i 19:37:57 Stratum mode : Stratum
i 19:37:57 Established connection to rvn.cruxpool.com [144.217.180.180:9999]
i 19:37:57 Spinning up miners...
i 19:37:57 Extranonce set to 330b
i 19:37:57 New target set to: 000000027d800000000000000000000000000000000000000000000000000000
i 19:37:57 Epoch : 223 Difficulty : 1.72 Gh
i 19:37:57 Job: 67cf4da5… block 1673861 rvn.cruxpool.com [144.217.180.180:9999]
cl 19:37:58 cl-0 Creating buffers
cl 19:37:58 cl-0 Using PciId : AMD Radeon Pro 5500M Compute Engine OpenCL 1.2 Memory : 3.98 GB
i 19:37:58 cl-0 Adjusting CL work multiplier for 24 CUs. Adjusted work multiplier: 21846
i 19:37:58 Authorized worker RXkG5ufiW8wTUaeYA9sADw6tmcyZ84KFLG.amr
cl 19:37:58 cl-0 Unable to lower compiler priority.
X 19:37:58 cl-0 OpenCL kernel build log:
:220:6: warning: no previous prototype for function 'keccak_f800_round'
void keccak_f800_round(uint32_t st[25], const int r)
^
:265:10: warning: no previous prototype for function 'keccak_f800'
uint64_t keccak_f800(uint32_t* st)
^
:272:1: warning: control reaches end of non-void function
}
^
:284:10: warning: no previous prototype for function 'kiss99'
uint32_t kiss99(kiss99_t* st)
^
:296:6: warning: no previous prototype for function 'fill_mix'
void fill_mix(local uint32_t* seed, uint32_t lane_id, uint32_t* mix)
^
:409:18: error: passing 'uint32_t *' (aka 'unsigned int *') to parameter of type '__local uint32_t ' (aka '__local unsigned int ') changes address space of pointer
fill_mix(share[group_id].uint32s, lane_id, mix);
^~~~~~~~~~~~~~~~~~~~~~~
:296:31: note: passing argument to parameter 'seed' here
void fill_mix(local uint32_t
seed, uint32_t lane_id, uint32_t
mix)
^
:491:9: warning: 'FNV_PRIME' macro redefined
#define FNV_PRIME 0x01000193
^
:185:9: note: previous definition is here
#define FNV_PRIME 0x1000193
^
:537:26: warning: unknown OpenCL extension 'cl_amd_media_ops' - ignoring
#pragma OPENCL EXTENSION cl_amd_media_ops : enable
^
:542:16: warning: implicit declaration of function 'amd_bitalign' is invalid in C99
return amd_bitalign((vv).xy, (vv).yx, 32 - r);
^

X 19:37:58 cl-0 OpenCL kernel build error (-11):
clBuildProgram
cl 19:37:59 cl-0 Loaded period 557953 progpow kernel
cl 19:37:59 cl-0 Unable to lower compiler priority.
X 19:37:59 cl-0 OpenCL kernel build log:

@JohnTso
Copy link

JohnTso commented Jun 18, 2021

Does anyone know what is happening here? I typed this command cmake .. -DETHASHCL=ON -DETHASHCUDA=OFF and this happened (iMac with radeon pro 560)

-- [cable ] Cable 0.2.14 initialized
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [cable ] Build type: Release
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /Users/petertso/.hunter
-- [hunter] [ Hunter-ID: e14bc15 | Toolchain-ID: 93ffcde | Config-ID: 196746b ]
-- [hunter] BOOST_ROOT: /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Install (ver.: 1.70.0-p0)
-- [hunter] BOOST_ROOT: /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Install (ver.: 1.70.0-p0)
-- [hunter] Building Boost (component: system)
loading initial cache file /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/cache.cmake
loading initial cache file /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system/args.cmake
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system/Build
[ 12%] Creating directories for 'Boost-system'
[ 25%] Performing download step (download, verify and extract) for 'Boost-system'
-- verifying file...
file='/Users/petertso/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
-- File already exists and hash match (skip download):
file='/Users/petertso/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
SHA1='e6bb97b5109c7c15ea459cf2b1a9d52cbf88a89e'
-- extracting...
src='/Users/petertso/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
dst='/Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system/Source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 37%] Performing update step for 'Boost-system'
[ 50%] No patch step for 'Boost-system'
[ 62%] Performing configure step for 'Boost-system'
Dummy patch command
Building Boost.Build engine with toolset darwin... tools/build/src/engine/bin.macosxx86_64/b2
Detecting Python version... 2.7
Detecting Python root... /System/Library/Frameworks/Python.framework/Versions/2.7
Unicode/ICU support for Boost.Regex?... not found.
Generating Boost.Build configuration in project-config.jam for darwin...

Bootstrapping is done. To build, run:

./b2

To generate header files, run:

./b2 headers

To adjust configuration, edit 'project-config.jam'.
Further information:

[ 75%] Performing build step for 'Boost-system'
Performing configuration checks

- default address-model    : none
- default architecture     : none

Building the Boost C++ Libraries.

Component configuration:

- atomic                   : not building
- chrono                   : not building
- container                : not building
- context                  : not building
- contract                 : not building
- coroutine                : not building
- date_time                : not building
- exception                : not building
- fiber                    : not building
- filesystem               : not building
- graph                    : not building
- graph_parallel           : not building
- headers                  : not building
- iostreams                : not building
- locale                   : not building
- log                      : not building
- math                     : not building
- mpi                      : not building
- program_options          : not building
- python                   : not building
- random                   : not building
- regex                    : not building
- serialization            : not building
- stacktrace               : not building
- system                   : building
- test                     : not building
- thread                   : not building
- timer                    : not building
- type_erasure             : not building
- wave                     : not building

...found 137 targets...
...updating 23 targets...
darwin.compile.c++ bin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden/error_code.o
clang: error: unknown argument: '-fcoalesce-templates'

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk" "-mmacosx-version-min=10.15" "-std=c++11" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk"   -fvisibility-inlines-hidden -fcoalesce-templates -O0 -fno-inline -Wall -g -fvisibility=hidden -gdwarf-2 -fexceptions -Wno-long-double  -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1  -I"." -c -o "bin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden/error_code.o" "libs/system/src/error_code.cpp"

...failed darwin.compile.c++ bin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden/error_code.o...
darwin.compile.c++ bin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden/error_code.o
clang: error: unknown argument: '-fcoalesce-templates'

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk" "-mmacosx-version-min=10.15" "-std=c++11" "-isysroot" "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk"   -fvisibility-inlines-hidden -fcoalesce-templates -O3 -Wall -fvisibility=hidden -gdwarf-2 -fexceptions -Wno-long-double -Wno-inline  -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_STATIC_LINK=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden/error_code.o" "libs/system/src/error_code.cpp"

...failed darwin.compile.c++ bin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden/error_code.o...
...skipped <pbin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden>libboost_system-mt.a(clean) for lack of <pbin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden>error_code.o...
...skipped <pbin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden>libboost_system-mt.a for lack of <pbin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden>error_code.o...
...skipped <p/Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system/Source/stage/lib>libboost_system-mt.a for lack of <pbin.v2/libs/system/build/darwin-12.0.0/release/link-static/threading-multi/visibility-hidden>libboost_system-mt.a...
...skipped <pbin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden>libboost_system-mt-d.a(clean) for lack of <pbin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden>error_code.o...
...skipped <pbin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden>libboost_system-mt-d.a for lack of <pbin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden>error_code.o...
...skipped <p/Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system/Source/stage/lib>libboost_system-mt-d.a for lack of <pbin.v2/libs/system/build/darwin-12.0.0/debug/link-static/threading-multi/visibility-hidden>libboost_system-mt-d.a...
...failed updating 2 targets...
...skipped 6 targets...
...updated 15 targets...
make[2]: *** [Boost-system-prefix/src/Boost-system-stamp/Boost-system-build] Error 1
make[1]: *** [CMakeFiles/Boost-system.dir/all] Error 2
make: *** [all] Error 2

[hunter ** FATAL ERROR **] Build step failed (dir: /Users/petertso/.hunter/_Base/e14bc15/93ffcde/196746b/Build/Boost/__system
[hunter ** FATAL ERROR **] [Directory:/Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/projects/Boost/system]

------------------------------ ERROR -----------------------------
https://docs.hunter.sh/en/latest/reference/errors/error.external.build.failed.html

CMake Error at /Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
/Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page)
/Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_download.cmake:617 (hunter_fatal_error)
/Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/projects/Boost/system/hunter.cmake:16 (hunter_download)
/Users/petertso/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_add_package.cmake:62 (include)
CMakeLists.txt:56 (hunter_add_package)

-- Configuring incomplete, errors occurred!
See also "/Users/petertso/kawpowminer/build/CMakeFiles/CMakeOutput.log".

@fdoving
Copy link

fdoving commented Jun 18, 2021

Could be related to: https://trac.macports.org/ticket/60287

@chrisvander
Copy link

chrisvander commented Jan 12, 2022

I'm receiving the above issue now too - unknown argument: '-fcoalesce-templates'

Maybe we should bump the Boost version?

EDIT: Looks like you took care of that. @JohnTso are you actually using hwh57's branch? It looks like you're pulling in Boost 1.70 but this branch has bumped it to 1.72.

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

Successfully merging this pull request may close these issues.

8 participants