Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 333937 - dev-scheme/slib-3.1.5-r1 starter script fails to start due to wrong path substitution during install stage
Summary: dev-scheme/slib-3.1.5-r1 starter script fails to start due to wrong path subs...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2010-08-22 11:34 UTC by Bernd Waibel
Modified: 2016-10-24 19:58 UTC (History)
2 users (show)

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


Attachments
Log file of last emerge (dev-scheme:slib-3.1.5-r1:20100822-110953.log,19.20 KB, text/plain)
2010-08-22 11:34 UTC, Bernd Waibel
Details
Trivial patch for dev-scheme/slib/slib-3.1.5-r1.ebuild (slib-3.1.5-r1.ebuild-fix-usr_bin_slib-script-paths.patch,484 bytes, patch)
2010-08-24 16:01 UTC, Cyprien Nicolas (fulax)
Details | Diff
Updated ebuild patch (slib-3.1.5-fix-usr_bin_slib-script-paths.patch,452 bytes, patch)
2013-02-03 12:58 UTC, Cyprien Nicolas (fulax)
Details | Diff
updated ebuild to not use dosed (slib-3.1.5-sed.patch,507 bytes, patch)
2013-02-03 13:55 UTC, Bernd Waibel
Details | Diff
updated ebuild to not use dosed (slib-3.1.5-sed.patch,527 bytes, patch)
2013-02-03 14:14 UTC, Bernd Waibel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Waibel 2010-08-22 11:34:01 UTC
When trying to start /usr/bin/slib the following error is shown:
bernd@artus /usr/portage $ which slib
/usr/bin/slib
bernd@artus /usr/portage $ slib
Backtrace:
In unknown file:
   ?: 0* [primitive-load "/mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/share/slib/guile.init"]

<unnamed port>: In procedure open-file in expression (primitive-load name):
<unnamed port>: No such file or directory: "/mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/share/slib/guile.init"


I just re-emerged slib because of this error, but it still exists. Here's the relevant part of the log file:

...
>>> Install slib-3.1.5-r1 into /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image/ category dev-scheme
...
test -d /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/ || mkdir /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/
echo '#! /bin/sh'			 > /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
echo SCHEME_LIBRARY_PATH=/mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/share/slib/  >> /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
echo S48_VICINITY=/mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/share/scheme48/		>> /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
echo VERSION=3a5			>> /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
echo export SCHEME_LIBRARY_PATH S48_VICINITY >> /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
cat slib.sh				>> /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
chmod +x /mnt/tmp/portage/dev-scheme/slib-3.1.5-r1/image//usr/bin/slib
...

Looks to me, like the WORKDIR part isn'r removed from the path during the install stage.


Reproducible: Always

Steps to Reproduce:
1. emerge dev-scheme/slib
2. /usr/bin/slib
3.

Actual Results:  
The slib binary (/usr/bin/slib) isn't usable as a standalone application.

Expected Results:  
As guile is the only scheme interpreter that's registered on my machine, it should have loaded guile with the slib library already loaded.

bernd@artus /usr/portage $ emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.34-gentoo-r1-x86_64-AMD_Athlon-tm-_7850_Dual-Core_Processor-with-gentoo-2.0.1
Timestamp of tree: Sun, 22 Aug 2010 07:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.2
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.4_p6-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA @FREE @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/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="-O2 -pipe -Wall -march=amdfam10 -mmmx -mieee-fp -msse3 -msse4a -m3dnow"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--buildpkg --with-bdep y"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://de-mirror.org/distro/gentoo/ ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://mirror.netcologne.de/gentoo/ "
LANG="de_DE"
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 --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/xen /var/lib/layman/enlightenment /var/lib/layman/desktop-effects /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa amd64 avahi bash-completion beagle berkdb bluetooth branding bzip2 cairo caps cdr cli consolekit cracklib crypt cups curl cxx dbus dga doc dri dts dvd dvdr eds emacs emboss encode evo exif expat fam ffmpeg firefox flac fontconfig fortran fuse galago gcrypt gd gdbm gdu gif glade gmp gnome gnome-keyring gnome-print gnutls gpm gstreamer gtk gzip hal iconv inotify ipv6 jadetex java jpeg jpeg2k kde kerberos kipi kpathsea latex lcms ldap libnotify lua lzma mad mikmod mmap mmx mng modules mono motif mp3 mp4 mpeg mudflap multilib mysql nautilus ncurses networkmanager nls nptl nptlonly nsplugin odbc offensive ogg openal openexr opengl openmp pam pango pch pcre pdf perl png policykit ppds pulseaudio python qt3support qt4 quicktime readline reflection samba sdl semantic-desktop session skey slp smp source speex spell spl sse sse2 ssl ssse3 startup-notification svg sysfs syslog tcl tcpd threads tiff tk truetype udev unicode usb vorbis wmf x264 xattr xcb xft xinerama xml xorg xpm xulrunner xv xvid zeroconf zip zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nv 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" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Bernd Waibel 2010-08-22 11:34:53 UTC
Created attachment 244011 [details]
Log file of last emerge
Comment 2 Cyprien Nicolas (fulax) 2010-08-24 16:01:31 UTC
Created attachment 244415 [details, diff]
Trivial patch for dev-scheme/slib/slib-3.1.5-r1.ebuild

(In reply to comment #0)
>
> Looks to me, like the WORKDIR part isn'r removed from the path during the
> install stage.


You're right. A "dosed /usr/bin/slib" statement is missing after emake install.

Here is a patch you can apply to your ebuild (and move it into one local overlay to not have it removed at the next sync)
Comment 3 Pacho Ramos gentoo-dev 2013-02-02 12:49:10 UTC
Are you willing to proxy maintain this?
http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml

Anyway, an updated patch would be needed as dosed is deprecated :(
Comment 4 Cyprien Nicolas (fulax) 2013-02-03 12:58:03 UTC
Created attachment 337786 [details, diff]
Updated ebuild patch

(In reply to comment #3)
> Are you willing to proxy maintain this?
> http://www.gentoo.org/proj/en/qa/proxy-maintainers/index.xml

I decline the offer. I closely follow the scheme herd for a few years, but I never really understood slib goals/usage.

> Anyway, an updated patch would be needed as dosed is deprecated :(

It is still trivial, reading pms, one should replace the dosed line by :

  sed -i "s:${D}::" /usr/bin/slib || die "sed failed"

Patch updated for 3.1.5. Dunno if 3.2.x are okay or not.
Comment 5 Cyprien Nicolas (fulax) 2013-02-03 13:18:20 UTC
(In reply to comment #4)
>   sed -i "s:${D}::" /usr/bin/slib || die "sed failed"
                     ^
                     `--- $D is missing here. The patch contains it.

btw, I noticed slib-3.1 won't work with guile-2
Comment 6 Bernd Waibel 2013-02-03 13:55:21 UTC
Created attachment 337794 [details, diff]
updated ebuild to not use dosed

updated patch which does not use dosed, but instead uses sed on "${D}"/usr/bin/slib
Comment 7 Bernd Waibel 2013-02-03 14:01:08 UTC
I forgot to reload the page before submitting the patch and didn't see Cyprien Nicolas already provided another patch. Anyway the patch provided by Cyprien didn't work out on my machine. It's how I started and it failed with a sandbox violation. Maybe it's due to some sandbox'ing features I have enabled, so I leave my patch for now.
Comment 8 Bernd Waibel 2013-02-03 14:11:46 UTC
As for proxy-maintaining the ebuild, I don't feel qualified for this package to proxy-maintain. I haven't used scheme, or slib for this part, for years. I only have slib installed because gnucash pulls it in as an dependency. So I neither know the package well, nor am I overly enthusiastic about it, which would likely disqualify me, as of the proxy-maintainers webpage.

I haven't tried guile:2 for now, because I'm mostly using the stable branch.

There's also a "new" (from 2010) version of slib available, 3b3, which would translate to slib-3.2.3 in gentoo, which uses some kind of configure script. I will do check out this version and see if I can provide an ebuild for it.
Comment 9 Bernd Waibel 2013-02-03 14:14:34 UTC
Created attachment 337798 [details, diff]
updated ebuild to not use dosed

updated the ebuild to die if sed fails
Comment 10 Ettore Di Giacinto (RETIRED) gentoo-dev 2016-10-24 19:58:34 UTC
Fixed with dev-scheme/slib-3.2.5