cloudflare / stpyv8

Python 3 and JavaScript interoperability. Successor To PyV8 (https://github.com/flier/pyv8)
Apache License 2.0
440 stars 39 forks source link

building from source failed. #68

Closed russian-developer closed 1 year ago

russian-developer commented 1 year ago

I've tried to build the lib inside docker container based on python:3.11-bullseye.

My flow was based on https://github.com/cloudflare/stpyv8/blob/master/.github/workflows/build-debian.yml Here are the steps to reproduce:

  1. apt install libboost-dev libboost-system-dev libboost-iostreams-dev libboost-python-dev curl procps pkg-config git vim
  2. pip install --upgrade pip setuptools wheel pytest
  3. export V8_DEPS_LINUX=0
  4. export LDFLAGS="-L/usr/lib -L/usr/lib/x86_64-linux-gnu"
  5. git clone https://github.com/cloudflare/stpyv8.git
  6. cd stpyv8
  7. python setup.py build

Log:

root@e0ecb9a903ee:/stpyv8# python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
copying STPyV8.py -> build/lib.linux-x86_64-cpython-311
running build_ext
Cloning depot tools
Cloning into '/stpyv8/depot_tools'...
remote: Total 52686 (delta 33414), reused 52686 (delta 33414)
Receiving objects: 100% (52686/52686), 58.51 MiB | 32.79 MiB/s, done.
Resolving deltas: 100% (33414/33414), done.
Fetching Google V8 code
Running: gclient root
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Running: gclient config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
INFO: creating cache dir (/tmp/goma_unknown/goma_cache).
compiler_proxy is not running
Running: gclient sync --with_branch_heads
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
compiler_proxy is not running

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/v8/v8.git /stpyv8/_gclient_v8_t02qo1dy' in '/stpyv8'
Cloning into '/stpyv8/_gclient_v8_t02qo1dy'...
remote: Total 996907 (delta 802280), reused 996907 (delta 802280)
Receiving objects: 100% (996907/996907), 816.26 MiB | 33.92 MiB/s, done.
Resolving deltas: 100% (802280/802280), done.

[0:01:20] Still working on:
[0:01:20]   v8

[0:01:30] Still working on:
[0:01:30]   v8
1>Syncing projects:   0% ( 0/ 2) 
[0:01:38] Still working on:
[0:01:38]   v8
Syncing projects: 100% (29/29), done.                                                

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s buildtools/linux64/clang-format.sha1' in '/stpyv8/v8'
0> Downloading buildtools/linux64/clang-format@6ef2183a178a53e47e4448dbe192b1d8d5290222...
Downloading 1 files took 21.579749 second(s)
Hook 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s buildtools/linux64/clang-format.sha1' took 21.65 secs
Running hooks:  37% (12/32) wasm_spec_tests
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-spec-tests/tests.tar.gz@a02872d1c77253e2cc25df72465cc62ac90dc736...
0> Extracting 402 entries from test/wasm-spec-tests/tests.tar.gz to test/wasm-spec-tests/tests
Downloading 1 files took 5.491014 second(s)
Running hooks:  40% (13/32) wasm_js        
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-js/tests.tar.gz@250a613cbdd086814a8412f8a2836f82f2840d23...
0> Extracting 200 entries from test/wasm-js/tests.tar.gz to test/wasm-js/tests
Downloading 1 files took 10.175246 second(s)
Hook 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' took 10.23 secs
Running hooks:  50% (16/32) sysroot_x86  
________ running 'python3 build/linux/sysroot_scripts/install-sysroot.py --arch=x86' in '/stpyv8/v8'
Installing Debian bullseye i386 root image: /stpyv8/v8/build/linux/debian_bullseye_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/de629dcc11a6ab1b11e6d66c4180a959c6290097/debian_bullseye_i386_sysroot.tar.xz
Running hooks:  53% (17/32) sysroot_x64
________ running 'python3 build/linux/sysroot_scripts/install-sysroot.py --arch=x64' in '/stpyv8/v8'
Installing Debian bullseye amd64 root image: /stpyv8/v8/build/linux/debian_bullseye_amd64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/3bdb3503702d35520d101fc5eec9a8ab5353149f/debian_bullseye_amd64_sysroot.tar.xz
Running hooks:  71% (23/32) clang                     
________ running 'python3 tools/clang/scripts/update.py' in '/stpyv8/v8'
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-17-init-3874-g93a2fecc-1.tar.xz .......... Done.
Running hooks: 100% (32/32), done.                           
Running: git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
Running: git config diff.ignoreSubmodules all
Fetching the release tag information
Checkout Google V8 v11.1.277.14
Previous HEAD position was 692d8a972e [wasm-gc] Make GC and inlining configurable by Origin Trial
HEAD is now at ddb3086599 Version 11.1.277.14
Syncing Google V8 code
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
compiler_proxy is not running
Syncing projects: 100% (29/29), done.                                                

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-spec-tests/tests.tar.gz@a3cb4958b4f87c46ce5d6e5f022c906a5360ac8c...
0> Removed test/wasm-spec-tests/tests...
0> Extracting 399 entries from test/wasm-spec-tests/tests.tar.gz to test/wasm-spec-tests/tests
Downloading 1 files took 5.338898 second(s)
Running hooks:  40% (13/32) wasm_js
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-js/tests.tar.gz@1a7eae91ea379f6e001e0cc0679efb2f8050cc68...
0> Removed test/wasm-js/tests...
0> Extracting 184 entries from test/wasm-js/tests.tar.gz to test/wasm-js/tests
Downloading 1 files took 4.957527 second(s)
Running hooks:  71% (23/32) clang                      
________ running 'python3 tools/clang/scripts/update.py' in '/stpyv8/v8'
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-16-init-17653-g39da55e8-2.tar.xz .......... Done.
Running hooks: 100% (32/32), done.                           
Generate build scripts for V8 (v11.1.277.14)
Done. Made 181 targets from 97 files in 225ms
Build V8 with ninja
ninja: Entering directory `out.gn/x64.release.sample'
[1897/1897] AR obj/libv8_monolith.a
building '_STPyV8' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/src
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.11 -c src/Context.cpp -o build/temp.linux-x86_64-cpython-311/src/Context.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/Isolate.h:4,
                 from src/Context.h:6,
                 from src/Context.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/python3.11/Python.h:44,
                 from /usr/include/boost/python/detail/wrap_python.hpp:178,
                 from /usr/include/boost/python/detail/prefix.hpp:13,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from src/Utils.h:61,
                 from src/Exception.h:12,
                 from src/Isolate.h:4,
                 from src/Context.h:6,
                 from src/Context.cpp:1:
/usr/include/boost/python/object/make_instance.hpp: In instantiation of ‘static PyObject* boost::python::objects::make_instance_impl<T, Holder, Derived>::execute(Arg&) [with Arg = std::shared_ptr<CPlatform>; T = CPlatform; Holder = boost::python::objects::pointer_holder<std::shared_ptr<CPlatform>, CPlatform>; Derived = boost::python::objects::make_ptr_instance<CPlatform, boost::python::objects::pointer_holder<std::shared_ptr<CPlatform>, CPlatform> >; PyObject = _object]’:
/usr/include/boost/python/object/class_wrapper.hpp:42:37:   required from ‘static PyObject* boost::python::objects::class_value_wrapper<Src, MakeInstance>::convert(Src) [with Src = std::shared_ptr<CPlatform>; MakeInstance = boost::python::objects::make_ptr_instance<CPlatform, boost::python::objects::pointer_holder<std::shared_ptr<CPlatform>, CPlatform> >; PyObject = _object]’
/usr/include/boost/python/converter/as_to_python_function.hpp:27:61:   required from ‘static PyObject* boost::python::converter::as_to_python_function<T, ToPython>::convert(const void*) [with T = std::shared_ptr<CPlatform>; ToPython = boost::python::objects::class_value_wrapper<std::shared_ptr<CPlatform>, boost::python::objects::make_ptr_instance<CPlatform, boost::python::objects::pointer_holder<std::shared_ptr<CPlatform>, CPlatform> > >; PyObject = _object]’
/usr/include/boost/python/to_python_converter.hpp:83:9:   required from ‘boost::python::to_python_converter<T, Conversion, has_get_pytype>::to_python_converter() [with T = std::shared_ptr<CPlatform>; Conversion = boost::python::objects::class_value_wrapper<std::shared_ptr<CPlatform>, boost::python::objects::make_ptr_instance<CPlatform, boost::python::objects::pointer_holder<std::shared_ptr<CPlatform>, CPlatform> > >; bool has_get_pytype = true]’
/usr/include/boost/python/object/class_wrapper.hpp:37:8:   required from here
/usr/include/boost/python/object/make_instance.hpp:50:13: error: lvalue required as left operand of assignment
   50 |             Py_SIZE(instance) = offsetof(instance_t, storage);
      |             ^~~~~~~
/usr/include/boost/python/object/make_instance.hpp: In instantiation of ‘static PyObject* boost::python::objects::make_instance_impl<T, Holder, Derived>::execute(Arg&) [with Arg = std::shared_ptr<CIsolate>; T = CIsolate; Holder = boost::python::objects::pointer_holder<std::shared_ptr<CIsolate>, CIsolate>; Derived = boost::python::objects::make_ptr_instance<CIsolate, boost::python::objects::pointer_holder<std::shared_ptr<CIsolate>, CIsolate> >; PyObject = _object]’:
/usr/include/boost/python/object/class_wrapper.hpp:42:37:   required from ‘static PyObject* boost::python::objects::class_value_wrapper<Src, MakeInstance>::convert(Src) [with Src = std::shared_ptr<CIsolate>; MakeInstance = boost::python::objects::make_ptr_instance<CIsolate, boost::python::objects::pointer_holder<std::shared_ptr<CIsolate>, CIsolate> >; PyObject = _object]’
/usr/include/boost/python/converter/as_to_python_function.hpp:27:61:   required from ‘static PyObject* boost::python::converter::as_to_python_function<T, ToPython>::convert(const void*) [with T = std::shared_ptr<CIsolate>; ToPython = boost::python::objects::class_value_wrapper<std::shared_ptr<CIsolate>, boost::python::objects::make_ptr_instance<CIsolate, boost::python::objects::pointer_holder<std::shared_ptr<CIsolate>, CIsolate> > >; PyObject = _object]’
/usr/include/boost/python/to_python_converter.hpp:83:9:   required from ‘boost::python::to_python_converter<T, Conversion, has_get_pytype>::to_python_converter() [with T = std::shared_ptr<CIsolate>; Conversion = boost::python::objects::class_value_wrapper<std::shared_ptr<CIsolate>, boost::python::objects::make_ptr_instance<CIsolate, boost::python::objects::pointer_holder<std::shared_ptr<CIsolate>, CIsolate> > >; bool has_get_pytype = true]’
/usr/include/boost/python/object/class_wrapper.hpp:37:8:   required from here
/usr/include/boost/python/object/make_instance.hpp:50:13: error: lvalue required as left operand of assignment
/usr/include/boost/python/object/make_instance.hpp: In instantiation of ‘static PyObject* boost::python::objects::make_instance_impl<T, Holder, Derived>::execute(Arg&) [with Arg = std::shared_ptr<CContext>; T = CContext; Holder = boost::python::objects::pointer_holder<std::shared_ptr<CContext>, CContext>; Derived = boost::python::objects::make_ptr_instance<CContext, boost::python::objects::pointer_holder<std::shared_ptr<CContext>, CContext> >; PyObject = _object]’:
/usr/include/boost/python/object/class_wrapper.hpp:42:37:   required from ‘static PyObject* boost::python::objects::class_value_wrapper<Src, MakeInstance>::convert(Src) [with Src = std::shared_ptr<CContext>; MakeInstance = boost::python::objects::make_ptr_instance<CContext, boost::python::objects::pointer_holder<std::shared_ptr<CContext>, CContext> >; PyObject = _object]’
/usr/include/boost/python/converter/as_to_python_function.hpp:27:61:   required from ‘static PyObject* boost::python::converter::as_to_python_function<T, ToPython>::convert(const void*) [with T = std::shared_ptr<CContext>; ToPython = boost::python::objects::class_value_wrapper<std::shared_ptr<CContext>, boost::python::objects::make_ptr_instance<CContext, boost::python::objects::pointer_holder<std::shared_ptr<CContext>, CContext> > >; PyObject = _object]’
/usr/include/boost/python/to_python_converter.hpp:83:9:   required from ‘boost::python::to_python_converter<T, Conversion, has_get_pytype>::to_python_converter() [with T = std::shared_ptr<CContext>; Conversion = boost::python::objects::class_value_wrapper<std::shared_ptr<CContext>, boost::python::objects::make_ptr_instance<CContext, boost::python::objects::pointer_holder<std::shared_ptr<CContext>, CContext> > >; bool has_get_pytype = true]’
/usr/include/boost/python/object/class_wrapper.hpp:37:8:   required from here
/usr/include/boost/python/object/make_instance.hpp:50:13: error: lvalue required as left operand of assignment
error: command '/usr/bin/gcc' failed with exit code 1
russian-developer commented 1 year ago

For python:3.10-bulleye

root@62c5e4be9f79:/# apt install libboost-dev libboost-system-dev libboost-iostreams-dev libboost-python-dev curl procps pkg-config git vim
pip install --upgrade pip setuptools wheel pytest
export V8_DEPS_LINUX=0
export LDFLAGS="-L/usr/lib -L/usr/lib/x86_64-linux-gnu"
git clone https://github.com/cloudflare/stpyv8.git
cd stpyv8
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pkg-config is already the newest version (0.29.2-1).
pkg-config set to manually installed.
procps is already the newest version (2:3.3.17-5).
curl is already the newest version (7.74.0-1.3+deb11u7).
git is already the newest version (1:2.30.2-1+deb11u2).
The following additional packages will be installed:
  javascript-common libboost-iostreams1.74-dev libboost-iostreams1.74.0 libboost-python1.74-dev libboost-python1.74.0 libboost-regex1.74-dev libboost-regex1.74.0 libboost-system1.74-dev libboost-system1.74.0 libboost1.74-dev libgpm2
  libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev libpython3.9 libpython3.9-dev python3-dev python3.9-dev vim-common vim-runtime xxd
Suggested packages:
  apache2 | lighttpd | httpd libboost-doc libboost1.74-doc gccxml libboost-atomic1.74-dev libboost-chrono1.74-dev libboost-container1.74-dev libboost-context1.74-dev libboost-contract1.74-dev libboost-coroutine1.74-dev
  libboost-date-time1.74-dev libboost-exception1.74-dev libboost-fiber1.74-dev libboost-filesystem1.74-dev libboost-graph1.74-dev libboost-graph-parallel1.74-dev libboost-locale1.74-dev libboost-log1.74-dev libboost-math1.74-dev
  libboost-mpi1.74-dev libboost-mpi-python1.74-dev libboost-numpy1.74-dev libboost-program-options1.74-dev libboost-random1.74-dev libboost-serialization1.74-dev libboost-stacktrace1.74-dev libboost-test1.74-dev libboost-thread1.74-dev
  libboost-timer1.74-dev libboost-type-erasure1.74-dev libboost-wave1.74-dev libboost1.74-tools-dev libmpfrc++-dev libntl-dev libboost-nowide1.74-dev gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
  javascript-common libboost-dev libboost-iostreams-dev libboost-iostreams1.74-dev libboost-iostreams1.74.0 libboost-python-dev libboost-python1.74-dev libboost-python1.74.0 libboost-regex1.74-dev libboost-regex1.74.0 libboost-system-dev
  libboost-system1.74-dev libboost-system1.74.0 libboost1.74-dev libgpm2 libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev libpython3.9 libpython3.9-dev python3-dev python3.9-dev vim vim-common vim-runtime xxd
0 upgraded, 27 newly installed, 0 to remove and 1 not upgraded.
Need to get 27.3 MB of archives.
After this operation, 229 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://deb.debian.org/debian bullseye/main amd64 xxd amd64 2:8.2.2434-3+deb11u1 [192 kB]
Get:2 http://deb.debian.org/debian bullseye/main amd64 vim-common all 2:8.2.2434-3+deb11u1 [226 kB]
Get:3 http://deb.debian.org/debian bullseye/main amd64 javascript-common all 11+nmu1 [6260 B]
Get:4 http://deb.debian.org/debian bullseye/main amd64 libboost1.74-dev amd64 1.74.0-9 [9534 kB]
Get:5 http://deb.debian.org/debian bullseye/main amd64 libboost-dev amd64 1.74.0.3 [4548 B]
Get:6 http://deb.debian.org/debian bullseye/main amd64 libboost-regex1.74.0 amd64 1.74.0-9 [516 kB]
Get:7 http://deb.debian.org/debian bullseye/main amd64 libboost-regex1.74-dev amd64 1.74.0-9 [588 kB]
Get:8 http://deb.debian.org/debian bullseye/main amd64 libboost-iostreams1.74.0 amd64 1.74.0-9 [264 kB]
Get:9 http://deb.debian.org/debian bullseye/main amd64 libboost-iostreams1.74-dev amd64 1.74.0-9 [273 kB]
Get:10 http://deb.debian.org/debian bullseye/main amd64 libboost-iostreams-dev amd64 1.74.0.3 [4316 B]
Get:11 http://deb.debian.org/debian bullseye/main amd64 libboost-python1.74.0 amd64 1.74.0-9 [313 kB]
Get:12 http://deb.debian.org/debian bullseye/main amd64 libpython3.9 amd64 3.9.2-1 [1691 kB]
Get:13 http://deb.debian.org/debian bullseye/main amd64 libpython3.9-dev amd64 3.9.2-1 [4028 kB]
Get:14 http://deb.debian.org/debian bullseye/main amd64 libpython3-dev amd64 3.9.2-3 [21.7 kB]
Get:15 http://deb.debian.org/debian bullseye/main amd64 python3.9-dev amd64 3.9.2-1 [515 kB]
Get:16 http://deb.debian.org/debian bullseye/main amd64 libjs-jquery all 3.5.1+dfsg+~3.5.5-7 [315 kB]
Get:17 http://deb.debian.org/debian bullseye/main amd64 libjs-underscore all 1.9.1~dfsg-3 [100 kB]
Get:18 http://deb.debian.org/debian bullseye/main amd64 libjs-sphinxdoc all 3.4.3-2 [127 kB]
Get:19 http://deb.debian.org/debian bullseye/main amd64 python3-dev amd64 3.9.2-3 [24.8 kB]
Get:20 http://deb.debian.org/debian bullseye/main amd64 libboost-python1.74-dev amd64 1.74.0-9 [336 kB]
Get:21 http://deb.debian.org/debian bullseye/main amd64 libboost-python-dev amd64 1.74.0.3 [4632 B]
Get:22 http://deb.debian.org/debian bullseye/main amd64 libboost-system1.74.0 amd64 1.74.0-9 [241 kB]
Get:23 http://deb.debian.org/debian bullseye/main amd64 libboost-system1.74-dev amd64 1.74.0-9 [243 kB]
Get:24 http://deb.debian.org/debian bullseye/main amd64 libboost-system-dev amd64 1.74.0.3 [4468 B]
Get:25 http://deb.debian.org/debian bullseye/main amd64 libgpm2 amd64 1.20.7-8 [35.6 kB]
Get:26 http://deb.debian.org/debian bullseye/main amd64 vim-runtime all 2:8.2.2434-3+deb11u1 [6226 kB]
Get:27 http://deb.debian.org/debian bullseye/main amd64 vim amd64 2:8.2.2434-3+deb11u1 [1494 kB]
Fetched 27.3 MB in 0s (132 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package xxd.
(Reading database ... 23423 files and directories currently installed.)
Preparing to unpack .../00-xxd_2%3a8.2.2434-3+deb11u1_amd64.deb ...
Unpacking xxd (2:8.2.2434-3+deb11u1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../01-vim-common_2%3a8.2.2434-3+deb11u1_all.deb ...
Unpacking vim-common (2:8.2.2434-3+deb11u1) ...
Selecting previously unselected package javascript-common.
Preparing to unpack .../02-javascript-common_11+nmu1_all.deb ...
Unpacking javascript-common (11+nmu1) ...
Selecting previously unselected package libboost1.74-dev:amd64.
Preparing to unpack .../03-libboost1.74-dev_1.74.0-9_amd64.deb ...
Unpacking libboost1.74-dev:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-dev:amd64.
Preparing to unpack .../04-libboost-dev_1.74.0.3_amd64.deb ...
Unpacking libboost-dev:amd64 (1.74.0.3) ...
Selecting previously unselected package libboost-regex1.74.0:amd64.
Preparing to unpack .../05-libboost-regex1.74.0_1.74.0-9_amd64.deb ...
Unpacking libboost-regex1.74.0:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-regex1.74-dev:amd64.
Preparing to unpack .../06-libboost-regex1.74-dev_1.74.0-9_amd64.deb ...
Unpacking libboost-regex1.74-dev:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-iostreams1.74.0:amd64.
Preparing to unpack .../07-libboost-iostreams1.74.0_1.74.0-9_amd64.deb ...
Unpacking libboost-iostreams1.74.0:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-iostreams1.74-dev:amd64.
Preparing to unpack .../08-libboost-iostreams1.74-dev_1.74.0-9_amd64.deb ...
Unpacking libboost-iostreams1.74-dev:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-iostreams-dev:amd64.
Preparing to unpack .../09-libboost-iostreams-dev_1.74.0.3_amd64.deb ...
Unpacking libboost-iostreams-dev:amd64 (1.74.0.3) ...
Selecting previously unselected package libboost-python1.74.0.
Preparing to unpack .../10-libboost-python1.74.0_1.74.0-9_amd64.deb ...
Unpacking libboost-python1.74.0 (1.74.0-9) ...
Selecting previously unselected package libpython3.9:amd64.
Preparing to unpack .../11-libpython3.9_3.9.2-1_amd64.deb ...
Unpacking libpython3.9:amd64 (3.9.2-1) ...
Selecting previously unselected package libpython3.9-dev:amd64.
Preparing to unpack .../12-libpython3.9-dev_3.9.2-1_amd64.deb ...
Unpacking libpython3.9-dev:amd64 (3.9.2-1) ...
Selecting previously unselected package libpython3-dev:amd64.
Preparing to unpack .../13-libpython3-dev_3.9.2-3_amd64.deb ...
Unpacking libpython3-dev:amd64 (3.9.2-3) ...
Selecting previously unselected package python3.9-dev.
Preparing to unpack .../14-python3.9-dev_3.9.2-1_amd64.deb ...
Unpacking python3.9-dev (3.9.2-1) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../15-libjs-jquery_3.5.1+dfsg+~3.5.5-7_all.deb ...
Unpacking libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Selecting previously unselected package libjs-underscore.
Preparing to unpack .../16-libjs-underscore_1.9.1~dfsg-3_all.deb ...
Unpacking libjs-underscore (1.9.1~dfsg-3) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../17-libjs-sphinxdoc_3.4.3-2_all.deb ...
Unpacking libjs-sphinxdoc (3.4.3-2) ...
Selecting previously unselected package python3-dev.
Preparing to unpack .../18-python3-dev_3.9.2-3_amd64.deb ...
Unpacking python3-dev (3.9.2-3) ...
Selecting previously unselected package libboost-python1.74-dev.
Preparing to unpack .../19-libboost-python1.74-dev_1.74.0-9_amd64.deb ...
Unpacking libboost-python1.74-dev (1.74.0-9) ...
Selecting previously unselected package libboost-python-dev.
Preparing to unpack .../20-libboost-python-dev_1.74.0.3_amd64.deb ...
Unpacking libboost-python-dev (1.74.0.3) ...
Selecting previously unselected package libboost-system1.74.0:amd64.
Preparing to unpack .../21-libboost-system1.74.0_1.74.0-9_amd64.deb ...
Unpacking libboost-system1.74.0:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-system1.74-dev:amd64.
Preparing to unpack .../22-libboost-system1.74-dev_1.74.0-9_amd64.deb ...
Unpacking libboost-system1.74-dev:amd64 (1.74.0-9) ...
Selecting previously unselected package libboost-system-dev:amd64.
Preparing to unpack .../23-libboost-system-dev_1.74.0.3_amd64.deb ...
Unpacking libboost-system-dev:amd64 (1.74.0.3) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../24-libgpm2_1.20.7-8_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-8) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../25-vim-runtime_2%3a8.2.2434-3+deb11u1_all.deb ...
Adding 'diversion of /usr/share/vim/vim82/doc/help.txt to /usr/share/vim/vim82/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim82/doc/tags to /usr/share/vim/vim82/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.2.2434-3+deb11u1) ...
Selecting previously unselected package vim.
Preparing to unpack .../26-vim_2%3a8.2.2434-3+deb11u1_amd64.deb ...
Unpacking vim (2:8.2.2434-3+deb11u1) ...
Setting up libboost-system1.74.0:amd64 (1.74.0-9) ...
Setting up javascript-common (11+nmu1) ...
Setting up libboost1.74-dev:amd64 (1.74.0-9) ...
Setting up libgpm2:amd64 (1.20.7-8) ...
Setting up libboost-iostreams1.74.0:amd64 (1.74.0-9) ...
Setting up xxd (2:8.2.2434-3+deb11u1) ...
Setting up libpython3.9:amd64 (3.9.2-1) ...
Setting up vim-common (2:8.2.2434-3+deb11u1) ...
Setting up libboost-system1.74-dev:amd64 (1.74.0-9) ...
Setting up libboost-regex1.74.0:amd64 (1.74.0-9) ...
Setting up libboost-regex1.74-dev:amd64 (1.74.0-9) ...
Setting up libboost-dev:amd64 (1.74.0.3) ...
Setting up libjs-jquery (3.5.1+dfsg+~3.5.5-7) ...
Setting up vim-runtime (2:8.2.2434-3+deb11u1) ...
Setting up libboost-python1.74.0 (1.74.0-9) ...
Setting up libjs-underscore (1.9.1~dfsg-3) ...
Setting up vim (2:8.2.2434-3+deb11u1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
Setting up libboost-system-dev:amd64 (1.74.0.3) ...
Setting up libpython3.9-dev:amd64 (3.9.2-1) ...
Setting up libboost-iostreams1.74-dev:amd64 (1.74.0-9) ...
Setting up libjs-sphinxdoc (3.4.3-2) ...
Setting up python3.9-dev (3.9.2-1) ...
Setting up libpython3-dev:amd64 (3.9.2-3) ...
Setting up libboost-iostreams-dev:amd64 (1.74.0.3) ...
Setting up python3-dev (3.9.2-3) ...
Setting up libboost-python1.74-dev (1.74.0-9) ...
Setting up libboost-python-dev (1.74.0.3) ...
Processing triggers for libc-bin (2.31-13+deb11u5) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (22.3.1)
Collecting pip
  Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 17.8 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/site-packages (65.5.1)
Collecting setuptools
  Downloading setuptools-67.6.0-py3-none-any.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 95.9 MB/s eta 0:00:00
Requirement already satisfied: wheel in /usr/local/lib/python3.10/site-packages (0.38.4)
Collecting wheel
  Downloading wheel-0.40.0-py3-none-any.whl (64 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 15.1 MB/s eta 0:00:00
Collecting pytest
  Downloading pytest-7.2.2-py3-none-any.whl (317 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 317.2/317.2 kB 54.9 MB/s eta 0:00:00
Collecting pluggy<2.0,>=0.12
  Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting attrs>=19.2.0
  Downloading attrs-22.2.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.0/60.0 kB 14.8 MB/s eta 0:00:00
Collecting packaging
  Downloading packaging-23.0-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 10.1 MB/s eta 0:00:00
Collecting exceptiongroup>=1.0.0rc8
  Downloading exceptiongroup-1.1.1-py3-none-any.whl (14 kB)
Collecting tomli>=1.0.0
  Downloading tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting iniconfig
  Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Installing collected packages: wheel, tomli, setuptools, pluggy, pip, packaging, iniconfig, exceptiongroup, attrs, pytest
  Attempting uninstall: wheel
    Found existing installation: wheel 0.38.4
    Uninstalling wheel-0.38.4:
      Successfully uninstalled wheel-0.38.4
  Attempting uninstall: setuptools
    Found existing installation: setuptools 65.5.1
    Uninstalling setuptools-65.5.1:
      Successfully uninstalled setuptools-65.5.1
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed attrs-22.2.0 exceptiongroup-1.1.1 iniconfig-2.0.0 packaging-23.0 pip-23.0.1 pluggy-1.0.0 pytest-7.2.2 setuptools-67.6.0 tomli-2.0.1 wheel-0.40.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Cloning into 'stpyv8'...
remote: Enumerating objects: 2732, done.
remote: Counting objects: 100% (1456/1456), done.
remote: Compressing objects: 100% (530/530), done.
remote: Total 2732 (delta 892), reused 1386 (delta 846), pack-reused 1276
Receiving objects: 100% (2732/2732), 34.72 MiB | 68.77 MiB/s, done.
Resolving deltas: 100% (1702/1702), done.
root@62c5e4be9f79:/stpyv8# python setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
copying STPyV8.py -> build/lib.linux-x86_64-cpython-310
running build_ext
Cloning depot tools
Cloning into '/stpyv8/depot_tools'...
remote: Total 52686 (delta 33414), reused 52686 (delta 33414)
Receiving objects: 100% (52686/52686), 58.51 MiB | 37.71 MiB/s, done.
Resolving deltas: 100% (33414/33414), done.
Fetching Google V8 code
Running: gclient root
WARNING: Your metrics.cfg file was invalid or nonexistent. A new one will be created.
Running: gclient config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
INFO: creating cache dir (/tmp/goma_unknown/goma_cache).
compiler_proxy is not running
Running: gclient sync --with_branch_heads
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
compiler_proxy is not running

________ running 'git -c core.deltaBaseCacheLimit=2g clone --no-checkout --progress https://chromium.googlesource.com/v8/v8.git /stpyv8/_gclient_v8_4jj8te2v' in '/stpyv8'
Cloning into '/stpyv8/_gclient_v8_4jj8te2v'...
remote: Finding sources: 100% (4/4)
remote: Total 996911 (delta 802280), reused 996908 (delta 802280)
Receiving objects: 100% (996911/996911), 816.26 MiB | 34.48 MiB/s, done.
Resolving deltas: 100% (802280/802280), done.

[0:01:20] Still working on:
[0:01:20]   v8

[0:01:30] Still working on:
[0:01:30]   v8
1>Syncing projects:   0% ( 0/ 2) 
[0:01:35] Still working on:
[0:01:35]   v8
Syncing projects: 100% (29/29), done.                                                

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s buildtools/linux64/clang-format.sha1' in '/stpyv8/v8'
0> Downloading buildtools/linux64/clang-format@6ef2183a178a53e47e4448dbe192b1d8d5290222...
Downloading 1 files took 21.348850 second(s)
Hook 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s buildtools/linux64/clang-format.sha1' took 21.42 secs
Running hooks:  37% (12/32) wasm_spec_tests
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-spec-tests/tests.tar.gz@a02872d1c77253e2cc25df72465cc62ac90dc736...
0> Extracting 402 entries from test/wasm-spec-tests/tests.tar.gz to test/wasm-spec-tests/tests
Downloading 1 files took 5.892888 second(s)
Running hooks:  40% (13/32) wasm_js        
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-js/tests.tar.gz@250a613cbdd086814a8412f8a2836f82f2840d23...
0> Extracting 200 entries from test/wasm-js/tests.tar.gz to test/wasm-js/tests
Downloading 1 files took 5.100941 second(s)
Running hooks:  50% (16/32) sysroot_x86  
________ running 'python3 build/linux/sysroot_scripts/install-sysroot.py --arch=x86' in '/stpyv8/v8'
Installing Debian bullseye i386 root image: /stpyv8/v8/build/linux/debian_bullseye_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/de629dcc11a6ab1b11e6d66c4180a959c6290097/debian_bullseye_i386_sysroot.tar.xz
Running hooks:  53% (17/32) sysroot_x64
________ running 'python3 build/linux/sysroot_scripts/install-sysroot.py --arch=x64' in '/stpyv8/v8'
Installing Debian bullseye amd64 root image: /stpyv8/v8/build/linux/debian_bullseye_amd64-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/3bdb3503702d35520d101fc5eec9a8ab5353149f/debian_bullseye_amd64_sysroot.tar.xz
Running hooks:  71% (23/32) clang                     
________ running 'python3 tools/clang/scripts/update.py' in '/stpyv8/v8'
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-17-init-3874-g93a2fecc-1.tar.xz .......... Done.
Running hooks: 100% (32/32), done.                           
Running: git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
Running: git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
Running: git config diff.ignoreSubmodules all
Fetching the release tag information
Checkout Google V8 v11.1.277.14
Previous HEAD position was 692d8a972e [wasm-gc] Make GC and inlining configurable by Origin Trial
HEAD is now at ddb3086599 Version 11.1.277.14
Syncing Google V8 code
Updating depot_tools...
using /tmp/goma_unknown as tmpdir
compiler_proxy is not running
Syncing projects: 100% (29/29), done.                                                

________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-spec-tests/tests.tar.gz@a3cb4958b4f87c46ce5d6e5f022c906a5360ac8c...
0> Removed test/wasm-spec-tests/tests...
0> Extracting 399 entries from test/wasm-spec-tests/tests.tar.gz to test/wasm-spec-tests/tests
Downloading 1 files took 10.489721 second(s)
Hook 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-spec-tests/tests.tar.gz.sha1' took 10.55 secs
Running hooks:  40% (13/32) wasm_js
________ running 'python3 third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth -u --bucket v8-wasm-spec-tests -s test/wasm-js/tests.tar.gz.sha1' in '/stpyv8/v8'
0> Downloading test/wasm-js/tests.tar.gz@1a7eae91ea379f6e001e0cc0679efb2f8050cc68...
0> Removed test/wasm-js/tests...
0> Extracting 184 entries from test/wasm-js/tests.tar.gz to test/wasm-js/tests
Downloading 1 files took 5.057477 second(s)
Running hooks:  71% (23/32) clang                      
________ running 'python3 tools/clang/scripts/update.py' in '/stpyv8/v8'
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-llvmorg-16-init-17653-g39da55e8-2.tar.xz .......... Done.
Running hooks: 100% (32/32), done.                           
Generate build scripts for V8 (v11.1.277.14)
Done. Made 181 targets from 97 files in 337ms
Build V8 with ninja
ninja: Entering directory `out.gn/x64.release.sample'
[1897/1897] AR obj/libv8_monolith.a
building '_STPyV8' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Context.cpp -o build/temp.linux-x86_64-cpython-310/src/Context.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/Isolate.h:4,
                 from src/Context.h:6,
                 from src/Context.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Engine.cpp -o build/temp.linux-x86_64-cpython-310/src/Engine.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from src/Utils.h:61,
                 from src/Engine.h:8,
                 from src/Engine.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Exception.cpp -o build/temp.linux-x86_64-cpython-310/src/Exception.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/Exception.cpp:2:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /stpyv8/v8/include/v8-object.h:10,
                 from /stpyv8/v8/include/v8-array-buffer.h:13,
                 from /stpyv8/v8/include/v8.h:24,
                 from src/Utils.h:72,
                 from src/Exception.h:12,
                 from src/Exception.cpp:2:
/stpyv8/v8/include/v8-persistent-handle.h: In static member function ‘static void* ExceptionTranslator::Convertible(PyObject*)’:
/stpyv8/v8/include/v8-persistent-handle.h:116:43: warning: ‘*((void*)(& extractor)+64).v8::PersistentBase<v8::Value>::val_’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  116 |   V8_INLINE bool IsEmpty() const { return val_ == nullptr; }
      |                                           ^~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Isolate.cpp -o build/temp.linux-x86_64-cpython-310/src/Isolate.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/Isolate.h:4,
                 from src/Context.h:6,
                 from src/Isolate.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Locker.cpp -o build/temp.linux-x86_64-cpython-310/src/Locker.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/Locker.h:3,
                 from src/Locker.cpp:1:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Platform.cpp -o build/temp.linux-x86_64-cpython-310/src/Platform.o -std=c++17
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/STPyV8.cpp -o build/temp.linux-x86_64-cpython-310/src/STPyV8.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/iostreams/device/file_descriptor.hpp:28,
                 from src/Exception.h:7,
                 from src/STPyV8.cpp:2:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Utils.cpp -o build/temp.linux-x86_64-cpython-310/src/Utils.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/args.hpp:22,
                 from /usr/include/boost/python.hpp:11,
                 from src/Utils.h:61,
                 from src/Utils.cpp:5:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DBOOST_PYTHON_STATIC_LIB -I/stpyv8/v8/include -I/usr/local/include/python3.10 -c src/Wrapper.cpp -o build/temp.linux-x86_64-cpython-310/src/Wrapper.o -std=c++17
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_gcc_atomic.hpp:14,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:42,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/python/converter/shared_ptr_to_python.hpp:12,
                 from /usr/include/boost/python/converter/arg_to_python.hpp:15,
                 from /usr/include/boost/python/call.hpp:15,
                 from /usr/include/boost/python/object_core.hpp:14,
                 from /usr/include/boost/python/object.hpp:9,
                 from /usr/include/boost/python/tuple.hpp:10,
                 from /usr/include/boost/python/raw_function.hpp:10,
                 from src/Wrapper.cpp:5:
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
   36 | BOOST_PRAGMA_MESSAGE(
      | ^~~~~~~~~~~~~~~~~~~~
/usr/include/boost/detail/iterator.hpp:13:1: note: ‘#pragma message: This header is deprecated. Use <iterator> instead.’
   13 | BOOST_HEADER_DEPRECATED("<iterator>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
g++ -pthread -shared -L/usr/lib -L/usr/lib/x86_64-linux-gnu build/temp.linux-x86_64-cpython-310/src/Context.o build/temp.linux-x86_64-cpython-310/src/Engine.o build/temp.linux-x86_64-cpython-310/src/Exception.o build/temp.linux-x86_64-cpython-310/src/Isolate.o build/temp.linux-x86_64-cpython-310/src/Locker.o build/temp.linux-x86_64-cpython-310/src/Platform.o build/temp.linux-x86_64-cpython-310/src/STPyV8.o build/temp.linux-x86_64-cpython-310/src/Utils.o build/temp.linux-x86_64-cpython-310/src/Wrapper.o -L/stpyv8/v8/out.gn/x64.release.sample/obj/ -L/usr/local/lib -lboost_system -lboost_iostreams -lv8_monolith -lboost_python310 -lrt -o build/lib.linux-x86_64-cpython-310/_STPyV8.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lboost_python310
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1
russian-developer commented 1 year ago

For the images' python:3.9-bulleye and python:3.8-bulleye I got success build.

@buffer looks like it happens only with py310 and py311. Could you please share your opinion?

buffer commented 1 year ago

What you experienced is totally expected. Some words about the Github Actions build workflow are required.

As you have already noticed, I make use of the boost-python package provided by Ubuntu/Debian for building purposes. The entire boost ecosystem is installed the same way but boost-python is quite different. Ubuntu and Debian provide a package which is compiled against the Python version installed on the system. WRT your issue Debian 11 installs Python 3.9 by default so in this case compiling STPyV8 using Python 3.9 works fine for sure. There is another interesting detail which is the reason why I am able to compile STPyV8 wheels on Ubuntu using Python 3.6, 3.7, 3.8, 3.9 and 3.10. All these versions of Python are ABI compatible. This means that boost-python3 built using i.e. Python 3.9 can be used with all the other Python versions. Python 3.11 is a totally different beast as it is not ABI compatible with the previous Python 3 versions so the trick doesn’t work. This is the reason why no Python 3.11 STPyV8 wheels are still available for Linux.

The reason why your Python 3.10 build fails is because the linker is searching for the file libboost_python310.so but can't locate it

g++ -pthread -shared -L/usr/lib -L/usr/lib/x86_64-linux-gnu build/temp.linux-x86_64-cpython-310/src/Context.o build/temp.linux-x86_64-cpython-310/src/Engine.o build/temp.linux-x86_64-cpython-310/src/Exception.o build/temp.linux-x86_64-cpython-310/src/Isolate.o build/temp.linux-x86_64-cpython-310/src/Locker.o build/temp.linux-x86_64-cpython-310/src/Platform.o build/temp.linux-x86_64-cpython-310/src/STPyV8.o build/temp.linux-x86_64-cpython-310/src/Utils.o build/temp.linux-x86_64-cpython-310/src/Wrapper.o -L/stpyv8/v8/out.gn/x64.release.sample/obj/ -L/usr/local/lib -lboost_system -lboost_iostreams -lv8_monolith -lboost_python310 -lrt -o build/lib.linux-x86_64-cpython-310/_STPyV8.cpython-310-x86_64-linux-gnu.so
/usr/bin/ld: cannot find -lboost_python310

You could fool the linker and successfully build the wheel by

or alternatively (and more cleanly)

This works because Python 3.10 is ABI compatible with Python 3.9.

The only way to build STPyV8 using Python 3.11 at the moment is to manually compile boost-python after Python 3.11 is installed on the system. This takes a lot of time. And that's the reason why I do not do that in the build workflows.

russian-developer commented 1 year ago

:\ Current solution is to use golang rogchap.com/v8go. Works excellent out of the box. Thanks for your time.

russian-developer commented 1 year ago

Sorry for off topic, but in my opinion people could be found useful information here.

Another approach is to install node and run JS script passing directly as a system command.

as an example of the script.

// prepare env
docuemnt = Object;
document._____ = Object; // etc

var xxx = "your script here"

console.log(xxx);

@buffer thank you for your good job and quickly answer!