Hey Binh,
it is not that the function REQUIRE is not available, it is that it doesn't know /where/ to look for sockets.fas. I see that you have unix pathnames, so ecl should not expect the flat structure. Did you pass "--prefix=/usr/local/" to configure (or something in this spirit)? If so, did you perform make install afterwards? If so, then require should be able to find sockets.fas in /usr/local/lib/ecl/... , and if not - it can't find it. The same applies to the module "ASDF", so I think that having installation with known pathnames should fix all your issues on that front.
Alternatively you may specify that ASDF and SOCKETS are builtin (see ./configure --help for details).
As the last resort, if you want to push in the same direction you've already started - load ASDF.fas the same way you've loaded SOCKETS.fas (it should be in the same directory) - that will ensure ASDF 3.1.8.
Best regards, Daniel
-- Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland TurtleWare - Daniel Kochmański | www.turtleware.eu
"Be the change that you wish to see in the world." - Mahatma Gandhi
------- Original Message ------- On Wednesday, March 22nd, 2023 at 1:55 PM, Binh Nguyen nguyen1024@gmail.com wrote:
Dear ECL Community,
Could you let me know how to do the following, please?
- How to load file "quicklisp.lisp" in an embedded instance of ECL
- How to make the function REQUIRE available in an embedded instance of ECL
- How to load ASDF 3 or newer in an embedded instance of ECL
I am able to load file "quicklisp.lisp" when I run "/usr/local/ecl.exe".
I saw that there is an "ecl-quicklisp.lisp" but I'd like to learn how to load non-ECL Quicklisp.
I am running ECL 21.2.1. that I compiled with MSYS MinGW x86.
The first error that comes up is that the function REQUIRE is not available.
(load "quicklisp.lisp")
;;; Loading "C:/msys64/home/Admin/quicklisp.lisp"
Debugger received error of type: SIMPLE-ERROR
Module error: Don't know how to REQUIRE SOCKETS.
Error flushed.
So I manually loaded SOCKETS.
(load #P"C:/msys64/usr/local/sockets.fas")
;;; Loading "C:/msys64/usr/local/sockets.fas"
#P"C:/msys64/usr/local/sockets.fas"
Then I tried again and I was able to progress further.
(load "quicklisp.lisp")
;;; Loading "C:/msys64/home/Admin/quicklisp.lisp"
==== quicklisp quickstart 2015-01-28 loaded ====
To continue with installation, evaluate: (quicklisp-quickstart:install)
For installation options, evaluate: (quicklisp-quickstart:help)
#P"C:/msys64/home/Admin/quicklisp.lisp"
(quicklisp-quickstart:install)
Debugger received error of type: SIMPLE-ERROR
Quicklisp has already been installed. Load #P"C:/msys64/home/Admin/quicklisp/setup.lisp" instead.
Error flushed.
Bu the following error appeared that I don't know how to solve.
(load #P"C:/msys64/home/Admin/quicklisp/setup.lisp")
;;; Loading "C:/msys64/home/Admin/quicklisp/setup.lisp"
Debugger received error of type: SIMPLE-ERROR
Could not load ASDF "3.0" or newer
Error flushed.
I tried loading the other ".fas" files in "/usr/local" such as "asdf.fas" but that did not help.
I checked the *features* variable in both versions but they were the same.
$ ./a.exe
...
Condition of type: INTERACTIVE-INTERRUPT
Console interrupt.
Available restarts:
- (CONTINUE) CONTINUE
...
(print-list *features*)
(WALKER ECL-BYTECMP CDR-1 CDR-5 FORMATTER CDR-7 WSOCK ECL-WEAK-HASH LITTLE-ENDIAN LONG-LONG UINT64-T UINT32-T UINT16-T COMPLEX-FLOAT LONG-FLOAT UNICODE DFFI CLOS-STREAMS CMU-FORMAT WINDOWS WIN32 MINGW32 ECL-PDE DLOPEN CLOS THREADS BOEHM-GC ANSI-CL COMMON-LISP IEEE-FLOATING-POINT PACKAGE-LOCAL-NICKNAMES CDR-14 PREFIXED-API FFI I686 COMMON ECL)
$ /usr/local/ecl.exe ...> (print-list *features*) (WALKER ECL-BYTECMP CDR-1 CDR-5 FORMATTER CDR-7 WSOCK ECL-WEAK-HASH LITTLE-ENDIAN LONG-LONG UINT64-T UINT32-T UINT16-T COMPLEX-FLOAT LONG-FLOAT UNICODE DFFI CLOS-STREAMS CMU-FORMAT WINDOWS WIN32 MINGW32 ECL-PDE DLOPEN CLOS THREADS BOEHM-GC ANSI-CL COMMON-LISP IEEE-FLOATING-POINT PACKAGE-LOCAL-NICKNAMES CDR-14 PREFIXED-API FFI I686 COMMON ECL)
Best regards,
Binh Nguyen