On Sat, Apr 20, 2024 at 01:18:13PM -0700, Dima Pasechnik wrote:
> 
> 
> On Saturday, April 20, 2024 at 12:48:43 PM UTC+1 Waldek Hebisch wrote:
> 
> On Sat, Apr 20, 2024 at 02:47:02AM -0700, Dima Pasechnik wrote: 
> > How does one do this? 
> > (with ECL or SBCL). 
> > 
> > Presumably if one makes a FriCAS fasl library (how?), it should be 
> possible 
> > to call FriCAS functions from Lisp without going through files or pipes. 
> > 
> > That's certainly possible (and used in Sage) with Maxima. 
> 
> Look at 'contrib/load-fricas.lisp' and 'contrib/mk_shlib.lisp'. 
> 'contrib/mk_shlib.lisp' makes ECL .fas (really a C shared library). 
> Currently 'contrib/load-fricas.lisp' is broken with sbcl, one needs to 
> add an extra line loading GMP support (I will fix this shortly, 
> after more testing).
> 
> 
> in sbcl build, 
> /full_path_to_FriCAS_build_directory/src/interp/
> has no src/interp/ - so this seems to be broken too. 
> Or probably there is a confusion of terms, as there is a build directory,
> build/x86_64-linux-gnu/, containing bin/ and lib/, but no src/

In FriCAS documentation build directory means directory where
you run 'configure'. 'build', 'src' and 'target' are just
subdirectores of the build directory.  If you do in source
build, then you also have source stuff (mostly in 'src' poluting
build directory).
 
> It should be very easy to convert this
> file into a template (.in) that is filled in by ./configure with the 
> correct values.

Well, they are really templates so that user can customize them as
needed.  We could do the substitution and put the result in the
contrib subdirectory of the build tree.  However, after installing
FriCAS user may delete build directory, and both use things that
are not part of normal installation.  I guess that for ECL we
could add extra target building shared library (library should
be usable without build tree, it only depends on files in final
installation).  But sbcl part was really for people who want to
tweak it.

>  Anyhow, if instead I use the location of the source directory, with 
> src/interp present, I get
> "Package C does not exist." error.
> 
> $ sbcl <mk_shlib.lisp

'mk_shlib.lisp' is ECL-only.  I guess I should change
"Works with ECL." into "Works only with ECL."


-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZiQpPbisInQhNsLa%40fricas.org.

Reply via email to