Skip to content

Could anyone install it on Ubuntu 22.04 #472

@dpang06

Description

@dpang06

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions