Bug 137151

Summary: lang/slib-guile using latest 3b1 version of slib fails to install "(require 'new-catalog)" -> Error code 1
Product: Ports & Packages Reporter: RandomUser <rannumgen>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description RandomUser 2009-07-26 13:40:01 UTC

===>  Installing for slib-guile-3b1_1
===>   slib-guile-3b1_1 depends on file: /usr/local/share/slib/require.scm - found
===>   slib-guile-3b1_1 depends on executable: guile - found
===>   Generating temporary packing list
===>  Checking if lang/slib-guile already installed
/bin/ln -shf /usr/local/share/slib /usr/local/share/guile/1.8/slib
cd /usr/local/share/guile/1.8/slib &&  /usr/local/bin/guile -q -l guile.init -c  "(require 'new-catalog)"
*** Error code 1

Stop in /ad4/usrports/lang/slib-guile.

Fix: 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A) Modify "do-install" target in the Makefile

=== from
        ${LN} -shf ${PREFIX}/share/slib ${LOCALBASE}/share/guile/1.8/slib
        cd ${PREFIX}/share/guile/1.8/slib && \
                ${LOCALBASE}/bin/guile -q -l guile.init -c \
                "(require 'new-catalog)"


=== to
        ${LN} -shf ${PREFIX}/share/slib ${LOCALBASE}/share/guile/1.8/slib
        cd ${PREFIX}/share/guile/1.8/slib && \
                ${LOCALBASE}/bin/guile -q -l guile.init -c \
                "(use-modules (ice-9 slib));(require 'new-catalog)"


=========== PATCH ==============
9,10c9,10
< PORTVERSION=  3a4 # Keep this in sync with lang/slib
< PORTREVISION= 2
---
> PORTVERSION=  3b1 # Keep this in sync with lang/slib
> PORTREVISION= 1
29c29
<               "(require 'new-catalog)"
---
>               "(use-modules (ice-9 slib))(require 'new-catalog)"
=========== REFERENCE ================
http://sources.redhat.com/ml/guile/2000-04/msg00114.html


- - - - - - - - - - - - - - - - - - - - - - - - - -
B) mkdir /usr/local/share/guile/site

-- -- - - - - - - - - - - - - - - - - - - - - - - - 
NOTE: when compiling GnuCASH which requires "/usr/local/share/guile/1.8/slibcat",
it was necessary to create a link from "../guile/site/slibcat". Don't know if this is the proper
way to handle this requirement for slibcat or not. Installing slib-3b1 has fixed GnuCASH's requrement
for slib-3b1 (as noted in the above REFERENCE).

COMMENTS: I am not really famiilar with guile or slib. Also, creating "$HOME/.guile" as recommended
didn't help. ktrace showed that it wasn't being used during "make install" - hence the change to the
Makefile.
How-To-Repeat: 

Before setting GUILE_LOAD_PATH=/usr/local/share/slib/, the error message  was:

/bin/ln -shf /usr/local/share/slib /usr/local/share/guile/1.8/slib
cd /usr/local/share/guile/1.8/slib &&  /usr/local/bin/guile -q -l guile.init -c  "(require 'new-catalog)"
ERROR: Unbound variable: require
*** Error code 1

Stop in /ad4/usrports/lang/slib-guile.
Comment 1 RandomUser 2009-07-26 13:58:23 UTC
The semicolon in the "change to" section inbetween "(use-modules ...)"
and "(require ...)" is incorrect - should NOT be there. This was
corrected and included in the PATCH.
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2009-08-11 05:33:37 UTC
State Changed
From-To: open->closed

The port is fixed, thanks!