Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dev-lang/rust 1.7{3,4} fails to compile [PYTHON_COMPAT]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Sat Feb 03, 2024 7:43 am    Post subject: dev-lang/rust 1.7{3,4} fails to compile [PYTHON_COMPAT] Reply with quote

The log file is extremely long to the point that most pasting services won't even accept it but I reckon the relevant part is:

Code:
[RUSTC-SHIM] rustc rustc_main sysroot: "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0-sysroot"
[RUSTC-SHIM] rustc rustc_main libdir: "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rust-stage0/lib"
    Finished[0m release [optimized] target(s) in 4m 25s
: _python_wrapper_setup: python2 is not supported by python3.12 (PYTHON_COMPAT)
thread 'main' panicked at compile.rs:2000:5:
command did not execute successfully: "strip" "--strip-debug" "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/librustc_driver.so"
expected success, got: exit status: 127
stack backtrace:
   0: rust_begin_unwind
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:595:5
   1: core::panicking::panic_fmt
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/panicking.rs:67:14
   2: bootstrap::util::output
             at ./src/bootstrap/util.rs:287:9
   3: bootstrap::compile::strip_debug
             at ./src/bootstrap/compile.rs:2000:5
   4: <bootstrap::compile::Rustc as bootstrap::builder::Step>::run
             at ./src/bootstrap/compile.rs:918:13
   5: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:2095:23
   6: <bootstrap::compile::Assemble as bootstrap::builder::Step>::run
             at ./src/bootstrap/compile.rs:1581:9
   7: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:2095:23
   8: bootstrap::builder::Builder::compiler
             at ./src/bootstrap/builder.rs:972:9
   9: <bootstrap::compile::Assemble as bootstrap::builder::Step>::run
             at ./src/bootstrap/compile.rs:1560:30
  10: bootstrap::builder::Builder::ensure
             at ./src/bootstrap/builder.rs:2095:23
  11: bootstrap::builder::Builder::compiler
             at ./src/bootstrap/builder.rs:972:9
  12: <bootstrap::compile::Std as bootstrap::builder::Step>::make_run
             at ./src/bootstrap/compile.rs:79:23
  13: bootstrap::builder::StepDescription::maybe_run
             at ./src/bootstrap/builder.rs:317:13
  14: bootstrap::builder::StepDescription::run
             at ./src/bootstrap/builder.rs:356:21
  15: bootstrap::builder::Builder::run_step_descriptions
             at ./src/bootstrap/builder.rs:964:9
  16: bootstrap::builder::Builder::execute_cli
             at ./src/bootstrap/builder.rs:945:9
  17: bootstrap::Build::build
             at ./src/bootstrap/lib.rs:706:13
  18: bootstrap::main
             at ./src/bootstrap/bin/main.rs:74:5
  19: core::ops::function::FnOnce::call_once
             at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Traceback (most recent call last):
  File "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/./x.py", line 50, in <module>
    bootstrap.main()
  File "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/src/bootstrap/bootstrap.py", line 1121, in main
    bootstrap(args)
  File "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/src/bootstrap/bootstrap.py", line 1097, in bootstrap
    run(args, env=env, verbose=build.verbose, is_bootstrap=True)
  File "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/src/bootstrap/bootstrap.py", line 187, in run
    raise RuntimeError(err)
RuntimeError: failed to run: /var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/bootstrap/debug/bootstrap build -vvv --config=/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/config.toml -j8
 [31;01m*[0m ERROR: dev-lang/rust-1.74.1::gentoo failed (compile phase):
 [31;01m*[0m   (no error message)
 [31;01m*[0m
 [31;01m*[0m Call stack:
 [31;01m*[0m     ebuild.sh, line 136:  Called src_compile
 [31;01m*[0m   environment, line 3754:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m       RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vvv --config="${S}"/config.toml -j$(makeopts_jobs) || die
 [31;01m*[0m
 [31;01m*[0m If you need support, post the output of `emerge --info '=dev-lang/rust-1.74.1::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=dev-lang/rust-1.74.1::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/build/portage/dev-lang/rust-1.74.1/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/build/portage/dev-lang/rust-1.74.1/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src'
 [31;01m*[0m S: '/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src'


In particular the part about:

Code:
: _python_wrapper_setup: python2 is not supported by python3.12 (PYTHON_COMPAT)


Is what intrigues me because when searching for it online I get almost no results and no one else seems to get this problem. Any thoughts as to what can cause this? I know Rust still needs Python2 and so does llvm but if this were the problem others would have it. Rust 1.7.{1,2} both seem to compile fine.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Sat Feb 03, 2024 9:16 am    Post subject: Reply with quote

Neither Rust nor LLVM should need Python 2.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Sat Feb 03, 2024 11:12 am    Post subject: Reply with quote

sam_ wrote:
Neither Rust nor LLVM should need Python 2.

I read something on the internet that it does but that might be outdated.
But what is this PYTHON_COMPAT error then? Rust doesn't even seem to have any python USE flags. I can't find anything about this error on the internet.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54270
Location: 56N 3W

PostPosted: Sat Feb 03, 2024 11:38 am    Post subject: Reply with quote

mi_unixbird,

Python is required to build rust.

In the ebulid PYTHON_COMPAT lists python versions that have been tested. Any one of them is OK.
Python 2 is available in the tree but not listed in PYTHON_COMPAT
Code:
$ eix -I python
[I] dev-lang/python
     Available versions: 
     (2.7)  2.7.18_p16-r1^t
     (3.8)  3.8.18^t
     (3.9)  3.9.18^t
     (3.10) 3.10.13^t{tbz2}
     (3.11) 3.11.7^t{tbz2}
     (3.12) 3.12.1^t{tbz2} 3.12.1_p1^t{tbz2}


I have slots 3.11 and 3.12 installed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Sat Feb 03, 2024 12:01 pm    Post subject: Reply with quote

NeddySeagoon wrote:
mi_unixbird,

Python is required to build rust.

In the ebulid PYTHON_COMPAT lists python versions that have been tested. Any one of them is OK.
Python 2 is available in the tree but not listed in PYTHON_COMPAT
Code:
$ eix -I python
[I] dev-lang/python
     Available versions: 
     (2.7)  2.7.18_p16-r1^t
     (3.8)  3.8.18^t
     (3.9)  3.9.18^t
     (3.10) 3.10.13^t{tbz2}
     (3.11) 3.11.7^t{tbz2}
     (3.12) 3.12.1^t{tbz2} 3.12.1_p1^t{tbz2}


I have slots 3.11 and 3.12 installed.


I have installed:
Code:
dev-lang/python-3.12.1_p1
dev-lang/python-3.11.7
dev-lang/python-3.10.13
dev-lang/python-2.7.18_p16-r1

So I really wonder what causes this error. I assume there's something wrong with my build-system somehow but I wonder what. Is there maybe some kind of environt variable that could be set wrong that leads to this?
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sun Feb 04, 2024 9:19 am    Post subject: Reply with quote

I would like to add another data point to your problem.
  • I have the following versions of Python installed:
    Code:

    2.7.18_p16-r1
    3.11.7
    3.12.1_p1


  • I have not specified PYTHON_SINGLE_TARGET or PYTHON_TARGETS in my /etc/portage/make.conf
  • My profile is
    Code:
    default/linux/amd64/17.1/desktop/plasma (stable)

  • I have rust-1.74.1 built and installed successfully

I am not sure why Python 2.7 is still installed - there don't seem to be any dependencies on my system which require it, so I may look to remove it in the future (I am currently away from home and connected to my desktop via ssh - I would rather not start playing with python versions without being sat in front of the machine!). However, relevant to your problem - it is installed, and doesn't seem to cause any problems. It seems there may be an issue with the python setup in your system. What is the current default python interpreter?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54270
Location: 56N 3W

PostPosted: Sun Feb 04, 2024 11:39 am    Post subject: Reply with quote

mi_unixbird,

To build on what paulj said, please post your
Code:
emerge --info

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Mon Feb 05, 2024 11:45 am    Post subject: Reply with quote

paulj wrote:
I would like to add another data point to your problem.
  • I have the following versions of Python installed:
    Code:

    2.7.18_p16-r1
    3.11.7
    3.12.1_p1


  • I have not specified PYTHON_SINGLE_TARGET or PYTHON_TARGETS in my /etc/portage/make.conf
  • My profile is
    Code:
    default/linux/amd64/17.1/desktop/plasma (stable)

  • I have rust-1.74.1 built and installed successfully

I am not sure why Python 2.7 is still installed - there don't seem to be any dependencies on my system which require it, so I may look to remove it in the future (I am currently away from home and connected to my desktop via ssh - I would rather not start playing with python versions without being sat in front of the machine!). However, relevant to your problem - it is installed, and doesn't seem to cause any problems. It seems there may be an issue with the python setup in your system. What is the current default python interpreter?


I have some cases of PYTHON_TARGET because some packages won't install without selecting one manually:

Code:
 —— — grep -r PYTHON_TARGET /etc/portage/make.conf
 —— 1 grep -r python_single_target_ /etc/portage/package.use/
/etc/portage/package.use/streamlink.autoconf:# required by net-misc/streamlink-6.5.0::gentoo[python_single_target_python3_11]
/etc/portage/package.use/eselect-repository.autoconf:# required by app-eselect/eselect-repository-14::gentoo[python_single_target_python3_11]
/etc/portage/package.use/eselect-repository.autoconf:# required by app-eselect/eselect-repository-14::gentoo[python_single_target_python3_11]
/etc/portage/package.use/eselect-repository.autoconf:# required by app-eselect/eselect-repository-14::gentoo[python_single_target_python3_11]
 —— — grep -r python_targets_ /etc/portage/package.use/
/etc/portage/package.use/rb_libtorrent.fix:net-libs/libtorrent-rasterbar -python_targets_python3_4 -ssl -libressl
/etc/portage/package.use/youtube-dl.autoconf:>=dev-python/pycryptodome-3.19.1-r2 python_targets_python3_10
/etc/portage/package.use/streamlink.autoconf:>=dev-python/gpep517-15 python_targets_python3_10
/etc/portage/package.use/eselect-repository.autoconf:>=dev-python/installer-0.7.0 python_targets_python3_10
/etc/portage/package.use/eselect-repository.autoconf:>=dev-python/more-itertools-10.2.0 python_targets_python3_10
/etc/portage/package.use/eselect-repository.autoconf:>=dev-python/flit-core-3.9.0 python_targets_python3_10
/etc/portage/package.use/pip.autoconf:>=dev-python/platformdirs-4.2.0 python_targets_python3_10


As well as:

Code:
 —— — eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12 (fallback)
  [3]   python3.10 (fallback)


I'll delete all the python USE flags for now and see what it does then.

Edit: Well, I deleted all those and did a world update with --with-bdeps=y and nothing changed, the same error persists.

NeddySeagoon wrote:
mi_unixbird,

To build on what paulj said, please post your
Code:
emerge --info


It looks like this:

Code:
Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.38-r10, 6.3.9-zen1 x86_64)
=================================================================
System uname: Linux-6.3.9-zen1-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-1155G7_@_2.50GHz-with-glibc2.38
KiB Mem:    24450676 total,   3806392 free
KiB Swap:    8388604 total,   8386276 free
Timestamp of repository gentoo: Sun, 04 Feb 2024 12:18:31 +0000
Head commit of repository gentoo: 28162b98af45b00cef440c8d2565383478e2da4c

sh dash 0.5.12
ld GNU ld (Gentoo 2.41 p5) 2.41.0
distcc 3.4 x86_64-pc-linux-gnu [enabled]
ccache version 4.9 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.2::gentoo
dev-build/libtool:         2.4.7-r2::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.1-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           2.7.18_p16-r1::gentoo, 3.10.13::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.72.0-r1::gentoo
dev-util/ccache:           4.9::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240113-r1::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.7::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r10::gentoo
Repositories:

gentoo
    location: /var/lib/portage/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 1000
    volatile: True

local-user
    location: /home/user/.local/share/portage/repos/local
    masters: gentoo
    priority: 3000
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE public-domain"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=tigerlake -mabm -O2 -fstack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/dbus-1 /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=tigerlake -mabm -O2 -fstack-protector"
DISTDIR="/var/tmp/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=y --quiet=y --quiet-fail=y --load-average=30 --jobs=11 --ask --keep-going --alert --usepkg"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc noinfo parallel-fetch parallel-install pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="  /etc/gentoo-release     /etc/os-release         /etc/lsb-release        /usr/lib/os-release     /usr/share/zsh/site-functions/_cargo       "
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="en"
MAKEOPTS="-j8"
PKGDIR="/var/lib/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp/build"
RUSTFLAGS="-C opt_level=3"
SHELL="/bin/bash"
USE="X alsa amd64 apng apulse bidi bzip2 cairo cli corefonts dri dri3 dts encode exif ext4 fat ffmpeg firmware flac gdbm gif glamor iconv icu infinality ipv6 jpeg lcms libglvnd libkms libnotify libtirpc lm_sensors logrotate mad mmx mp3 mpeg multilib offensive ogg opengl openmp openssl osmesa pango pcre pdf png ppapi qt3support readline sdl seccomp skypeapi spell split-usr sse sse2 ssl svg system-ffmpeg system-llvm tcmalloc test-rust tiff truetype udev unicode vaapi vorbis x264 xa xcb xdg xkb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authz_dbd *" CALLIGRA_FEATURES="krita" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="synaptics evdev" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="BPF NVPTX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Mon Feb 05, 2024 1:10 pm    Post subject: Reply with quote

I don't see anything in your setup which shouts out "PROBLEM" to me. However, it may be that someone with better knowledge might identify something.

Thinking back to your original problem with the _python_wrapper_setup error: this is a function found in the python-utils-r1.eclass, and although I have no understanding of how python is configured "under the hood", it is suspicious to me that this function is giving a error. I think the python environment is not consistent on your system. I am not absolutely sure, but I think I have seen errors like that in the past when updating python from one version to the next.

Perhaps consider re-emerging the different python versions again. Also, do you have anything depending on Python2 currently installed? If it were my system, I would consider removing python2 completely, then doing a depclean (in fact, I would do both of these steps first). I would then try again with emerging rust.
For comparison, this is the directory listing for the different python commands on my system:
Code:
# ls /usr/bin/python* -la
lrwxrwxrwx 1 root root    13 Oct 19 21:46 /usr/bin/python -> python-exec2c
lrwxrwxrwx 1 root root     9 Jun 24  2023 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 14280 Jun 24  2023 /usr/bin/python2.7
-rwxr-xr-x 1 root root  1463 Jun 24  2023 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root    16 Jun 24  2023 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root    13 Oct 19 21:46 /usr/bin/python3 -> python-exec2c
-rwxr-xr-x 1 root root 14280 Jan 13 09:18 /usr/bin/python3.11
-rwxr-xr-x 1 root root  2971 Jan 13 09:18 /usr/bin/python3.11-config
-rwxr-xr-x 1 root root 14280 Jan 17 11:12 /usr/bin/python3.12
-rwxr-xr-x 1 root root  2992 Jan 17 11:12 /usr/bin/python3.12-config
lrwxrwxrwx 1 root root    31 Oct 19 21:46 /usr/bin/python3-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root    31 Oct 19 21:46 /usr/bin/python-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x 1 root root 18720 Oct 19 21:46 /usr/bin/python-exec2c
lrwxrwxrwx 1 root root    50 Jun 24  2023 /usr/bin/pythontex -> ../share/texmf-dist/scripts/pythontex/pythontex.py
I don't think there is anything relevant here, but maybe?
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Mon Feb 05, 2024 8:38 pm    Post subject: Reply with quote

paulj wrote:
I don't see anything in your setup which shouts out "PROBLEM" to me. However, it may be that someone with better knowledge might identify something.

Thinking back to your original problem with the _python_wrapper_setup error: this is a function found in the python-utils-r1.eclass, and although I have no understanding of how python is configured "under the hood", it is suspicious to me that this function is giving a error. I think the python environment is not consistent on your system. I am not absolutely sure, but I think I have seen errors like that in the past when updating python from one version to the next.

Perhaps consider re-emerging the different python versions again. Also, do you have anything depending on Python2 currently installed? If it were my system, I would consider removing python2 completely, then doing a depclean (in fact, I would do both of these steps first). I would then try again with emerging rust.
For comparison, this is the directory listing for the different python commands on my system:
Code:
# ls /usr/bin/python* -la
lrwxrwxrwx 1 root root    13 Oct 19 21:46 /usr/bin/python -> python-exec2c
lrwxrwxrwx 1 root root     9 Jun 24  2023 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 14280 Jun 24  2023 /usr/bin/python2.7
-rwxr-xr-x 1 root root  1463 Jun 24  2023 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root    16 Jun 24  2023 /usr/bin/python2-config -> python2.7-config
lrwxrwxrwx 1 root root    13 Oct 19 21:46 /usr/bin/python3 -> python-exec2c
-rwxr-xr-x 1 root root 14280 Jan 13 09:18 /usr/bin/python3.11
-rwxr-xr-x 1 root root  2971 Jan 13 09:18 /usr/bin/python3.11-config
-rwxr-xr-x 1 root root 14280 Jan 17 11:12 /usr/bin/python3.12
-rwxr-xr-x 1 root root  2992 Jan 17 11:12 /usr/bin/python3.12-config
lrwxrwxrwx 1 root root    31 Oct 19 21:46 /usr/bin/python3-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root    31 Oct 19 21:46 /usr/bin/python-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x 1 root root 18720 Oct 19 21:46 /usr/bin/python-exec2c
lrwxrwxrwx 1 root root    50 Jun 24  2023 /usr/bin/pythontex -> ../share/texmf-dist/scripts/pythontex/pythontex.py
I don't think there is anything relevant here, but maybe?


I have at this point re-emerged all versions of python and managed to remove python2 completely and did a depclean after, and yet I continue to have the same error.

Can you think of anything more that should be re-emerged because some errors might exist?

Also, for completeness:

Code:
 —— — ls -la /usr/bin/python*
lrwxrwxrwx 1 root root    13 May 24  2023 /usr/bin/python -> python-exec2c
lrwxrwxrwx 1 root root    13 May 24  2023 /usr/bin/python3 -> python-exec2c
-rwxr-xr-x 1 root root 14280 Feb  5 19:56 /usr/bin/python3.10
-rwxr-xr-x 1 root root  2998 Feb  5 19:56 /usr/bin/python3.10-config
-rwxr-xr-x 1 root root 14280 Feb  5 19:54 /usr/bin/python3.11
-rwxr-xr-x 1 root root  2971 Feb  5 19:54 /usr/bin/python3.11-config
-rwxr-xr-x 1 root root 14280 Feb  5 19:56 /usr/bin/python3.12
-rwxr-xr-x 1 root root  2992 Feb  5 19:56 /usr/bin/python3.12-config
lrwxrwxrwx 1 root root    31 May 24  2023 /usr/bin/python3-config -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root    31 May 24  2023 /usr/bin/python-config -> ../lib/python-exec/python-exec2
-rwxr-xr-x 1 root root 18720 May 24  2023 /usr/bin/python-exec2c

_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Mon Feb 05, 2024 8:44 pm    Post subject: Reply with quote

How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Mon Feb 05, 2024 10:42 pm    Post subject: Reply with quote

paulj wrote:
How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Alas, it didn't work either together with some other things I tried such as resyncing the repo from scratch. The only thing I can still ask for is to see what USE flags you use for rust and try those.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Tue Feb 06, 2024 1:40 am    Post subject: Reply with quote

mi_unixbird wrote:
paulj wrote:
How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Alas, it didn't work either together with some other things I tried such as resyncing the repo from scratch. The only thing I can still ask for is to see what USE flags you use for rust and try those.

On a quick read of the above, I don't see where you have set your active interpreter? What comes up if you just invoke python
Code:
ian@gw-01 ~ $ python
Python 3.11.7 (main, Jan  1 2024, 10:48:14) [GCC 13.2.1 20230826] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

If that isn't what you expect - What is the python directive in /etc/python-exec/python-exec.conf?
Code:
grep python /etc/python-exec/python-exec.conf
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Tue Feb 06, 2024 3:23 am    Post subject: Reply with quote

I can try look with the full build.log compressed somewhere. Maybe file a bug and we can try it there.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Tue Feb 06, 2024 5:02 am    Post subject: Reply with quote

mi_unixbird wrote:
paulj wrote:
How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Alas, it didn't work either together with some other things I tried such as resyncing the repo from scratch. The only thing I can still ask for is to see what USE flags you use for rust and try those.

For rust, I have the following use flags set:
Code:
dev-lang/rust rust-src clippy doc rustfmt

One thing I can suggest. I actually installed rustup in order to setup the environment for rust programming at a user level. If you want rust for your own development, this could be a work around while trying to get this issue sorted.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Tue Feb 06, 2024 10:56 am    Post subject: Reply with quote

ian.au wrote:
mi_unixbird wrote:
paulj wrote:
How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Alas, it didn't work either together with some other things I tried such as resyncing the repo from scratch. The only thing I can still ask for is to see what USE flags you use for rust and try those.

On a quick read of the above, I don't see where you have set your active interpreter? What comes up if you just invoke python
Code:
ian@gw-01 ~ $ python
Python 3.11.7 (main, Jan  1 2024, 10:48:14) [GCC 13.2.1 20230826] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

If that isn't what you expect - What is the python directive in /etc/python-exec/python-exec.conf?
Code:
grep python /etc/python-exec/python-exec.conf


For this:

Code:
 —— — python
Python 3.11.7 (main, Feb  5 2024, 19:53:55) [GCC 13.2.1 20240113] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
 —— — grep python /etc/python-exec/python-exec.conf
#/etc/python-exec/python-exec.conf
# python-exec global preference configuration
# This file specifies global Python preference for python-exec. It
# scripts or generic Python wrappers (such as /usr/bin/python) are
# in /etc/python-exec/<script-name>.conf. If this override exists,
# in EPYTHON-format (e.g. python3.5), in order of preference. The most
# If none of the listed implementations are supported, python-exec will
# Note: this file can be modified by calls to 'eselect python'.
python3.11

All seems to look fine?

sam_ wrote:
I can try look with the full build.log compressed somewhere. Maybe file a bug and we can try it there.


https://file.io/N9gfkGPpfKhF or

https://drive.google.com/file/d/1ezJANoHYULU2KSItJ_1MWujlbd1HEiwb/view

I think it's very strange that Google drive seems to be aware of the original filename when all I did was “gzip -c PATH/TO/ORIGINAL > log.gz”. Does gzip somehow store the original filename somewhere when compressing? That seems like a privacy concern to me.

There's a download button at the top right by the way. The interface is somewhat counter-intuitive.

I should probably look into how to file a bug report yes, though I have the feeling this isn't so much a bug but something odd going on with my system. I should add that I have two machines and both displlay the same bug, but obviously I share connfiguration between them

paulj wrote:
mi_unixbird wrote:
paulj wrote:
How about trying to re-emerge dev-lang/python-exec?

Other than that, I am out of ideas... Sorry!
Alas, it didn't work either together with some other things I tried such as resyncing the repo from scratch. The only thing I can still ask for is to see what USE flags you use for rust and try those.

For rust, I have the following use flags set:
Code:
dev-lang/rust rust-src clippy doc rustfmt

One thing I can suggest. I actually installed rustup in order to setup the environment for rust programming at a user level. If you want rust for your own development, this could be a work around while trying to get this issue sorted.


I don't use the system rust for my own rust coding, but the issue is that Chromium depends on a newer version and I'd obviously rather not keep a browser unupdated for too long
_________________
execctl --path exec filectl --current-directory list


Last edited by mi_unixbird on Tue Feb 06, 2024 3:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21650

PostPosted: Tue Feb 06, 2024 3:41 pm    Post subject: Reply with quote

mi_unixbird wrote:
https://drive.google.com/file/d/1ezJANoHYULU2KSItJ_1MWujlbd1HEiwb/view
I cannot speak to whether sam_ will accept this, but in general I discourage use of Google Drive for sharing files here. Among other problems, Google Drive is completely broken without JavaScript.
mi_unixbird wrote:
I think it's very strange that Google drive seems to be aware of the original filename when all I did was “gzip -c PATH/TO/ORIGINAL > log.gz”. Does gzip somehow store the original filename somewhere when compressing? That seems like a privacy concern to me.
Yes, gzip saves that. file can show it, too, if you want to see what is in it before sharing.
mi_unixbird wrote:
There's a download button at the top right by the way. The interface is somewhat counter-intuitive.
Is there a direct download link, such that wget $URL would get the file?
mi_unixbird wrote:
I don't use the system rust for my own rust coding, but the issue is that Chromium depends on a newer version and I'd obviously rather not keep a browser unupdated for too long
Can you install dev-lang/rust-bin to satisfy Chromium? That downloads upstream's blob and copies it to your filesystem, without building, so it is both easier to install and has fewer dependencies. You won't be able to apply local patches to it, but if your only use is building Chromium, I doubt you have any patches you want to apply to rust.
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Tue Feb 06, 2024 4:09 pm    Post subject: Reply with quote

Hu wrote:
mi_unixbird wrote:
https://drive.google.com/file/d/1ezJANoHYULU2KSItJ_1MWujlbd1HEiwb/view
I cannot speak to whether sam_ will accept this, but in general I discourage use of Google Drive for sharing files here. Among other problems, Google Drive is completely broken without JavaScript.
That's obviously an issue that I didn't consider. I searched for free file hosts but the issue is that almost all of them delete the file after a couple of days and I had the biggest confidence that Google Drive would keep it for a long time but I edited my post with https://file.io/N9gfkGPpfKhF

Quote:
Can you install [color=bldev-lang/rust-bin[/color] to satisfy Chromium? That downloads upstream's blob and copies it to your filesystem, without building, so it is both easier to install and has fewer dependencies. You won't be able to apply local patches to it, but if your only use is building Chromium, I doubt you have any patches you want to apply to rust.
I didn't even consider it and went digging into the Chromium ebuild:

Code:
   system-toolchain? (
      libcxx? ( >=sys-devel/clang-${LLVM_MIN_SLOT} )
      lto? ( $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT}) )
      pgo? (
         >=dev-python/selenium-3.141.0
         >=dev-util/web_page_replay_go-20220314
         $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT})
      )
      >=dev-lang/rust-${RUST_MIN_VER}[profiler]
   )


By the looks of it, system-toolchain is a new chromium flag that my current version does not have that requires that rust be installed. Perhaps the ebuild can be modified to accept virtual/rust as all the other packages that use rust here do, but simply disabling it will work for now to update chromium I assume.

The problem hints at something wrong with my python configuration though so it's better to solve it all the same.
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
mi_unixbird
Tux's lil' helper
Tux's lil' helper


Joined: 24 Jul 2015
Posts: 118

PostPosted: Sun Feb 11, 2024 12:27 am    Post subject: Reply with quote

So, as rust-1.75 rolled out and it still didn't work I decided to inspect the logs one more time, and actually it had nothing to do with Python, in fact, that python message shows up in it whether it compiles or not. The real culprit is:

Quote:
command did not execute successfully: "strip" "--strip-debug" "/var/tmp/build/portage/dev-lang/rust-1.74.1/work/rustc-1.74.1-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-

Which is all of two lines later and simply compiling it with the “debug” flag on solves the issue. However I still feel that something must be wrong for this to happen but for now this amounts to a fix and I can live with debug symbols in my compiler that I only use for system ends.

Does anyone have any idea what can cause strip to fail like that?
_________________
execctl --path exec filectl --current-directory list
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Sun Feb 11, 2024 7:03 am    Post subject: Reply with quote

Good to hear you have it working, but I am not sure why the strip command is failing. In case it can give you a pointer, /usr/bin/strip comes from binutils, and on my system, I have the stable version 2.41-r3 installed:
Code:
[I] sys-devel/binutils
     Available versions:
     (2.32) [M]~2.32-r2^t
     (2.33) [M]2.33.1-r1^t
     (2.34) [M]2.34-r2^t{tbz2}
     (2.35) [M]2.35.2^t{tbz2}
     (2.36) [M]2.36.1-r2^t{tbz2}
     (2.37) [M]2.37_p1-r2^t{tbz2}
     (2.38) [M]2.38-r2^t{tbz2}
     (2.39) [M]2.39-r5^t{tbz2}
     (2.40) 2.40-r5^t{tbz2} 2.40-r9^t{tbz2}
     (2.41) 2.41-r2^t{tbz2} 2.41-r3^t{tbz2} ~2.41-r4^t ~2.41-r5^t
     (9999) **9999*l^t
       {cet debuginfod default-gold doc (+)gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd}
     Installed versions:  2.41-r3(2.41)^t{tbz2}(08:18:16 13/01/24)(nls plugins -cet -debuginfod -doc -gold -gprofng -hardened -multitarget -pgo -static-libs -test -vanilla -zstd)
     Homepage:            https://sourceware.org/binutils/
     Description:         Tools necessary to build programs

I haven't updated my system since the middle of January, as I am accessing it remotely and don't want anything to break! I get home at the end of the week, and will update it, and will report back any issues with rust-1.75.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Sun Feb 11, 2024 9:39 am    Post subject: Reply with quote

I can't access that last log link now.
Back to top
View user's profile Send private message
paulj
Guru
Guru


Joined: 30 Sep 2004
Posts: 513
Location: Wales, UK

PostPosted: Mon Apr 01, 2024 4:06 pm    Post subject: Reply with quote

Just a (delayed - apologies) follow up. Rust 1.75 did install without issues here. mi_unixbird - did you get a resolution to this problem?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum