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

Could anyone install it on Ubuntu 22.04 #472

Open
dpang06 opened this issue Apr 22, 2024 · 6 comments
Open

Could anyone install it on Ubuntu 22.04 #472

dpang06 opened this issue Apr 22, 2024 · 6 comments

Comments

@dpang06
Copy link

dpang06 commented Apr 22, 2024

I know it is assumed to be installed on 18.04, but I tried to install it on an Ubuntu 22.04 VM. (18.04 is too old for my project)
Does anyone successfully install it?
I tried to run CC=gcc-7 CXX=g++-7 sudo -H pip3 install -e blockscipy according to https://citp.github.io/BlockSci/setup.html#running-a-full-node

Bunch of unreadable errors like /usr/include/blocksci/core/raw_address.hpp:18:9: error: ‘uint32_t’ does not name a type ... etc. I didn't read all but seems another C++ version problem:

Obtaining file:///home/uv/repo/citp/BlockSci/blockscipy
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: dateparser>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from blocksci==0.7.0) (1.2.0)
Requirement already satisfied: multiprocess>=0.70.5 in /usr/local/lib/python3.10/dist-packages (from blocksci==0.7.0) (0.70.16)
Requirement already satisfied: pandas>=0.22.0 in /usr/local/lib/python3.10/dist-packages (from blocksci==0.7.0) (2.2.2)
Requirement already satisfied: psutil>=5.4.2 in /usr/local/lib/python3.10/dist-packages (from blocksci==0.7.0) (5.9.8)
Requirement already satisfied: pycrypto>=2.6.1 in /usr/local/lib/python3.10/dist-packages (from blocksci==0.7.0) (2.6.1)
Requirement already satisfied: requests>=2.19.1 in /usr/lib/python3/dist-packages (from blocksci==0.7.0) (2.25.1)
Requirement already satisfied: regex!=2019.02.19,!=2021.8.27 in /usr/local/lib/python3.10/dist-packages (from dateparser>=0.6.0->blocksci==0.7.0) (2024.4.16)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (from dateparser>=0.6.0->blocksci==0.7.0) (2022.1)
Requirement already satisfied: tzlocal in /usr/local/lib/python3.10/dist-packages (from dateparser>=0.6.0->blocksci==0.7.0) (5.2)
Requirement already satisfied: python-dateutil in /usr/local/lib/python3.10/dist-packages (from dateparser>=0.6.0->blocksci==0.7.0) (2.9.0.post0)
Requirement already satisfied: dill>=0.3.8 in /usr/local/lib/python3.10/dist-packages (from multiprocess>=0.70.5->blocksci==0.7.0) (0.3.8)
Requirement already satisfied: numpy>=1.22.4 in /usr/local/lib/python3.10/dist-packages (from pandas>=0.22.0->blocksci==0.7.0) (1.26.4)
Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas>=0.22.0->blocksci==0.7.0) (2024.1)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil->dateparser>=0.6.0->blocksci==0.7.0) (1.16.0)
Installing collected packages: blocksci
  Running setup.py develop for blocksci
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [220 lines of output]
        running develop
        /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        running egg_info
        writing blocksci.egg-info/PKG-INFO
        writing dependency_links to blocksci.egg-info/dependency_links.txt
        writing requirements to blocksci.egg-info/requires.txt
        writing top-level names to blocksci.egg-info/top_level.txt
        reading manifest file 'blocksci.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching 'blocksci/templateMakefile'
        warning: no files found matching 'blocksci/filterTxesExtension.cpp'
        writing manifest file 'blocksci.egg-info/SOURCES.txt'
        running build_ext
        -- pybind11 v2.5.0
        -- Configuring done
        -- Generating done
        -- Build files have been written to: /home/uv/repo/citp/BlockSci/blockscipy/build/temp.linux-x86_64-3.10
        Consolidate compiler generated dependencies of target _blocksci
        [  1%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/bool_proxy.cpp.o
        [  2%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/address_type_proxy.cpp.o
        [  3%] Building CXX object CMakeFiles/_blocksci.dir/src/heuristics_py.cpp.o
        [  4%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/bytes_proxy.cpp.o
        In file included from /usr/include/blocksci/address/address.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/core/raw_address.hpp:18:9: error: ‘uint32_t’ does not name a type
           18 |         uint32_t scriptNum;
              |         ^~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
          +++ |+#include <cstdint>
            1 | //
        /usr/include/blocksci/core/raw_address.hpp:22:28: error: expected ‘)’ before ‘addressNum_’
           22 |         RawAddress(uint32_t addressNum_, AddressType::Enum type_) : scriptNum(addressNum_), type(type_) {}
              |                   ~        ^~~~~~~~~~~~
              |                            )
        /usr/include/blocksci/core/raw_address.hpp: In member function ‘bool blocksci::RawAddress::operator==(const blocksci::RawAddress&) const’:
        /usr/include/blocksci/core/raw_address.hpp:25:20: error: ‘scriptNum’ was not declared in this scope
           25 |             return scriptNum == other.scriptNum && type == other.type;
              |                    ^~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:25:39: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
           25 |             return scriptNum == other.scriptNum && type == other.type;
              |                                       ^~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp: In member function ‘std::hash<blocksci::RawAddress>::result_type std::hash<blocksci::RawAddress>::operator()(const argument_type&) const’:
        /usr/include/blocksci/core/raw_address.hpp:36:43: error: ‘const argument_type’ {aka ‘const struct blocksci::RawAddress’} has no member named ‘scriptNum’
           36 |             return (static_cast<size_t>(b.scriptNum) << 32) + static_cast<size_t>(b.type);
              |                                           ^~~~~~~~~
        In file included from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/address/address.hpp: In constructor ‘blocksci::Address::Address(const blocksci::RawAddress&, blocksci::DataAccess&)’:
        /usr/include/blocksci/address/address.hpp:49:75: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
           49 |         Address(const RawAddress &raw, DataAccess &access_) : Address(raw.scriptNum, raw.type, access_) {}
              |                                                                           ^~~~~~~~~
        /usr/include/blocksci/address/address.hpp: In member function ‘blocksci::Address::operator blocksci::RawAddress() const’:
        /usr/include/blocksci/address/address.hpp:52:46: error: no matching function for call to ‘blocksci::RawAddress::RawAddress(<brace-enclosed initializer list>)’
           52 |             return RawAddress{scriptNum, type};
              |                                              ^
        In file included from /usr/include/blocksci/address/address.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/core/raw_address.hpp:21:9: note: candidate: ‘blocksci::RawAddress::RawAddress()’
           21 |         RawAddress() {}
              |         ^~~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:21:9: note:   candidate expects 0 arguments, 2 provided
        /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(const blocksci::RawAddress&)’
           17 |     struct BLOCKSCI_EXPORT RawAddress {
              |                            ^~~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
        /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(blocksci::RawAddress&&)’
        /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
        In file included from /usr/include/blocksci/scripts/script.hpp:12,
                         from /usr/include/blocksci/scripts/multisig_script.hpp:12,
                         from /usr/include/blocksci/scripts/script_variant.hpp:11,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/core/script_data.hpp: In member function ‘bool blocksci::ScriptHashData::hasWrappedAddress() const’:
        /usr/include/blocksci/core/script_data.hpp:147:35: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
          147 |             return wrappedAddress.scriptNum != 0;
              |                                   ^~~~~~~~~
        /usr/include/blocksci/core/script_data.hpp: In member function ‘void blocksci::MultisigData::visitPointers(const std::function<void(const blocksci::RawAddress&)>&) const’:
        /usr/include/blocksci/core/script_data.hpp:175:83: error: no matching function for call to ‘blocksci::RawAddress::RawAddress(<brace-enclosed initializer list>)’
          175 |                 visitFunc(RawAddress{scriptNum, AddressType::Enum::MULTISIG_PUBKEY});
              |                                                                                   ^
        In file included from /usr/include/blocksci/address/address.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/core/raw_address.hpp:21:9: note: candidate: ‘blocksci::RawAddress::RawAddress()’
           21 |         RawAddress() {}
              |         ^~~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:21:9: note:   candidate expects 0 arguments, 2 provided
        /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(const blocksci::RawAddress&)’
           17 |     struct BLOCKSCI_EXPORT RawAddress {
              |                            ^~~~~~~~~~
        /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
        /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(blocksci::RawAddress&&)’
        /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
        In file included from /usr/include/blocksci/scripts/script_variant.hpp:16,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/blocksci/scripts/scripthash_script.hpp: In member function ‘ranges::optional<blocksci::Address> blocksci::ScriptHashBase::getWrappedAddress() const’:
        /usr/include/blocksci/scripts/scripthash_script.hpp:35:25: error: ‘struct blocksci::RawAddress’ has no member named ‘scriptNum’
           35 |             if (wrapped.scriptNum != 0) {
              |                         ^~~~~~~~~
        /usr/include/blocksci/scripts/scripthash_script.hpp:36:40: error: ‘struct blocksci::RawAddress’ has no member named ‘scriptNum’
           36 |                 return Address(wrapped.scriptNum, wrapped.type, getAccess());
              |                                        ^~~~~~~~~
        In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/address_type_proxy.cpp:9:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
          276 |         PyEval_InitThreads();
              |         ~~~~~~~~~~~~~~~~~~^~
        In file included from /usr/include/python3.10/Python.h:130,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/address_type_proxy.cpp:9:
        /usr/include/python3.10/ceval.h:122:37: note: declared here
          122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
              |                                     ^~~~~~~~~~~~~~~~~~
        In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bytes_proxy.cpp:9:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
          276 |         PyEval_InitThreads();
              |         ~~~~~~~~~~~~~~~~~~^~
        In file included from /usr/include/python3.10/Python.h:130,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bytes_proxy.cpp:9:
        /usr/include/python3.10/ceval.h:122:37: note: declared here
          122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
              |                                     ^~~~~~~~~~~~~~~~~~
        In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bool_proxy.cpp:9:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
          276 |         PyEval_InitThreads();
              |         ~~~~~~~~~~~~~~~~~~^~
        In file included from /usr/include/python3.10/Python.h:130,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bool_proxy.cpp:9:
        /usr/include/python3.10/ceval.h:122:37: note: declared here
          122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
              |                                     ^~~~~~~~~~~~~~~~~~
        In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:14,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
        /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
          276 |         PyEval_InitThreads();
              |         ~~~~~~~~~~~~~~~~~~^~
        In file included from /usr/include/python3.10/Python.h:130,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                         from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:14,
                         from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
        /usr/include/python3.10/ceval.h:122:37: note: declared here
          122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
              |                                     ^~~~~~~~~~~~~~~~~~
        gmake[2]: *** [CMakeFiles/_blocksci.dir/build.make:734: CMakeFiles/_blocksci.dir/src/heuristics_py.cpp.o] Error 1
        gmake[2]: *** Waiting for unfinished jobs....
        gmake[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/_blocksci.dir/all] Error 2
        gmake: *** [Makefile:91: all] Error 2
        Traceback (most recent call last):
          File "<string>", line 2, in <module>
          File "<pip-setuptools-caller>", line 34, in <module>
          File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 59, in <module>
            setup(
          File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
            return distutils.core.setup(**attrs)
          File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
            dist.run_commands()
          File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
            self.run_command(cmd)
          File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/usr/lib/python3/dist-packages/setuptools/command/develop.py", line 34, in run
            self.install_for_development()
          File "/usr/lib/python3/dist-packages/setuptools/command/develop.py", line 114, in install_for_development
            self.run_command('build_ext')
          File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
            self.distribution.run_command(command)
          File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 32, in run
            self.build_extension(ext)
          File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 57, in build_extension
            subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
          File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
            raise CalledProcessError(retcode, cmd)
        subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [220 lines of output]
    running develop
    /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running egg_info
    writing blocksci.egg-info/PKG-INFO
    writing dependency_links to blocksci.egg-info/dependency_links.txt
    writing requirements to blocksci.egg-info/requires.txt
    writing top-level names to blocksci.egg-info/top_level.txt
    reading manifest file 'blocksci.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'blocksci/templateMakefile'
    warning: no files found matching 'blocksci/filterTxesExtension.cpp'
    writing manifest file 'blocksci.egg-info/SOURCES.txt'
    running build_ext
    -- pybind11 v2.5.0
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/uv/repo/citp/BlockSci/blockscipy/build/temp.linux-x86_64-3.10
    Consolidate compiler generated dependencies of target _blocksci
    [  1%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/bool_proxy.cpp.o
    [  2%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/address_type_proxy.cpp.o
    [  3%] Building CXX object CMakeFiles/_blocksci.dir/src/heuristics_py.cpp.o
    [  4%] Building CXX object CMakeFiles/_blocksci.dir/src/simple/bytes_proxy.cpp.o
    In file included from /usr/include/blocksci/address/address.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/core/raw_address.hpp:18:9: error: ‘uint32_t’ does not name a type
       18 |         uint32_t scriptNum;
          |         ^~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
      +++ |+#include <cstdint>
        1 | //
    /usr/include/blocksci/core/raw_address.hpp:22:28: error: expected ‘)’ before ‘addressNum_’
       22 |         RawAddress(uint32_t addressNum_, AddressType::Enum type_) : scriptNum(addressNum_), type(type_) {}
          |                   ~        ^~~~~~~~~~~~
          |                            )
    /usr/include/blocksci/core/raw_address.hpp: In member function ‘bool blocksci::RawAddress::operator==(const blocksci::RawAddress&) const’:
    /usr/include/blocksci/core/raw_address.hpp:25:20: error: ‘scriptNum’ was not declared in this scope
       25 |             return scriptNum == other.scriptNum && type == other.type;
          |                    ^~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:25:39: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
       25 |             return scriptNum == other.scriptNum && type == other.type;
          |                                       ^~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp: In member function ‘std::hash<blocksci::RawAddress>::result_type std::hash<blocksci::RawAddress>::operator()(const argument_type&) const’:
    /usr/include/blocksci/core/raw_address.hpp:36:43: error: ‘const argument_type’ {aka ‘const struct blocksci::RawAddress’} has no member named ‘scriptNum’
       36 |             return (static_cast<size_t>(b.scriptNum) << 32) + static_cast<size_t>(b.type);
          |                                           ^~~~~~~~~
    In file included from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/address/address.hpp: In constructor ‘blocksci::Address::Address(const blocksci::RawAddress&, blocksci::DataAccess&)’:
    /usr/include/blocksci/address/address.hpp:49:75: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
       49 |         Address(const RawAddress &raw, DataAccess &access_) : Address(raw.scriptNum, raw.type, access_) {}
          |                                                                           ^~~~~~~~~
    /usr/include/blocksci/address/address.hpp: In member function ‘blocksci::Address::operator blocksci::RawAddress() const’:
    /usr/include/blocksci/address/address.hpp:52:46: error: no matching function for call to ‘blocksci::RawAddress::RawAddress(<brace-enclosed initializer list>)’
       52 |             return RawAddress{scriptNum, type};
          |                                              ^
    In file included from /usr/include/blocksci/address/address.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/core/raw_address.hpp:21:9: note: candidate: ‘blocksci::RawAddress::RawAddress()’
       21 |         RawAddress() {}
          |         ^~~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:21:9: note:   candidate expects 0 arguments, 2 provided
    /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(const blocksci::RawAddress&)’
       17 |     struct BLOCKSCI_EXPORT RawAddress {
          |                            ^~~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
    /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(blocksci::RawAddress&&)’
    /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
    In file included from /usr/include/blocksci/scripts/script.hpp:12,
                     from /usr/include/blocksci/scripts/multisig_script.hpp:12,
                     from /usr/include/blocksci/scripts/script_variant.hpp:11,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/core/script_data.hpp: In member function ‘bool blocksci::ScriptHashData::hasWrappedAddress() const’:
    /usr/include/blocksci/core/script_data.hpp:147:35: error: ‘const struct blocksci::RawAddress’ has no member named ‘scriptNum’
      147 |             return wrappedAddress.scriptNum != 0;
          |                                   ^~~~~~~~~
    /usr/include/blocksci/core/script_data.hpp: In member function ‘void blocksci::MultisigData::visitPointers(const std::function<void(const blocksci::RawAddress&)>&) const’:
    /usr/include/blocksci/core/script_data.hpp:175:83: error: no matching function for call to ‘blocksci::RawAddress::RawAddress(<brace-enclosed initializer list>)’
      175 |                 visitFunc(RawAddress{scriptNum, AddressType::Enum::MULTISIG_PUBKEY});
          |                                                                                   ^
    In file included from /usr/include/blocksci/address/address.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:11,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/core/raw_address.hpp:21:9: note: candidate: ‘blocksci::RawAddress::RawAddress()’
       21 |         RawAddress() {}
          |         ^~~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:21:9: note:   candidate expects 0 arguments, 2 provided
    /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(const blocksci::RawAddress&)’
       17 |     struct BLOCKSCI_EXPORT RawAddress {
          |                            ^~~~~~~~~~
    /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
    /usr/include/blocksci/core/raw_address.hpp:17:28: note: candidate: ‘constexpr blocksci::RawAddress::RawAddress(blocksci::RawAddress&&)’
    /usr/include/blocksci/core/raw_address.hpp:17:28: note:   candidate expects 1 argument, 2 provided
    In file included from /usr/include/blocksci/scripts/script_variant.hpp:16,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/blocksci/scripts/scripthash_script.hpp: In member function ‘ranges::optional<blocksci::Address> blocksci::ScriptHashBase::getWrappedAddress() const’:
    /usr/include/blocksci/scripts/scripthash_script.hpp:35:25: error: ‘struct blocksci::RawAddress’ has no member named ‘scriptNum’
       35 |             if (wrapped.scriptNum != 0) {
          |                         ^~~~~~~~~
    /usr/include/blocksci/scripts/scripthash_script.hpp:36:40: error: ‘struct blocksci::RawAddress’ has no member named ‘scriptNum’
       36 |                 return Address(wrapped.scriptNum, wrapped.type, getAccess());
          |                                        ^~~~~~~~~
    In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/address_type_proxy.cpp:9:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
      276 |         PyEval_InitThreads();
          |         ~~~~~~~~~~~~~~~~~~^~
    In file included from /usr/include/python3.10/Python.h:130,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/address_type_proxy.cpp:9:
    /usr/include/python3.10/ceval.h:122:37: note: declared here
      122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bytes_proxy.cpp:9:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
      276 |         PyEval_InitThreads();
          |         ~~~~~~~~~~~~~~~~~~^~
    In file included from /usr/include/python3.10/Python.h:130,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bytes_proxy.cpp:9:
    /usr/include/python3.10/ceval.h:122:37: note: declared here
      122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bool_proxy.cpp:9:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
      276 |         PyEval_InitThreads();
          |         ~~~~~~~~~~~~~~~~~~^~
    In file included from /usr/include/python3.10/Python.h:130,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/simple_proxies.hpp:15,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/simple/bool_proxy.cpp:9:
    /usr/include/python3.10/ceval.h:122:37: note: declared here
      122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    In file included from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:14,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
    /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:276:27: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
      276 |         PyEval_InitThreads();
          |         ~~~~~~~~~~~~~~~~~~^~
    In file included from /usr/include/python3.10/Python.h:130,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:112,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                     from /home/uv/repo/citp/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:44,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/caster_py.hpp:14,
                     from /home/uv/repo/citp/BlockSci/blockscipy/src/heuristics_py.cpp:8:
    /usr/include/python3.10/ceval.h:122:37: note: declared here
      122 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
          |                                     ^~~~~~~~~~~~~~~~~~
    gmake[2]: *** [CMakeFiles/_blocksci.dir/build.make:734: CMakeFiles/_blocksci.dir/src/heuristics_py.cpp.o] Error 1
    gmake[2]: *** Waiting for unfinished jobs....
    gmake[1]: *** [CMakeFiles/Makefile2:118: CMakeFiles/_blocksci.dir/all] Error 2
    gmake: *** [Makefile:91: all] Error 2
    Traceback (most recent call last):
      File "<string>", line 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 59, in <module>
        setup(
      File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.10/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.10/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3/dist-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/usr/lib/python3/dist-packages/setuptools/command/develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "/usr/lib/python3.10/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.10/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 32, in run
        self.build_extension(ext)
      File "/home/uv/repo/citp/BlockSci/blockscipy/setup.py", line 57, in build_extension
        subprocess.check_call(['cmake', '--build', '.'] + build_args, cwd=self.build_temp)
      File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j4']' returned non-zero exit status 2.
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Btw, here are what I have done to resolve some version problems, maybe somebody can get some hints?

  1. For git clone https://github.com/citp/BlockSci.git, --recursive flag should be added. Otherwise later steps would complain files missing.
    git clone --recursive https://github.com/citp/BlockSci.git

  2. gcc-7 and g++-7 are unavailable in Ubuntu 22.04, and trying to use later version of gcc could cause problem. Without changing the code, all I could do is to install them from this trick: https://askubuntu.com/questions/1406962/install-gcc7-on-ubuntu-22-04

  3. cmake command also cause problem due to versioning. Latest cmake is already much later than cmake 11. So I build it from source: https://cmake.org/download/

Any comments are welcome! Thank you.

@alex-btc
Copy link

So were you able to install it on ubuntu 22.04?

@dpang06
Copy link
Author

dpang06 commented Apr 24, 2024

So were you able to install it on ubuntu 22.04?

No. I switched to 18.04, and the installation is success. (However, other problems occur so I still cannot run it.)

Some notes:
even though on 18.04, there are several problems I encountered (and solved):

  1. Remember the --recursive flag in the git-clone command
  2. Remember to install latest requests library

@chaseyoungcn
Copy link

我在ubuntu22上安装好了。其中遇到了几个困难,第一个是git clone失败,因为网络封锁。 第二个是make的时候一个hpp文件中缺少include 查看报错里面有提到如何导入include

@chaseyoungcn
Copy link

我在ubuntu22上安装好。其中遇到了几个困难,第一个是git克隆失败,因为网络锁。第二个是make的时候一个hpp文件中缺少包含查看报错里面有提到如何导入包含

用的是gcc-9 g++9

@chaseyoungcn
Copy link

chaseyoungcn commented Jul 30, 2024

你遇到的情况跟我第二项一样 看这一条报错
/usr/include/blocksci/core/raw_address.hpp:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?

@ff781
Copy link

ff781 commented Oct 19, 2024

so were you able to fix it in the end?

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

4 participants