Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Disabling Hunter is broken #500

Closed
EoD opened this issue Jan 5, 2018 · 9 comments
Closed

Disabling Hunter is broken #500

EoD opened this issue Jan 5, 2018 · 9 comments
Labels

Comments

@EoD
Copy link
Contributor

EoD commented Jan 5, 2018

Disabling hunter is broken in any of the current version (0.13, 0.12, ...)

$ cmake -H. -Bdbuild_no_hunter -DHUNTER_ENABLED=OFF 
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.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
CMake Error at CMakeLists.txt:87 (find_package):
  Could not find a package configuration file provided by "Boost" with any of
  the following names:

    BoostConfig.cmake
    boost-config.cmake

  Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
  "Boost_DIR" to a directory containing one of the above files.  If "Boost"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "ethminer/dbuild_no_hunter/CMakeFiles/CMakeOutput.log".

The following sed magic is required to compile ethminer:
https://github.com/reagentoo/gentoo-overlay/blob/8b95566dc7ce7a81cbaa8183e664b3f036b8b31b/net-p2p/ethminer/ethminer-9999.ebuild#L51-L80

I already mentioned this before (#219), but I urge you to provide a way to completely disable hunter, without using Hunter. Hunter is the current blocker which keeps inclusion in the distributions like Gentoo: reagentoo/gentoo-overlay#6

@chfast
Copy link
Contributor

chfast commented Jan 6, 2018

Finding Boost works in master.

But I have problems with jsoncpp: libjson-rpc-cpp will find jsoncpp but include path is not compatible with libstratum. Anyway, you can try it in Gentoo, maybe you have a newer version os jsoncpp and it will work...

@EoD
Copy link
Contributor Author

EoD commented Jan 6, 2018

@chfast thanks, I tried dev-cpp/libjson-rpc-cpp-1.0.0 and dev-cpp/libjson-rpc-cpp-1.1.0 without success. Both now give the following error:

$ cmake -H. -Bdbuild_no_hunter -DHUNTER_ENABLED=OFF 
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.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
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   system
------------------------------------------------------------------------
-- CMake 3.9.6
-- Build Release / Linux
------------------------------------------------------------- components
-- ETHASHCL         Build OpenCL components                  ON
-- ETHASHCUDA       Build CUDA components                    OFF
-- ETHSTRATUM       Build Stratum components                 ON
-- ETHDBUS          Build D-Bus components                   OFF
-- APICORE          Build API Server components              ON
------------------------------------------------------------------------

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- 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: /usr/lib/libOpenCL.so (found version "1.2") 
-- Configuring done
CMake Error at libapicore/CMakeLists.txt:6 (add_library):
  Target "apicore" links to target "libjson-rpc-cpp::server" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at ethminer/CMakeLists.txt:11 (add_executable):
  Target "ethminer" links to target "libjson-rpc-cpp::server" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?

@chfast
Copy link
Contributor

chfast commented Jan 6, 2018

Yes, libjson-rpc-cpp::server is missing in libjson-rpc-cppConfig.cmake file. Easy fix.

But you can disable API module: -DAPICORE=OFF for now.

@EoD
Copy link
Contributor Author

EoD commented Jan 7, 2018

@chfast building with -DAPICORE=OFF passes the cmake phase, but fails the compilation phase:

$ cmake -H. -Bdbuild_no_hunter -DHUNTER_ENABLED=OFF  -DAPICORE=OFF
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.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
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   system
------------------------------------------------------------------------
-- CMake 3.9.6
-- Build Release / Linux
------------------------------------------------------------- components
-- ETHASHCL         Build OpenCL components                  ON
-- ETHASHCUDA       Build CUDA components                    OFF
-- ETHSTRATUM       Build Stratum components                 ON
-- ETHDBUS          Build D-Bus components                   OFF
-- APICORE          Build API Server components              OFF
------------------------------------------------------------------------

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- 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: /usr/lib/libOpenCL.so (found version "1.2") 
-- Configuring done
-- Generating done
$ make
Scanning dependencies of target BuildInfo.h
[  0%] Built target BuildInfo.h
Scanning dependencies of target devcore
[  3%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[  7%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 11%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 14%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 18%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SHA3.cpp.o
[ 22%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
[ 25%] Linking CXX static library libdevcore.a
[ 25%] Built target devcore
Scanning dependencies of target ethash
[ 29%] Building C object libethash/CMakeFiles/ethash.dir/internal.c.o
[ 33%] Building C object libethash/CMakeFiles/ethash.dir/sha3.c.o
[ 37%] Linking C static library libethash.a
[ 37%] Built target ethash
Scanning dependencies of target hwmon
[ 40%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapnvml.cpp.o
/tmp/ethminer/libhwmon/wrapnvml.cpp: In function ‘wrap_nvml_handle* wrap_nvml_create()’:
/tmp/ethminer/libhwmon/wrapnvml.cpp:33:7: warning: unused variable ‘i’ [-Wunused-variable]
   int i=0;
       ^
[ 44%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapadl.cpp.o
[ 48%] Building CXX object libhwmon/CMakeFiles/hwmon.dir/wrapamdsysfs.cpp.o
[ 51%] Linking CXX static library libhwmon.a
[ 51%] Built target hwmon
Scanning dependencies of target ethcore
[ 55%] Building CXX object libethcore/CMakeFiles/ethcore.dir/BlockHeader.cpp.o
[ 59%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EthashAux.cpp.o
[ 62%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Miner.cpp.o
[ 66%] Linking CXX static library libethcore.a
[ 66%] Built target ethcore
[ 70%] Generating OpenCL Kernel Byte Array
[ 74%] Generating OpenCL Kernel Byte Array
Scanning dependencies of target ethash-cl
[ 77%] Building CXX object libethash-cl/CMakeFiles/ethash-cl.dir/CLMiner.cpp.o
In file included from /tmp/ethminer/libethash-cl/CLMiner.h:22:0,
                 from /tmp/ethminer/libethash-cl/CLMiner.cpp:6:
/tmp/ethminer/libethash-cl/CL/cl2.hpp:5854:63: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes]
     typename std::enable_if<!std::is_pointer<T>::value, cl_int>::type
                                                               ^
/tmp/ethminer/libethash-cl/CL/cl2.hpp:6154:22: warning: ignoring attributes on template argument ‘cl_int {aka int}’ [-Wignored-attributes]
         vector<cl_int>* binaryStatus = NULL,
                      ^
[ 81%] Linking CXX static library libethash-cl.a
[ 81%] Built target ethash-cl
Scanning dependencies of target ethstratum
[ 85%] Building CXX object libstratum/CMakeFiles/ethstratum.dir/EthStratumClient.cpp.o
In file included from /tmp/ethminer/libstratum/EthStratumClient.cpp:2:0:
/tmp/ethminer/libstratum/EthStratumClient.h:5:23: fatal error: json/json.h: No such file or directory
 #include <json/json.h>
                       ^
compilation terminated.
make[2]: *** [libstratum/CMakeFiles/ethstratum.dir/build.make:63: libstratum/CMakeFiles/ethstratum.dir/EthStratumClient.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:409: libstratum/CMakeFiles/ethstratum.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

@chfast
Copy link
Contributor

chfast commented Jan 7, 2018

Yes, I have the same problem. I can fix it but need to find some time to do it.

@chfast chfast self-assigned this Jan 13, 2018
@ob7
Copy link

ob7 commented Feb 28, 2018

hows it coming? anyway to get this working without hunter? trying to build on nixos with same problem

@chfast chfast removed their assignment Apr 24, 2018
@chfast chfast closed this as completed Apr 24, 2018
@EoD
Copy link
Contributor Author

EoD commented Apr 24, 2018

@chfast do you have a commit or a small changelog what you did? Last time I checked, it did not build without hunter at all.

@chfast
Copy link
Contributor

chfast commented Apr 24, 2018

I don't plan to work on this. You can take it over.

@mratsim
Copy link

mratsim commented Oct 4, 2018

I've been trying to compiler ethminer on Archlinux and was also confronted with the following issue:

-- [cable ] Cable 0.2.12 initialized
-- [cable ] Build type: Release
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   system
--   filesystem
CMake Error at CMakeLists.txt:60 (find_package):
  Could not find a package configuration file provided by "jsoncpp" with any
  of the following names:

    jsoncppConfig.cmake
    jsoncpp-config.cmake

  Add the installation prefix of "jsoncpp" to CMAKE_PREFIX_PATH or set
  "jsoncpp_DIR" to a directory containing one of the above files.  If
  "jsoncpp" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!

After diving a bit into it, the main cause is that on Arch (and probably many other distros) compilation of jsoncpp now uses Meson and Ninja.

Jsoncpp only registers itself to the CMake registry with jsoncppconfig.cmake if it's compiled by CMake which is not the default anymore see: open-source-parsers/jsoncpp#627.

The flag that enables jsoncpp in cmake is there: https://github.com/open-source-parsers/jsoncpp/blob/2baad4923e6d9a7e09982cfa4b1c5fd0b67ebd87/CMakeLists.txt#L12

OPTION(JSONCPP_WITH_CMAKE_PACKAGE "Generate and install cmake package files" ON)

but it is not available in meson.build

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

No branches or pull requests

5 participants