Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540166 - dev-texlive/texlive-context-2012-r1 should depend on dev-lang/ruby:1.9 - /usr/bin/pstopdf:23: cannot load such file -- base/switch (LoadError)
Summary: dev-texlive/texlive-context-2012-r1 should depend on dev-lang/ruby:1.9 - /usr...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-15 17:36 UTC by Ervin Peters
Modified: 2016-05-14 10:10 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 Ervin Peters 2015-02-15 17:36:40 UTC
On upgrading nasm I got an error where documentation is generatet via ps2pdf or if that fails, pstopdf.

Because of an broken ghostscript installation ps2pdf failed. But, the fallback pstopdf failed too with an different, ruby related error:

Reproducible: Always

Steps to Reproduce:
1. run pstopdf in a shell
2.
3.
Actual Results:  
/usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- base/switch (LoadError)
	from /usr/lib64/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/bin/pstopdf:23:in `<main>'


Expected Results:  
Show usage information or create an pdf out of an ps file.

After some investigations and looking at /usr/bin/pstopdf which links to /usr/share/texmf-dist/scripts/context/ruby/pstopdf.rb I found that this script expects the directory where it resides in the load path. Before ruby 1.9 this ws default. From ruby 1.9 up it is not.

Fixing it by changing 'require' to 'require_relative' in Line 23-25 points to another error:

/usr/bin/pstopdf:23:in `require_relative': /usr/share/texmf-dist/scripts/context/ruby/base/switch.rb:501: invalid multibyte escape: /\xFF/ (SyntaxError)
	from /usr/bin/pstopdf:23:in `<main>'

Also an 19 issue, too - stricter checks. The script specifies no encoding and the system default utf8 does not allow \xff as single byte charakter.

At that point I stopped and wrote this bugreport.

Maybe it would be an idea to switch texlive-2013 or texlive-2014 and related packages to stable?
Comment 1 Ervin Peters 2015-02-15 17:38:52 UTC
snow ~ # emerge --info
Portage 2.2.14 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.8.3, glibc-2.19-r1, 3.17.8-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.17.8-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3_CPU_540_@_3.07GHz-with-gentoo-2.2
KiB Mem:     3719072 total,     90868 free
KiB Swap:    8393924 total,   8379616 free
Timestamp of tree: Sun, 15 Feb 2015 13:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r4
dev-lang/python:          2.7.9-r1, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.9
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3-r1, 1.11.6-r1, 1.13.4
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.4
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/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=core2 -mtune=generic -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://de-mirror.org/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.utf8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://woodstok.ervnet.local/gentoo-portage"
USE="3ds 64bit X Xaw3d a52 aac accessibility ace acl acpi addns ads aften aim alsa amd64 amr animgif apache2 apng applet archive asf aspell assistant audio auto-completion banshee bash-completion bdf berkdb blender bogofilter branding builder bzip2 cairo cdda cdparanoia cdr charset chipcard chm cjk cli colord context contrib corefonts cracklib crypt css cups curl curlwrappers cvsgraph cxx d dbi dbus deprecated detex devhelp dia discouraged djvu dmx doc dolbyinrec dri drm dts dv dvb dvd dvdnav dvdr dvi dynamicplugin eds emboss emf enca encode escreen evo exif extensions extra extra-algorithms extras fam fastcgi fat fax fbcon ffmpeg firefox flac flash fontconfig fonts foomaticdb fortran fping fpx ftp fuse g3dvl games gcj gd gdbm geoip geos gif gimp git gkrellm glade glamor gles gles1 gnome gnome-keyring gnome-online-accounts gnome-print gpac gphoto2 gpm gps graphics graphviz grass grub gstreamer gtk gtk2-perl gtkhtml gudev gzip h224 h281 h323 hbci hdri hfs high-ints hpn html humanities ibam icons iconv icq icu id3 ieee1394 imagemagick imap infinality inkjar introspection iodbc ipv6 irc ithreads jadetex java javascript jbig joystick jpeg jpeg2k kerberos kpathsea lame lasi latex lcdfilter lcms ldap libav libnotify libsecret libssh2 libv4l2 libwww liemikuutio live livebuffer lm_sensors logrotate lqr lto lua luatex lzo mad mapnik mdb mdnsresponder-compat menuorg metric midi mikmod mime minizip mjpeg mmx mng mod modules mozdom mp3 mp4 mpeg mpi mplayer msn mssql multilib music mysql mysqli nautilus ncurses network network-cron nfs nfsv3 nfsv4 nls nmap nntp nocd nptl nsplugin ntfs ntfsprogs ntlm odk offensive ofx ogg ogm omega openexr opengl openmp openstreetmap openvg openxml oscar osdmenu pam pango pcf pch pcre pda pdf perl perl-geoipupdate pg-intdatetime pgf pixmaps player plotutils plugins pmu png pnm policykit posix postgres ppds psf pstricks publishers pulseaudio pvr python qt3support qt4 quicktime rar raw rdesktop readline real regex reiserfs romio rtsp samba sasl scanner science screen scripts sdl seamonkey sensord server session sftp shorten simplexml sip sipim slp smartcard smbclient smbsharemodes smp snmp soap socialweb sockets sound soup source sourcecaps sourceview spell sql sqlite sqlite3 sse sse2 ssl startup-notification stream subtitles subversion svg svgz sylpheed syslog systemd szip tcpd templates tex tex4ht tga theora thesaurus thin-splines threads thumbnail thunderbird tidy tiff timidity tk tools transcode truetype type3 udev udisks unicode unzip upower usb utils uxa v4l valgrind vcd vdpau vdr vhosts vorbis wav webkit wifi win32 winbind wineappdb wma wmf wxwidgets x264 xanim xbase xcap xcb xcf xcomposite xetex xfs xft xml xmlrpc xorgmodule xpm xscreensaver xsl xslt xterm xv xvid xvmc yaepg yahoo youtube zip zlib" ABI_X86="64" ALSA_CARDS="HDA-INTEL" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file 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_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse aiptek hyperpen" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en es fr en_GB ru" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel vesa" 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"
USE_PYTHON="2.7 3.3 3.4"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Ervin Peters 2016-05-14 10:10:19 UTC
...with texlive 2014