Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684790 - media-libs/mesa with dev-util/scons-3.0.4 - scons: Reading SConscript files ... TypeError: a bytes-like object is required, not 'str': File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/scons/gallium.py", line 219: env['gcc_compat'] = chec
Summary: media-libs/mesa with dev-util/scons-3.0.4 - scons: Reading SConscript files ....
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 05:13 UTC by Volker Wegert
Modified: 2019-04-30 16:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Wegert 2019-04-30 05:13:50 UTC
In order to use X2go, I have to build the mesa libgl-xlib manually using the following steps:

export mesa_version="$(equery -q list media-libs/mesa -F '$version')"
ebuild "/usr/portage/media-libs/mesa/mesa-${mesa_version}.ebuild" prepare
cd "/var/tmp/portage/media-libs/mesa-${mesa_version}/work/mesa-${mesa_version}"
scons libgl-xlib
(...)

Upgrading from dev-util/scons-2.1.5 to scons-3.0.4 breaks that process. I now get the following error messages:
scons: Reading SConscript files ...
TypeError: a bytes-like object is required, not 'str':
  File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/SConstruct", line 47:
    ENV = os.environ,
  File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 982:
    apply_tools(self, tools, toolpath)
  File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 107:
    env.Tool(tool)
  File "/usr/lib64/python3.6/site-packages/SCons/Environment.py", line 1789:
    tool(self)
  File "/usr/lib64/python3.6/site-packages/SCons/Tool/__init__.py", line 296:
    self.generate(env, *args, **kw)
  File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/scons/gallium.py", line 219:
    env['gcc_compat'] = check_cc(env, 'GCC', 'defined(__GNUC__)')
  File "/var/tmp/portage/media-libs/mesa-18.3.6/work/mesa-18.3.6/scons/gallium.py", line 135:
    source.write('#if !(%s)\n#error\n#endif\n' % expr)
  File "/usr/lib64/python3.6/tempfile.py", line 483:
    return func(*args, **kwargs)
Checking for GCC ... 

Masking >=dev-util/scons-3.0.0 and thus reverting to scons-2.1.5 "solves" that issue - though that's certainly not a permanent fix.

# emerge --info
Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.2.0, glibc-2.28-r6, 4.19.27-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.19.27-gentoo-r1-x86_64-AMD_Phenom-tm-_II_X4_955_Processor-with-gentoo-2.6
KiB Mem:     7914452 total,   3107392 free
KiB Swap:   16777212 total,  16683260 free
Timestamp of repository gentoo: Mon, 29 Apr 2019 20:30:01 +0000
Head commit of repository gentoo: 8ed3dd9f47c494a98c96e0a6bf0692efdc145c92
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

gcpan_zathras
    location: /usr/local/portage
    masters: gentoo
    priority: 0

djsmiley2k
    location: /var/lib/layman/djsmiley2k
    masters: gentoo
    priority: 50

godin
    location: /var/lib/layman/godin
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/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="/var/tmp"
USE="X a52 acl amd64 apache2 avahi avi bash-completion berkdb bzip2 cli crypt cups cxx dbus divx4linux dri dv dvdread elogind fame fortran gdbm iconv ipv6 libtirpc mjpeg mpeg multilib ncurses nls nptl nptlonly ogg openmp pam pcre pulseaudio quicktime readline samba seccomp slp ssl tcpd unicode vhosts xattr xulrunner xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core uthn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_connect proxy_http rewrite setenvif so socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="de en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2019-04-30 07:50:04 UTC
Just in case no one read this from comment #0: "In order to use X2go, I have to build the mesa libgl-xlib _____manually_____ using the following steps" [emphasis added].
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-04-30 07:50:48 UTC
Apparently mesa+scons doesn't support Python3.  Run it via python2 /usr/bin/scons ...
Comment 3 Lars Wendler (Polynomial-C) gentoo-dev 2019-04-30 07:58:07 UTC
Volker, I can imagine this bug might not have taken the path you hoped it will take, but IMHO this issue should be brought to the attention of mesa upstream as it's quite likely an issue with their scons file simply being too old for scons-3 + python3. There's only little we can do as downstream reagrding such issues.
Comment 4 Volker Wegert 2019-04-30 11:39:24 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #3)
> Volker, I can imagine this bug might not have taken the path you hoped it
> will take, but IMHO this issue should be brought to the attention of mesa
> upstream as it's quite likely an issue with their scons file simply being
> too old for scons-3 + python3. There's only little we can do as downstream
> reagrding such issues.

Thank you, Lars, this explanation has been extremely helpful to an infrequent bug-reporter like me. Your fellow devs can learn a lot about how to communicate these kinds of processes and decisions from you.
Comment 5 Volker Wegert 2019-04-30 16:17:28 UTC
upstream bug https://bugs.freedesktop.org/show_bug.cgi?id=110565 for reference