unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [bug] guile-config info top_srcdir
@ 2002-10-10 12:32 David Allouche
  2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
  2002-10-14 22:27 ` [bug] guile-config info top_srcdir Marius Vollmer
  0 siblings, 2 replies; 8+ messages in thread
From: David Allouche @ 2002-10-10 12:32 UTC (permalink / raw)


Hello,

I am currently working on porting TeXmacs to work with guile-1.6.0.

I happened to notice that when you use "guile-config info top_srcdir"
you get the string "top_srcdir_absolute@" instead of something like
"/home/david/home/devel/guile-1.6.0".

I did no test if that was fixed in the CVS.

Thanks.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://alqua.com/tmresources
   david@allouche.net  |    allouche@texmacs.org
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Testing for a GUILE installation
  2002-10-10 12:32 [bug] guile-config info top_srcdir David Allouche
@ 2002-10-10 13:02 ` David Allouche
  2002-10-10 18:18   ` Thien-Thi Nguyen
                     ` (2 more replies)
  2002-10-14 22:27 ` [bug] guile-config info top_srcdir Marius Vollmer
  1 sibling, 3 replies; 8+ messages in thread
From: David Allouche @ 2002-10-10 13:02 UTC (permalink / raw)


On Thu, Oct 10, 2002 at 02:32:31PM +0200, David Allouche wrote:
> 
> I am currently working on porting TeXmacs to work with guile-1.6.0.
> 
> I happened to notice that when you use "guile-config info top_srcdir"
> you get the string "top_srcdir_absolute@" instead of something like
> "/home/david/home/devel/guile-1.6.0".

But, you may ask, what is the use of top_srcdir to TeXmacs? Well,
TeXmacs goes to some length to test that GUILE is properly installed.

What it does is test for the existence of "ice-9/boot-9.scm" in
GUILE_LOAD_PATH. If that fails, it looks for a default GUILE_LOAD_PATH
with the following procedure:

datadir=`guile-config info datadir`
version=`guile-config info top_srcdir`
Drop substring of version up to the last '-'
Drop substring of version up to the first '/'
(Here $version is supposedly the complete version number)
Prepend "$datadir/guile/$version" to GUILE_LOAD_PATH
Look for "ice-9/boot-9.scm" in GUILE_LOAD_PATH.

I worked around the current bug in guile-config, by using
'guile --version' and doing a different parsing of the result. But I
would like to know if there is a recommended, less hackish, way of
testing that GUILE is correctly installed.

Also, for TeXmacs to work with guile-1.6.0 I have to avoid prepending
the "$datadir/guile/$version" to GUILE_LOAD_PATH, otherwise I get an
error:

    ERROR: Unbound variable: include-deprecated-features

Leaving GUILE_LOAD_PATH alone seems to work okay also with guile-1.4.
But then I wonder what was the use of that code...

FYI, I configured guile with --enable-deprecated=detailed.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://alqua.com/tmresources
   david@allouche.net  |    allouche@texmacs.org
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing for a GUILE installation
  2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
@ 2002-10-10 18:18   ` Thien-Thi Nguyen
  2002-10-11 21:37   ` Neil Jerram
  2002-10-14 22:34   ` Marius Vollmer
  2 siblings, 0 replies; 8+ messages in thread
From: Thien-Thi Nguyen @ 2002-10-10 18:18 UTC (permalink / raw)
  Cc: guile-user

   From: David Allouche <david@allouche.net>
   Date: Thu, 10 Oct 2002 15:02:32 +0200

   recommended, less hackish, way of
   testing that GUILE is correctly installed.

use GUILE_PROGS macro in configure.in.  call aclocal in your autogen.sh
script (or equivalent).  this adds a check for guile and guile-config to
be run at configure-time.  see guile.m4 for other checks:

## GUILE_PROGS -- set paths to Guile interpreter, config and tool programs
## GUILE_FLAGS -- set flags for compiling and linking with Guile
## GUILE_SITE_DIR -- find path to Guile "site" directory
## GUILE_CHECK -- evaluate Guile Scheme code and capture the return value
## GUILE_MODULE_CHECK -- check feature of a Guile Scheme module
## GUILE_MODULE_AVAILABLE -- check availability of a Guile Scheme module
## GUILE_MODULE_REQUIRED -- fail if a Guile Scheme module is unavailable
## GUILE_MODULE_EXPORTS -- check if a module exports a variable
## GUILE_MODULE_REQUIRED_EXPORT -- fail if a module doesn't export a variable

for automated generation of some of these macro "calls", create
top-level file modules.af w/ contents:

  (files-glob "scheme/*.scm" "etc/*.scm")     ; munge paths to taste

add in autogen.sh:

  guile-tools autofrisk

and modify the aclocal call to include cwd:

  aclocal -I .

this adds checks for those modules referenced in scheme/*.scm and
etc/*.scm to be run at configure-time.  look at autofrisk commentary for
ways to fine-tune these checks.  here are some examples:

  http://www.glug.org/people/ttn/software/etrack/dist/0.86/modules.af
  http://www.glug.org/people/ttn/software/ttn-pers-scheme/dist/0.31/modules.af

see also autogen.sh files in the same directories.

lastly, in general you should not check for program version number as an
indirect indicator of some feature; check for the feature specifically.

thi


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing for a GUILE installation
  2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
  2002-10-10 18:18   ` Thien-Thi Nguyen
@ 2002-10-11 21:37   ` Neil Jerram
  2002-10-14 22:34   ` Marius Vollmer
  2 siblings, 0 replies; 8+ messages in thread
From: Neil Jerram @ 2002-10-11 21:37 UTC (permalink / raw)
  Cc: guile-user

>>>>> "David" == David Allouche <david@allouche.net> writes:

    David> I worked around the current bug in guile-config, by using
    David> 'guile --version' and doing a different parsing of the
    David> result. But I would like to know if there is a recommended,
    David> less hackish, way of testing that GUILE is correctly
    David> installed.

What do you mean by correctly installed?

If there is a specific set of testable features that matter to you,
you could write a Guile script that tries to use those features, and
arrange to run `guile -s testscript.scm' as part of ./configure.

        Neil



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bug] guile-config info top_srcdir
  2002-10-10 12:32 [bug] guile-config info top_srcdir David Allouche
  2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
@ 2002-10-14 22:27 ` Marius Vollmer
  1 sibling, 0 replies; 8+ messages in thread
From: Marius Vollmer @ 2002-10-14 22:27 UTC (permalink / raw)
  Cc: guile-user

David Allouche <david@allouche.net> writes:

> I happened to notice that when you use "guile-config info top_srcdir"
> you get the string "top_srcdir_absolute@" instead of something like
> "/home/david/home/devel/guile-1.6.0".

Thanks!  It should be fixed in CVS, both branches.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing for a GUILE installation
  2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
  2002-10-10 18:18   ` Thien-Thi Nguyen
  2002-10-11 21:37   ` Neil Jerram
@ 2002-10-14 22:34   ` Marius Vollmer
  2002-10-15  8:17     ` David Allouche
  2 siblings, 1 reply; 8+ messages in thread
From: Marius Vollmer @ 2002-10-14 22:34 UTC (permalink / raw)
  Cc: guile-user

David Allouche <david@allouche.net> writes:

> Also, for TeXmacs to work with guile-1.6.0 I have to avoid prepending
> the "$datadir/guile/$version" to GUILE_LOAD_PATH, otherwise I get an
> error:
> 
>     ERROR: Unbound variable: include-deprecated-features
> 
> Leaving GUILE_LOAD_PATH alone seems to work okay also with guile-1.4.
> But then I wonder what was the use of that code...

Which code to you refer to?  Is it in TeXmacs or in Guile?  I don't
understand why you try to find the default load-path of Guile.  If you
want to know where to install your Scheme files that Guile should be
able to find by default, just use "$datadir/guile/".

Otherwise, you might be able to use

    $ guile -c "(display (cadr %load-path))"

But that is a bit hackish as well.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing for a GUILE installation
  2002-10-14 22:34   ` Marius Vollmer
@ 2002-10-15  8:17     ` David Allouche
  2002-10-18 21:58       ` Marius Vollmer
  0 siblings, 1 reply; 8+ messages in thread
From: David Allouche @ 2002-10-15  8:17 UTC (permalink / raw)


Well... first, thank all for all those replies. I have some problems
caching up with my late email since I went back from summer vacation,
so sorry for the late reply.


On Thu, Oct 10, 2002 at 11:18:51AM -0700, Thien-Thi Nguyen wrote:
>    From: David Allouche <david@allouche.net>
>    Date: Thu, 10 Oct 2002 15:02:32 +0200
>
>    recommended, less hackish, way of
>    testing that GUILE is correctly installed.
>
> use GUILE_PROGS macro in configure.in.  call aclocal in your autogen.sh
> script (or equivalent).  this adds a check for guile and guile-config to
> be run at configure-time.  see guile.m4 for other checks:
>
[snip]
>
> see also autogen.sh files in the same directories.
>
> lastly, in general you should not check for program version number as an
> indirect indicator of some feature; check for the feature specifically.

Well... my question was about detecting the presence of GUILE at
run-time. Joris (the TeXmacs author) is very fond of distributing
binaries... he believes that helps widen the public of the program.

Nevertheless, thanks for your detailed info on autoconfiguration.


On Fri, Oct 11, 2002 at 10:37:24PM +0100, Neil Jerram wrote:
> >>>>> "David" == David Allouche <david@allouche.net> writes:
>
>     David> I worked around the current bug in guile-config, by using
>     David> 'guile --version' and doing a different parsing of the
>     David> result. But I would like to know if there is a recommended,
>     David> less hackish, way of testing that GUILE is correctly
>     David> installed.
>
> What do you mean by correctly installed?
>
> If there is a specific set of testable features that matter to you,
> you could write a Guile script that tries to use those features, and
> arrange to run `guile -s testscript.scm' as part of ./configure.

Well... I think that is the right question. I guess the point of that
code is producing a (somewhat) helpful error message when libguile was
linked within TeXmacs, but the relevant support files are not present
on the host system.

That is not about testing the presence on any specific feature, but
just testing at run-time for the presence of the guile stuff...


On Tue, Oct 15, 2002 at 12:34:50AM +0200, Marius Vollmer wrote:
> David Allouche <david@allouche.net> writes:
>
> > Also, for TeXmacs to work with guile-1.6.0 I have to avoid prepending
> > the "$datadir/guile/$version" to GUILE_LOAD_PATH, otherwise I get an
> > error:
> >
> >     ERROR: Unbound variable: include-deprecated-features
> >
> > Leaving GUILE_LOAD_PATH alone seems to work okay also with guile-1.4.
> > But then I wonder what was the use of that code...
>
> Which code to you refer to?  Is it in TeXmacs or in Guile?  I don't
> understand why you try to find the default load-path of Guile.  If you
> want to know where to install your Scheme files that Guile should be
> able to find by default, just use "$datadir/guile/".

Really, I do not know what that was supposed to do. I naively supposed
that code was NOT another of Joris eccentricities and that you guile
gurus could tell me something like "oh yes, that was needed on some
martian installation of guile-beta-3"...


> Otherwise, you might be able to use
>
>     $ guile -c "(display (cadr %load-path))"
>
> But that is a bit hackish as well.

That is not the point... TeXmacs apparently only set the
GUILE_LOAD_PATH for use by libguile. That is not used anywhere else.


I think I am just going to let this stuff be. I have plenty of more
useful things to annoy Joris with, so I'd rather not waste our time
with this particular bit of (seemingly harmless) cruft.

Thanks all for your support. I'll be back next time I have a problem
with GUILE, and will first ask the boss what his damn code is supposed
to do. :-)

Cheers.

-- 
David Allouche         | GNU TeXmacs -- Writing is a pleasure
Free software engineer |    http://www.texmacs.org
   http://ddaa.net     |    http://alqua.com/tmresources
   david@allouche.net  |    allouche@texmacs.org
TeXmacs is NOT a LaTeX front-end and is unrelated to emacs.



_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Testing for a GUILE installation
  2002-10-15  8:17     ` David Allouche
@ 2002-10-18 21:58       ` Marius Vollmer
  0 siblings, 0 replies; 8+ messages in thread
From: Marius Vollmer @ 2002-10-18 21:58 UTC (permalink / raw)
  Cc: guile-user

David Allouche <david@allouche.net> writes:

> That is not the point... TeXmacs apparently only set the
> GUILE_LOAD_PATH for use by libguile. That is not used anywhere else.

It should not be necessary to set GUILE_LOAD_PATH in order to make
libguile happy.  I suggest you comment out that code.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-10-18 21:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-10 12:32 [bug] guile-config info top_srcdir David Allouche
2002-10-10 13:02 ` Testing for a GUILE installation David Allouche
2002-10-10 18:18   ` Thien-Thi Nguyen
2002-10-11 21:37   ` Neil Jerram
2002-10-14 22:34   ` Marius Vollmer
2002-10-15  8:17     ` David Allouche
2002-10-18 21:58       ` Marius Vollmer
2002-10-14 22:27 ` [bug] guile-config info top_srcdir Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).