Thread View: news.software.readers
5 messages
5 total messages
Started by Adam Funk
Tue, 20 Jun 2006 15:22
[slrn] can't use require("gslrand") in a slrn macro file?
Author: Adam Funk
Date: Tue, 20 Jun 2006 15:22
Date: Tue, 20 Jun 2006 15:22
23 lines
1207 bytes
1207 bytes
~/.slrnrc has the line
interpret(".slrn/custom.sl");
and that file contains the line
require ("gslrand");
which fails with this error when I launch slrn:
loading /home/adam/.slrn/custom.sl
require is undefined
/home/adam/.slrn/custom.sl:3:<top-level>:Undefined Name
What do I have to do to use the slang-gsl libraries in slrn?
(It works when I run it in slsh.)
--
Thanks,
Adam
Re: [slrn] can't use require("gslrand") in a slrn macro file?
Author: John E. Davis
Date: Tue, 20 Jun 2006 19:06
Date: Tue, 20 Jun 2006 19:06
28 lines
1797 bytes
1797 bytes
On Tue, 20 Jun 2006 16:22:28 +0100, Adam Funk <a24061@yahoo.com>
wrote:
>~/.slrnrc has the line
>
> interpret(".slrn/custom.sl");
>
>and that file contains the line
>
> require ("gslrand");
>
>which fails with this error when I launch slrn:
>
> loading /home/adam/.slrn/custom.sl
> require is undefined
> /home/adam/.slrn/custom.sl:3:<top-level>:Undefined Name
The file require.sl is distributed with slang and is installed as part
of slsh. I suggest that you put
autoload ("require", "/path/to/require.sl");
in your custom.sl. If you are using slang-2, and it was compiled with
the correct setting of _slang_install_prefix, you should be able to use:
autoload ("require", "$_slang_install_prefix/share/slsh/require.sl"$);
Good luck,
--John
Re: [slrn] can't use require("gslrand") in a slrn macro file?
Author: Adam Funk
Date: Wed, 21 Jun 2006 13:50
Date: Wed, 21 Jun 2006 13:50
40 lines
2012 bytes
2012 bytes
On 2006-06-20, John E. Davis <davis@space.mit.edu> wrote:
> The file require.sl is distributed with slang and is installed as part
> of slsh. I suggest that you put
>
> autoload ("require", "/path/to/require.sl");
That works, but I still can't get gslrand to load.
I discovered using
printf("\n--->%s\n", get_slang_load_path());
that slrn has an empty slang_load_path, which I've changed to
"/usr/share/slsh/local-packages:", but if I try
require("gslrand");
it seems to look for it in the pwd:
loading /home/adam/
***Warning: feature gslrand not provided by gslrand
rng_alloc is undefined
whereas with
import("gslrand");
I get this error:
Error linking to /usr/lib/slang/v2/modules/gslrand-module.so: /usr/lib/slang/v2/modules/gslrand-module.so: undefined symbol: slgsl_reset_errors
It works in slsh, so I think slrn configures the s-lang interpreter in
a peculiar way. Do you have any suggestions for forcing it to
co-operate?
Thanks,
Adam
Re: [slrn] can't use require("gslrand") in a slrn macro file?
Author: John E. Davis
Date: Wed, 21 Jun 2006 17:13
Date: Wed, 21 Jun 2006 17:13
30 lines
1958 bytes
1958 bytes
On Wed, 21 Jun 2006 14:50:52 +0100, Adam Funk <a24061@yahoo.com>
wrote:
>I discovered using
>
> printf("\n--->%s\n", get_slang_load_path());
>
>that slrn has an empty slang_load_path, which I've changed to
>"/usr/share/slsh/local-packages:", but if I try
Unless recent versions have changed the way slang files are loaded,
slrn uses the "macro_directory" variable to specify the load-path.
You may want to try something like
#v+
set macro_directory "/usr/share/slsh,/usr/share/slsh/local-packages"
#v-
in your .slrnrc file.
> import("gslrand");
>
>I get this error:
>
> Error linking to /usr/lib/slang/v2/modules/gslrand-module.so: /usr/lib/slang/v2/modules/gslrand-module.so: undefined symbol: slgsl_reset_errors
Use: import("gslcore"); import("gslrand");
The gslcore module defines some functions used by the other gsl modules.
I hope this helps.
--John
Re: [slrn] can't use require("gslrand") in a slrn macro file?
Author: Adam Funk
Date: Thu, 22 Jun 2006 09:23
Date: Thu, 22 Jun 2006 09:23
21 lines
1688 bytes
1688 bytes
On 2006-06-21, John E. Davis <davis@space.mit.edu> wrote:
> Unless recent versions have changed the way slang files are loaded,
> slrn uses the "macro_directory" variable to specify the load-path.
> You may want to try something like
> #v+
> set macro_directory "/usr/share/slsh,/usr/share/slsh/local-packages"
> #v-
> in your .slrnrc file.
Yes, thanks.
>> Error linking to /usr/lib/slang/v2/modules/gslrand-module.so: /usr/lib/slang/v2/modules/gslrand-module.so: undefined symbol: slgsl_reset_errors
>
> Use: import("gslcore"); import("gslrand");
>
> The gslcore module defines some functions used by the other gsl modules.
>
> I hope this helps.
Very helpful, thanks.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads