Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libv8-node 17.3.1 doesn't build because of Python 3.10, 3.9 #45

Open
abartov opened this issue Jan 29, 2023 · 6 comments
Open

libv8-node 17.3.1 doesn't build because of Python 3.10, 3.9 #45

abartov opened this issue Jan 29, 2023 · 6 comments

Comments

@abartov
Copy link

abartov commented Jan 29, 2023

The gem doesn't build, despite having the Python versions it asks for (3.10, 3.9, as well as 2.7).

==== running /usr/share/rvm/gems/ruby-3.2.0/gems/libv8-node-17.3.1.0/libexec/build-libv8
parallel job count: 4
configure: --openssl-no-asm --without-npm --shared --with-intl=full-icu
compilers: CC='gcc' CXX='g++' CC_host='' CXX_host=''
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.3.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.3.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04)
Please use python3.10 or python3.9 or python3.8 or python3.7 or python3.6.
        /usr/bin/python3.9 configure
Node.js configure: Found Python 2.7.18...
/usr/share/rvm/gems/ruby-3.2.0/gems/libv8-node-17.3.1.0/ext/libv8-node/builder.rb:14:in `build_libv8!': failed to build libv8 17.3.1 (Libv8::Node::BuilderError)
        from /usr/share/rvm/gems/ruby-3.2.0/gems/libv8-node-17.3.1.0/ext/libv8-node/location.rb:30:in `install!'
        from extconf.rb:9:in `<main>'

extconf failed, exit code 1
@seanmakesgames
Copy link
Contributor

Hey @abartov - thanks for posting your issue. Did you figure out a workaround already?
I don't think @lloeki has posted the new binaries that we've been working on, yet.

This might be fixed with our recent changes.

@abartov
Copy link
Author

abartov commented Feb 4, 2023

@seanmakesgames - no, I haven't found a workaround. I've paused my upgrade and will wait for this to be resolved before resuming.

@lloeki
Copy link
Collaborator

lloeki commented Feb 6, 2023

Hey, I've been swamped lately (big deadline at work), sorry for the delays. I'll build+push the updated builds later this week.

despite having the Python versions it asks for (3.10, 3.9, as well as 2.7).
Node.js configure: Found Python 2.7.18.

Usually this is because the NodeJS detection here is a bit lousy and there's a python2 lying around as python in the path, or something to that effect. I tried to work around that here

You could fix that by:

  • nuking your Python 2 out
  • force the PYTHON env var to point to one of your python3 (at some point there were issues with that as not every place was using that env var)
  • if that's not possible hack around and having python pointing to python3 in your path (e.g mkdir /some/path && ln -sf /usr/bin/python3 /some/path/python && env PATH="/some/path:$PATH yourcommandthatfailed")

@seanmakesgames
Copy link
Contributor

Let us know if you try it and how it goes!

@Fayti1703
Copy link
Contributor

Usually this is because the NodeJS detection here is a bit lousy and there's a python2 lying around as python in the path, or something to that effect. I tried to work around that here

I want to add that the linked code snippet here was removed by me in the current node-17-HEAD (4411451) since it caused issues building on darwin CI.

However, Node.JS's configure script looks like it tries to find an appropriate python version if it is present in the PATH, see its header:

#!/bin/sh

# Locate an acceptable Python interpreter and then re-execute the script.
# Note that the mix of single and double quotes is intentional,
# as is the fact that the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
command -v python3.10 >/dev/null && exec python3.10 "$0" "$@"
command -v python3.9 >/dev/null && exec python3.9 "$0" "$@"
command -v python3.8 >/dev/null && exec python3.8 "$0" "$@"
command -v python3.7 >/dev/null && exec python3.7 "$0" "$@"
command -v python3.6 >/dev/null && exec python3.6 "$0" "$@"
command -v python3 >/dev/null && exec python3 "$0" "$@"
exec python "$0" "$@"
''' "$0" "$@"
]
del _

@seanmakesgames
Copy link
Contributor

Note to people watching these issues & PRs-- We are trying to release new versions of libv8-node and mini_racer and would love your help testing for stability in your products. Here's the main issue thread where we are tracking this:
rubyjs/mini_racer#277

Please let us know the results of your tests in our branches so we can do the actual releases on those branches with confidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants