Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 701878 - dev-python/pycparser-2.19-r1 - src_compile(): python3_7: ModuleNotFoundError: No module named 'lextab'
Summary: dev-python/pycparser-2.19-r1 - src_compile(): python3_7: ModuleNotFoundError:...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2019-12-03 12:05 UTC by N. Andrew Walsh
Modified: 2022-06-12 05:25 UTC (History)
6 users (show)

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


Attachments
build.log (build.log.xz,1.17 KB, application/x-xz)
2019-12-03 12:05 UTC, N. Andrew Walsh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description N. Andrew Walsh 2019-12-03 12:05:29 UTC
emerge pycparser fails with the following error:

---------------------
copying pycparser/ply/__init__.py -> /var/tmp/portage/dev-python/pycparser-2.19-r1/work/pycparser-2.19-python3_7/lib/pycparser/ply
copying pycparser/_c_ast.cfg -> /var/tmp/portage/dev-python/pycparser-2.19-r1/work/pycparser-2.19-python3_7/lib/pycparser
warning: build_py: byte-compiling is disabled, skipping.

Traceback (most recent call last):
  File "_build_tables.py", line 31, in <module>
    import lextab
ModuleNotFoundError: No module named 'lextab'
----------------------

build.log attached

Reproducible: Always




 # emerge --info
Portage 2.3.80 (python 3.6.9-final-0, default/linux/amd64/17.0, gcc-9.2.0, glibc-2.30-r3, 5.4.1-gentoo x86_64)
=================================================================
System uname: Linux-5.4.1-gentoo-x86_64-AMD_FX-tm-9590_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32790560 total,  17309276 free
KiB Swap:     976556 total,    976556 free
Timestamp of repository gentoo: Mon, 02 Dec 2019 09:50:02 +0000
Head commit of repository gentoo: dc2ddf0786eaeab7effb3cee121d022641f2c9a5

sh bash 5.0_p11
ld GNU ld (Gentoo 2.33.1 p1) 2.33.1
ccache version 3.7.6 [disabled]
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17-r100::stefantalpalaru, 3.5.9::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo, 3.8.0::gentoo
dev-util/ccache:          3.7.6::gentoo
dev-util/cmake:           3.16.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15.1-r1::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.33.1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.3-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

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

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

atom
    location: /var/portage/repos/atom
    masters: gentoo
    priority: 50

bobwya
    location: /var/portage/repos/bobwya
    masters: gentoo
    priority: 50

brave-overlay
    location: /var/portage/repos/brave-overlay
    masters: gentoo
    priority: 50

cynede
    location: /var/portage/repos/cynede
    masters: gentoo
    priority: 50

farmboy0
    location: /var/portage/repos/farmboy0
    masters: gentoo
    priority: 50

hossie
    location: /var/portage/repos/hossie
    masters: gentoo
    priority: 50

pentoo
    location: /var/portage/repos/pentoo
    masters: gentoo
    priority: 50

qt
    location: /var/portage/repos/qt
    masters: gentoo
    priority: 50

stefantalpalaru
    location: /var/portage/repos/stefantalpalaru
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=bdver2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=bdver2 -O2 -pipe"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
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 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 strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirror.dkm.cz/pub/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ ftp://gentoo.mirror.web4u.cz/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://gentoo.mneisen.org/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://mirror.netcologne.de/gentoo/ ftp://ftp6.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp6.uni-muenster.de/pub/linux/distributions/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.ipv6.uni-muenster.de/pub/linux/distributions/gentoo ftp://gentoo.inf.elte.hu/ http://gentoo.inf.elte.hu/ http://ftp.heanet.ie/pub/gentoo/ ftp://ftp.df.lth.se/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US en_US.utf8 de de_DE de_DE.utf8"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
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 Xaw3d a52 aac acl acpi aim alsa amd64 apm audiofile bash-completion berkdb bzip2 cairo cddb cdinstall cdparanoia cdr cli cracklib crypt css curl curlwrappers cxx dbus directfb dri dvd dvdr encode fbcon ffmpeg fftw firefox flac fortran ftp gdbm geoip gif gimp glut graphite gstreamer gtk hddtemp iconv icq ieee1394 imagemagick imap imlib ipv6 jack java javascript joystick jpeg lame latex ldap libsamplerate libtirpc libwww lm_sensors mad matroska minimal mmx motif mp3 mpeg mplayer multilib ncurses nls nptl nsplugin offensive ogg openal opengl openmp openssl oscar pam pcre pdf perl png policykit posix python qt5 quicktime raw readline real rss scanner seccomp semantic-desktop sndfile sockets speex spell split-usr ssl suid svg symlink syslog tcl tcpd tetex theora threads tidy tiff tk translucency truetype udev unicode usb vaapi vdpau videos vorbis win32codecs wmf wxwindows x264 xattr xcomposite xetex xine xml xpm xscreensaver xulrunner xv xvid xvmc zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel usb-audio" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" 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" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis 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="en-US de" 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="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_8 python2_7" RUBY_TARGETS="ruby26 ruby25" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 N. Andrew Walsh 2019-12-03 12:05:49 UTC
Created attachment 598318 [details]
build.log
Comment 2 Quinn Jones 2020-05-07 15:30:11 UTC
Seconding this bug, just ran into it after an 'emerge --sync' and 'emerge -uDNav world' today.
Comment 3 Quinn Jones 2020-05-07 15:51:28 UTC
Interesting note:

On a whim I restarted emerge ("emerge -av --resume").  Resuming sets a different build order: pycparser now 2nd item in set, rebuild of dev-python/traceback2-1.4.0 comes first.  traceback2 succeeds, pycparser fails again.

Resume again, pycparser comes first.  I expect it to fail -- but it succeeds.

traceback2 doesn't include a 'lextab' component, and no other python changes were made in between, so not sure why this worked.



So, to summarize:

--- Event 1 ---

'emerge -uDNav world' fails on upgrade of dev-python/pycparser-2.20 (from dev-python/pycparser-2.19-r1), with:

warning: build_py: byte-compiling is disabled, skipping.

Traceback (most recent call last):
  File "_build_tables.py", line 35, in <module>
    import lextab
ModuleNotFoundError: No module named 'lextab'

--- Event 2 ---

'emerge --resume' starts with rebuild of dev-python/traceback2-1.4.0, followed by upgrade to dev-python/pycparser-2.20. traceback2 succeeds, but pycparser still fails:

warning: build_py: byte-compiling is disabled, skipping.

Traceback (most recent call last):
  File "_build_tables.py", line 35, in <module>
    import lextab
ModuleNotFoundError: No module named 'lextab'

--- Event 3 ---

'emerge --resume' starts with upgrade to dev-python/pycparser-2.20, and succeeds.
Comment 4 N. Andrew Walsh 2020-05-11 11:45:51 UTC
Same error today with pycparser-2.20, by the way. Any progress on this?
Comment 5 Quinn Jones 2020-05-12 01:25:03 UTC
Like OP, same error today, different machine than my previous report.

This particular machine didn't have traceback2 installed, which saved my emerge --update last week.  'emerge --resume'ing wasn't getting me anywhere.

So on a whim I installed dev-python/traceback2. It pulled in dev-python/pbr-4.2.0-r1, dev-python/linecache2-1.0.0, and dev-python/traceback2-1.4.0.

Voila! dev-python/pycparser-2.20 now emerges.
Comment 6 N. Andrew Walsh 2020-05-12 08:11:14 UTC
When I ran 'emerge --resume --skipfirst' pycparser completed without error, so apparently something does have to be emerge first for it to be able to find lextab. 

'equery b /usr/lib64/python3.7/site-packages/pycparser/lextab.py' doesn't return anything, nor for the same file under …/python3.8/…, so I'm not sure what installed it. But neither of those files was there yesterday, so I'd guess that pycparser depends on whatever that package is being installed with the same python versions used to build pycparser.
Comment 7 Gary E. Miller 2020-09-26 23:20:58 UTC
Same error on dev-python/pycparser-2.20-r1 today.
Comment 8 Gary E. Miller 2020-09-26 23:23:19 UTC
emerging this a second time and it emerged fine...
Comment 9 Mikhail Krivtsov 2020-09-27 11:30:27 UTC
ERROR: dev-python/pycparser-2.20-r1::gentoo failed (compile phase)
ModuleNotFoundError: No module named 'lextab'

It is obvious that the problem is in 'pycparser' itself:
# equery belongs /usr/lib/python3.7/site-packages/pycparser/lextab.py
 * Searching for /usr/lib/python3.7/site-packages/pycparser/lextab.py ...
dev-python/pycparser-2.20 (/usr/lib/python3.7/site-packages/pycparser/lextab.py)

I had seen similar issue in different project. It was caused by incomplete dependencies specification. Build system tried to use item which was not built yet. As workaround we disabled parallel build in that project.

Build for 'dev-python/pycparser-2.20-r1' launched with 'emerge --jobs 1' finished successfully.
Comment 10 dE 2021-08-02 11:18:36 UTC
emerged this the 2nd time and it build.
Comment 11 Fabian Groffen gentoo-dev 2021-11-21 09:19:18 UTC
concurrency issue, somehow dependency isn't expressed

same here for pycparser-2.20-python3_9
Comment 12 Fabian Groffen gentoo-dev 2021-11-21 12:23:48 UTC
not sure if setup.py uses make, in any case, buildlog is here:
https://bootstrap.prefix.bitzolder.nl/results/x86_64-apple-darwin17/20211120/portage/dev-python/pycparser-2.20-r1/temp/build.log
Comment 13 Fabian Groffen gentoo-dev 2022-01-07 09:33:52 UTC
FWIW: seems fixed in 2.21
Comment 14 Thomas Sachau gentoo-dev 2022-01-12 20:32:04 UTC
(In reply to Fabian Groffen from comment #13)
> FWIW: seems fixed in 2.21

still happens with 2.21
Comment 15 Don Bishop 2022-05-06 15:30:07 UTC
pycparser-2.21 is still failing for missing module. 

'emerge --jobs=1 pucparser' works.
Comment 16 Gary E. Miller 2022-05-24 03:16:26 UTC
> pycparser-2.21 is still failing for missing module. 

Also failing pycparser-2.21-r1

> 'emerge --jobs=1 pucparser' works.

Works for me too.  Thanks!
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-12 05:25:34 UTC
Cleanup of bugs open for old versions.