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

Unable to Compile on Ubuntu: Hunter error #111

Open
hilga007 opened this issue Jan 19, 2022 · 7 comments
Open

Unable to Compile on Ubuntu: Hunter error #111

hilga007 opened this issue Jan 19, 2022 · 7 comments

Comments

@hilga007
Copy link

Here is the entire process from clone to error. Please see bottom for hunter-related errors.

eric@eric-b550-aorus:/Downloads$ git clone https://github.com/RavenCommunity/kawpowminer.git
Cloning into 'kawpowminer'...
remote: Enumerating objects: 82513, done.
remote: Counting objects: 100% (93/93), done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 82513 (delta 37), reused 42 (delta 20), pack-reused 82420
Receiving objects: 100% (82513/82513), 54.35 MiB | 16.98 MiB/s, done.
Resolving deltas: 100% (61160/61160), done.
eric@eric-b550-aorus:
/Downloads$ git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git
eric@eric-b550-aorus:/Downloads$ cd kawpowminer
eric@eric-b550-aorus:
/Downloads/kawpowminer$ git submodule update --init --recursive
Submodule 'cmake/Hunter/disabled-mode' (https://github.com/hunter-packages/disabled-mode) registered for path 'cmake/Hunter/disabled-mode'
Submodule 'cmake/cable' (https://github.com/ethereum/cable) registered for path 'cmake/cable'
Cloning into '/home/eric/Downloads/kawpowminer/cmake/Hunter/disabled-mode'...
Cloning into '/home/eric/Downloads/kawpowminer/cmake/cable'...
Submodule path 'cmake/Hunter/disabled-mode': checked out '5f88a3d7565e8e2d61f7d2a3247068a9a9fe2c4b'
Submodule path 'cmake/cable': checked out '3e54f9751f50a3b6265c22402dcd5ae85ef701d4'
eric@eric-b550-aorus:/Downloads/kawpowminer$ mkdir build && cd build
eric@eric-b550-aorus:
/Downloads/kawpowminer/build$ cmake .. -DETHASHCUDA=ON -DETHASHCL=ON -DAPICORE=ON
-- [cable ] Cable 0.2.14 initialized
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - 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: /usr/bin/g++ - 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: /home/eric/.hunter
-- [hunter] [ Hunter-ID: e14bc15 | Toolchain-ID: 7ee1f28 | Config-ID: e6a953b ]
-- [hunter] BOOST_ROOT: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Install (ver.: 1.70.0-p0)
-- [hunter] BOOST_ROOT: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Install (ver.: 1.70.0-p0)
-- [hunter] BOOST_ROOT: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Install (ver.: 1.70.0-p0)
-- [hunter] BOOST_ROOT: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Install (ver.: 1.70.0-p0)
-- [hunter] Building Boost (component: thread)
loading initial cache file /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/cache.cmake
loading initial cache file /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread/args.cmake
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread/Build
[ 12%] Creating directories for 'Boost-thread'
[ 25%] Performing download step (download, verify and extract) for 'Boost-thread'
-- verifying file...
file='/home/eric/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
-- File already exists and hash match (skip download):
file='/home/eric/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
SHA1='e6bb97b5109c7c15ea459cf2b1a9d52cbf88a89e'
-- extracting...
src='/home/eric/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz'
dst='/home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread/Source'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 37%] Performing update step for 'Boost-thread'
[ 50%] No patch step for 'Boost-thread'
[ 62%] Performing configure step for 'Boost-thread'
Dummy patch command
Building Boost.Build engine with toolset gcc... tools/build/src/engine/bin.linuxx86_64/b2
Unicode/ICU support for Boost.Regex?... /usr
Generating Boost.Build configuration in project-config.jam for gcc...

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-thread'
Performing configuration checks

- default address-model    : 64-bit
- default architecture     : x86

Building the Boost C++ Libraries.

- lockfree boost::atomic_flag : yes

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                   : not building
- test                     : not building
- thread                   : building
- timer                    : not building
- type_erasure             : not building
- wave                     : not building

...patience...
...found 1277 targets...
...updating 25 targets...
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/once.o
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/once.o
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/future.o
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o
In file included from /usr/x86_64-linux-gnu/include/pthread.h:33,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h:148,
from /usr/include/c++/11/ext/atomicity.h:35,
from /usr/include/c++/11/bits/basic_string.h:39,
from /usr/include/c++/11/string:55,
from ./boost/thread/exceptions.hpp:20,
from ./boost/thread/pthread/thread_data.hpp:10,
from ./boost/thread/thread_only.hpp:17,
from libs/thread/src/pthread/thread.cpp:11:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "("
60 | #if PTHREAD_STACK_MIN > 0
| ^~~~~~~~~~~~~~~~~

"/usr/bin/g++" "-std=c++11"   -fvisibility-inlines-hidden -m64 -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX  -I"." -c -o "bin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-d-x64.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-d-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <p/home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread/Source/stage/lib>libboost_thread-mt-d-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/debug/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-d-x64.a...
gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o
In file included from /usr/x86_64-linux-gnu/include/pthread.h:33,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/11/bits/gthr.h:148,
from /usr/include/c++/11/ext/atomicity.h:35,
from /usr/include/c++/11/bits/basic_string.h:39,
from /usr/include/c++/11/string:55,
from ./boost/thread/exceptions.hpp:20,
from ./boost/thread/pthread/thread_data.hpp:10,
from ./boost/thread/thread_only.hpp:17,
from libs/thread/src/pthread/thread.cpp:11:
./boost/thread/pthread/thread_data.hpp:60:5: error: missing binary operator before token "("
60 | #if PTHREAD_STACK_MIN > 0
| ^~~~~~~~~~~~~~~~~

"/usr/bin/g++" "-std=c++11"   -fvisibility-inlines-hidden -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_POSIX -DNDEBUG  -I"." -c -o "bin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o" "libs/thread/src/pthread/thread.cpp"

...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden/pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>pthread/thread.o...
...skipped <p/home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread/Source/stage/lib>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2.0/release/link-static/threadapi-pthread/threading-multi/visibility-hidden>libboost_thread-mt-x64.a...
...failed updating 2 targets...
...skipped 6 targets...
...updated 17 targets...
gmake[2]: *** [CMakeFiles/Boost-thread.dir/build.make:86: Boost-thread-prefix/src/Boost-thread-stamp/Boost-thread-build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Boost-thread.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

[hunter ** FATAL ERROR **] Build step failed (dir: /home/eric/.hunter/_Base/e14bc15/7ee1f28/e6a953b/Build/Boost/__thread
[hunter ** FATAL ERROR **] [Directory:/home/eric/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/projects/Boost/thread]

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

CMake Error at /home/eric/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
/home/eric/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page)
/home/eric/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/modules/hunter_download.cmake:617 (hunter_fatal_error)
/home/eric/.hunter/_Base/Download/Hunter/0.23.214/e14bc15/Unpacked/cmake/projects/Boost/thread/hunter.cmake:16 (hunter_download)
/home/eric/.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 "/home/eric/Downloads/kawpowminer/build/CMakeFiles/CMakeOutput.log".

@hilga007
Copy link
Author

hilga007 commented Jan 19, 2022

Resolved inability to locate hunter package via pull request 112

However, issues related to Boost persist. Manually downloaded, compiled, and installed latest Boost. Did not resolve.

...failed gcc.compile.c++ bin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn/pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn>libboost_thread-mt-x64.a(clean) for lack of <pbin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn>pthread/thread.o...
...skipped <pbin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn>pthread/thread.o...
...skipped <p/home/eric/.hunter/_Base/1151d53/7ee1f28/47e60b7/Build/Boost/__thread/Source/stage/lib>libboost_thread-mt-x64.a for lack of <pbin.v2/libs/thread/build/gcc-11.2./rls/lnk-sttc/thrdp-pthrd/thrd-mlt/vsblt-hdn>libboost_thread-mt-x64.a...
...failed updating 2 targets...
...skipped 6 targets...
...updated 17 targets...
gmake[2]: *** [CMakeFiles/Boost-thread.dir/build.make:86: Boost-thread-prefix/src/Boost-thread-stamp/Boost-thread-build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/Boost-thread.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

[hunter ** FATAL ERROR **] Build step failed (dir: /home/eric/.hunter/_Base/1151d53/7ee1f28/47e60b7/Build/Boost/__thread
[hunter ** FATAL ERROR **] [Directory:/home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/projects/Boost/thread]

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

CMake Error at /home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
/home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page)
/home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/modules/hunter_download.cmake:623 (hunter_fatal_error)
/home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/projects/Boost/thread/hunter.cmake:16 (hunter_download)
/home/eric/.hunter/_Base/Download/Hunter/0.23.300/1151d53/Unpacked/cmake/modules/hunter_add_package.cmake:62 (include)
CMakeLists.txt:56 (hunter_add_package)

@hilga007
Copy link
Author

Opened issue in thread git

@lainwir3d
Copy link

Same problem in Fedora 35

@MiranDaniel
Copy link

Got this error on Pop!_OS 20.10

@hilga007
Copy link
Author

Same problem in Fedora 35

It looks like some of the referenced files needing to be fetched are dead links.

However, I just don't know how to fully change everything so that it will execute once the differently-named file is downloaded.

@lainwir3d
Copy link

Made it work. Quite a manual process though, there is probably some way to patch the file automatically, but here is the manual process.

  1. First of all, follow the build process until it fails so that all the files are where we need.

  2. Then, calculate the current SHA1 of the automatically downloaded archive: sha1sum ~/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz

For me it is "e6bb97b5109c7c15ea459cf2b1a9d52cbf88a89e".

  1. Modify this archive "~/.hunter/_Base/Download/Boost/1.70.0-p0/e6bb97b/v1.70.0-p0.tar.gz" with the patch "pthread-stack-min-fix.patch" from here: pkgs/development/libraries/boost/pthread-stack-min-fix.patch

The easiest way might be to just extract the file to modify and then overwrite it in the archive once modified.

  1. Calculate the new SHA1 of the archives with "sha1sum v1.70.0-p0.tar.gz". For example, the new SHA1 is "afd1afc599c35bf313e01377d57c60c1410175b7" for me.

  2. Create a directory in "~/.hunter/_Base/Download/Boost/1.70.0-p0/" named after the first 7 characters of the SHA1 above and copy the modified archive there. Using my example: mkdir ~/.hunter/_Base/Download/Boost/1.70.0-p0/afd1afc".

  3. Finally, the installation process verify that the SHA1 is matching the expected one. That means we have to change the expected one inside the source. First, find all reference to the old SHA1 in the ~/.hunter directory: grep -rnI "e6bb97b5109c7c15ea459cf2b1a9d52cbf88a89e" ~/.hunter

For each file found, modify the old SHA1 with the new one, for example:

sed -i 's/e6bb97b5109c7c15ea459cf2b1a9d52cbf88a89e/afd1afc599c35bf313e01377d57c60c1410175b7/' ~/.hunter/_Base/Cache/meta/d017251/Boost/__thread/1.70.0-p0/e6bb97b/SHA1

Do this for each file.

Be careful, if you forget one, the build process might replace your modified archive with a new downloaded one.

@lainwir3d
Copy link

By the way, this was in Fedora 35, but I imagine the problem is the same whatever the Linux flavor.

It might be easiest to just patch the file in the cmake process once the archive is downloaded / extracted and verified but I didn't want to spend too much time on this.

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

No branches or pull requests

3 participants