ton-blockchain / mytonctrl

A tool to run and maintain a TON node/validator
GNU General Public License v3.0
217 stars 130 forks source link

libsecp256k1-dev #273

Open LuckyCoders opened 1 month ago

LuckyCoders commented 1 month ago

https://github.com/ton-blockchain/mytonctrl/blob/3257127657b0b55056e874aa4b4e083f2de54835/scripts/upgrade.sh#L32

Reading state information... Done
E: Unable to locate package libsecp256k1-dev

Last Ubuntu doesn't work Debian 10 works fine

neodix42 commented 1 month ago

Officially TON validators can run on Ubuntu 20.04, 22.04 and Debian 11. Support for Ubuntu 24.04 comes soon.

LuckyCoders commented 1 month ago

Debian 10

  Collecting maturin<2.0,>=1.4
    Using cached https://files.pythonhosted.org/packages/e6/4c/77135117237c4ef579da90d51a38defb50a332f57e5c94663bad9c793744/maturin-1.5.1.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
  Collecting tomli>=1.1.0 (from maturin<2.0,>=1.4)
    Using cached https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl
  Building wheels for collected packages: maturin
    Running setup.py bdist_wheel for maturin: started
    Running setup.py bdist_wheel for maturin: finished with status 'error'
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-db0njpkb/maturin/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-fpod9xhe --python-tag cp37:
    /tmp/pip-build-env-m4aw0yo_/lib/python3.7/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
    !!

            ********************************************************************************
            Requirements should be satisfied by a PEP 517 installer.
            If you are using pip, you can try `pip install --use-pep517`.
            ********************************************************************************

    !!
      dist.fetch_build_eggs(dist.setup_requires)
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-cpython-37
    creating build/lib.linux-x86_64-cpython-37/maturin
    copying maturin/__main__.py -> build/lib.linux-x86_64-cpython-37/maturin
    copying maturin/import_hook.py -> build/lib.linux-x86_64-cpython-37/maturin
    copying maturin/__init__.py -> build/lib.linux-x86_64-cpython-37/maturin
    running egg_info
    creating maturin.egg-info
    writing maturin.egg-info/PKG-INFO
    writing dependency_links to maturin.egg-info/dependency_links.txt
    writing requirements to maturin.egg-info/requires.txt
    writing top-level names to maturin.egg-info/top_level.txt
    writing manifest file 'maturin.egg-info/SOURCES.txt'
    reading manifest file 'maturin.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.json' under directory 'src/python_interpreter'
    writing manifest file 'maturin.egg-info/SOURCES.txt'
    running build_ext
    running build_rust
    error: can't find Rust compiler

    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

    To update pip, run:

        pip install --upgrade pip

    and then retry package installation.

    If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

    ----------------------------------------
    Failed building wheel for maturin
    Running setup.py clean for maturin
  Failed to build maturin
  Installing collected packages: tomli, maturin
    Running setup.py install for maturin: started
      Running setup.py install for maturin: finished with status 'error'
      Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-db0njpkb/maturin/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-muze1beo/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-dnssgqy0 --compile:
      /tmp/pip-build-env-m4aw0yo_/lib/python3.7/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      running install
      /tmp/pip-build-env-m4aw0yo_/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-37
      creating build/lib.linux-x86_64-cpython-37/maturin
      copying maturin/__main__.py -> build/lib.linux-x86_64-cpython-37/maturin
      copying maturin/import_hook.py -> build/lib.linux-x86_64-cpython-37/maturin
      copying maturin/__init__.py -> build/lib.linux-x86_64-cpython-37/maturin
      running egg_info
      writing maturin.egg-info/PKG-INFO
      writing dependency_links to maturin.egg-info/dependency_links.txt
      writing requirements to maturin.egg-info/requires.txt
      writing top-level names to maturin.egg-info/top_level.txt
      reading manifest file 'maturin.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.json' under directory 'src/python_interpreter'
      writing manifest file 'maturin.egg-info/SOURCES.txt'
      running build_ext
      running build_rust
      error: can't find Rust compiler

      If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

      To update pip, run:

          pip install --upgrade pip

      and then retry package installation.

      If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

      ----------------------------------------
  Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-db0njpkb/maturin/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-muze1beo/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-dnssgqy0 --compile" failed with error code 1 in /tmp/pip-install-db0njpkb/maturin/

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-dnssgqy0 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- maturin>=1.4,<2.0" failed with error code 1 in None

Solution:

python3 -m pip install --upgrade pip
python3 -m pip install maturin
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
LuckyCoders commented 1 month ago
[4/6] Source Compilation
Warning! insufficient RAM
use 1 cpus
[1/925] Build blst
FAILED: third-party/blst/libblst.a 
cd /usr/bin/ton/third-party/blst && /usr/src/ton/third-party/blst/build.sh
+ /usr/bin/clang -O2 -fno-builtin -fPIC -Wall -Wextra -Werror -c /usr/src/ton/third-party/blst/src/server.c
In file included from /usr/src/ton/third-party/blst/src/server.c:19:
/usr/src/ton/third-party/blst/src/bulk_addition.c:176:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
ADDITION_BTREE(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/ton/third-party/blst/src/bulk_addition.c:113:57: note: expanded from macro 'ADDITION_BTREE'
#define ADDITION_BTREE(prefix, ptype, bits, field, one) \
                                                        ^
/usr/src/ton/third-party/blst/src/bulk_addition.c:57:37: note: expanded from macro '\
HEAD'
    static const vec##bits zero = { 0 }; \
                                    ^
In file included from /usr/src/ton/third-party/blst/src/server.c:20:
/usr/src/ton/third-party/blst/src/multi_scalar.c:254:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p1, POINTonE1, 384, fp, BLS12_381_Rx.p)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/ton/third-party/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
    static const ptype##_affine infinity = { 0 }; \
                                             ^
/usr/src/ton/third-party/blst/src/multi_scalar.c:257:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/ton/third-party/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
    static const ptype##_affine infinity = { 0 }; \
                                             ^
/usr/src/ton/third-party/blst/src/multi_scalar.c:257:1: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
POINTS_MULT_WBITS_IMPL(blst_p2, POINTonE2, 384x, fp2, BLS12_381_Rx.p2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/ton/third-party/blst/src/multi_scalar.c:170:46: note: expanded from macro 'POINTS_MULT_WBITS_IMPL'
    static const ptype##_affine infinity = { 0 }; \
                                             ^
4 errors generated.
ninja: build stopped: subcommand failed.