Corman Lisp Discussion Groups Forum Index Corman Lisp Discussion Groups
For discussing Corman Lisp topics, and other programming topics
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

compile-file and load of .fasl errors
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Corman Lisp Discussion Groups Forum Index -> Technical Issues
View previous topic :: View next topic  
Author Message
klw



Joined: 23 Dec 2003
Posts: 14

PostPosted: Mon Jan 12, 2004 7:21 pm    Post subject: compile-file and load of .fasl errors Reply with quote

(compile-file "asdf.lisp")
(load *)

Incidentially here, you can not say (load "asdf") it doesn't understand to look for .fasl files in that case. From the Hyperspec it appears it should, there is code out there that expects this behavior.

after (load "asdf.fasl")

;;; An error occurred in function STACK-TRACE:
;;; Error: #<Win32:Memory-Access-Violation-Error #x69CDB0>
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1 Abort to top level.


I see this problem described here:
http://groups.yahoo.com/group/cormanlisp/message/363

In reference to defstructs. I have tested compiling, and loading, a file with a defstruct and that seems to be fine. But just about another substantial piece of lisp code I try to send through compile-file and then subsequently load crashes.

-klw
Back to top
View user's profile Send private message
klw



Joined: 23 Dec 2003
Posts: 14

PostPosted: Mon Jan 12, 2004 7:43 pm    Post subject: more... Reply with quote

Off of a fresh invocation of clconsole I get:

?(load "asdf.fasl")
;;; An error occurred in function INTERN:
;;; Error: Invalid package: NIL
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1 Abort to top level.
Back to top
View user's profile Send private message
ljcrook



Joined: 31 Dec 2003
Posts: 95
Location: California

PostPosted: Wed Jan 14, 2004 9:41 am    Post subject: Reply with quote

I am able to compile and load my opengl gears demo successfully using:
Code:
(compile-file "SDL_examples_1_4 (gears).lisp" :output-file "SDL_examples_1_4 (gears).fasl" :verbose t :print t)

and
Code:
(load "SDL_examples_1_4 (gears).fasl")


. Running
Code:
(load "SDL_examples_1_4 (gears).fasl" :print t)

in Corman Lisp 2.5 returns:
Code:

NIL
NIL
NIL

GLFLOAT-4
*WORLD-TICKS*
*TIMESCALE*
*FPS-DISPLAY-INTERVAL*
*MOVE-DELAY*
*SCREEN-WIDTH*
*SCREEN-HEIGHT*
*OPENGL-ATTRIBUTES*
....
....
MOVE-OBJECTS
DRAW-OBJECTS
DRAW-SCREEN
SETUP-OPENGL
CREATE-DISPLAY-LISTS
OPENGL-EXAMPLE-1
40

But I am unable to run (OPENGL-EXAMPLE-1) for some reason.
Code:

;;; An error occurred in function #< COMPILED-FUNCTION: #xF06E58 >:
;;; Error: The function OPENGL-EXAMPLE-1 is undefined

Which may indicate a problem, although I am leaning to something that I left out.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
rgcorman
Site Admin


Joined: 08 Dec 2003
Posts: 282
Location: Santa Rosa, CA, USA

PostPosted: Fri Jan 16, 2004 10:05 am    Post subject: Reply with quote

Regarding klw's issue:

As far as I know all the problems with COMPILE-FILE and structures, referenced in that two-year old thread, have been addressed some time ago. Do you have a file you could send me which demonstrates a problem loading (after compiling)?

Regading Luke's issue:
Usually the cause of that problem is when you do a LOAD, the *package* is not changed i.e. whatever the loaded file sets it to, it reverts back after LOAD completes. This is normal and expected behavior I believe.

The error message probably indicates you need to add the package qualifier to the function call.

There may still be some issues with COMPILE-FILE, and I would appreciate anybody sending me a sample of a file that causes it to fail. Note however that there is a known issue: COMPILE-FILE actually executes the forms it is compiling. Therefore the side-effect of COMPILE-FILE is that the file being compiled is loaded (as with LOAD). I don't believe this is correct behavior, but is generally easy to work with. It might be a problem if you have a file you are compiling which does load-time side-effects and which does not expect to be executed more than once.
_________________
Roger Corman
www.cormanlisp.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
klw



Joined: 23 Dec 2003
Posts: 14

PostPosted: Tue Jan 20, 2004 1:09 pm    Post subject: example file to test compile-file and load Reply with quote

It is ASDF
Back to top
View user's profile Send private message
nhabedi



Joined: 08 Dec 2003
Posts: 36
Location: Hamburg, Germany

PostPosted: Tue May 04, 2004 5:56 am    Post subject: Reply with quote

rgcorman wrote:
There may still be some issues with COMPILE-FILE, and I would appreciate anybody sending me a sample of a file that causes it to fail.


Here's a simple example. Use a file foo.lisp that looks like this:

(in-package "CL-USER")

(defpackage "FOO"
(:use "CL")
(:export "BAR"))

COMPILE-FILE this file and then execute it via the "Lisp" Menu of the IDE - use a freshly started Corman Lisp for the last step if you want. I get (version 2.5, fully patched):

;;; An error occurred in function STACK-TRACE:
;;; Error: #<Win32:Memory-Access-Violation-Error #xD8A960>
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1 Abort to top level.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
rgcorman
Site Admin


Joined: 08 Dec 2003
Posts: 282
Location: Santa Rosa, CA, USA

PostPosted: Mon May 10, 2004 2:05 pm    Post subject: Reply with quote

Thanks for the very simple example, which made it easy to track down the problem. The culprit is DEFPACKAGE, and its macro expansion causes literal package references to get compiled into the code. Packages cannot be handled as literals without weird run time problems so this breaks when you try to load it (and creates very large fasl files, with the entire common lisp package).

I fixed DEFPACKAGE and uploaded a patch, the file is defpackage.lisp. Se the readme file for instructions on updating your system.

http://www.cormanlisp.com/CormanLisp/patches/2_5/

Sorry for the inconvenience this has caused.

Roger
_________________
Roger Corman
www.cormanlisp.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nhabedi



Joined: 08 Dec 2003
Posts: 36
Location: Hamburg, Germany

PostPosted: Thu May 13, 2004 6:13 am    Post subject: FASL load still broken Reply with quote

Hi Roger!

Thanks for the quick fix.

However, there are still issues with the FASL loader. One example is my CL-PPCRE library which works fine (except for a couple of messages during compilation) if I just LOAD the files but which ceases to work if I COMPILE-FILE and then LOAD the FASL files.

I'll try to come up with a shorter example but that'll need some time.

For the moment, I'd still recommend to push :BROKEN-FASL-LOADER on *FEATURES* if someone is going to use ASDF with CCL.

Thanks,
Edi.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ljcrook



Joined: 31 Dec 2003
Posts: 95
Location: California

PostPosted: Mon Oct 04, 2004 4:13 pm    Post subject: Re: FASL load still broken Reply with quote

nhabedi wrote:

For the moment, I'd still recommend to push :BROKEN-FASL-LOADER on *FEATURES* if someone is going to use ASDF with CCL.


Hi Edi,

I am experiencing the following errors when attempting to get ASDF working under CCL from your instructions...

Code:

asdf:oos 'asdf:load-op :cl-ppcre)
; loading system definition from
; #P"C:\Lisp\libs\cl-ppcre-x.y.z\cl-ppcre.asd" into
; #<PACKAGE "ASDF7451">

; registering #<SYSTEM #:CL-PPCRE #xDAD830> as CL-PPCRE
;;; Warning: Symbol +WHITESPACE-CHAR-STRING+ assumed special
;;; Warning: Unused variable G7520 in function MERGE-HASH, File C:\Lisp\libs\cl-ppcre-x.y.z\util.lisp, line 160
;;; Warning: Unused variable G7519 in function MERGE-HASH, File C:\Lisp\libs\cl-ppcre-x.y.z\util.lisp, line 160
;;; Warning: Unused variable G7551 in function CREATE-RANGES-FROM-HASH, File C:\Lisp\libs\cl-ppcre-x.y.z\util.lisp, line 197
;;; Warning: Unused variable G7550 in function CREATE-RANGES-FROM-HASH, File C:\Lisp\libs\cl-ppcre-x.y.z\util.lisp, line 197
;;; Warning: Unused variable G7634 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\specials.lisp, line 115
;;; Warning: Call to function TRY-NUMBER was not inlined because the
                        number of passed parameters did not match the number of
                        required arguments
;;; Warning: Unused variable G8073 in function CONVERT-AUX, File C:\Lisp\libs\cl-ppcre-x.y.z\convert.lisp, line 293
;;; Warning: Unused variable G8072 in function CONVERT-AUX, File C:\Lisp\libs\cl-ppcre-x.y.z\convert.lisp, line 293
;;; Warning: the following function(s) are called from forms
;;; in file "#P"C:\Lisp\libs\cl-ppcre-x.y.z\convert.lisp"" but have not yet been defined:
;;;     PARSE-TREE-SYNONYM
;;; Warning: Unused variable G8206 in function CREATE-MATCHER-AUX, File C:\Lisp\libs\cl-ppcre-x.y.z\closures.lisp, line 292
;;; Warning: Unused variable G8205 in function CREATE-MATCHER-AUX, File C:\Lisp\libs\cl-ppcre-x.y.z\closures.lisp, line 292
;;; Warning: Unused variable G8206 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 152
;;; Warning: Unused variable G8205 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 152
;;; Warning: Unused variable G8206 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 412
;;; Warning: Unused variable G8205 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 412
;;; Warning: Unused variable G8206 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 659
;;; Warning: Unused variable G8205 in function NIL, File C:\Lisp\libs\cl-ppcre-x.y.z\repetition-closures.lisp, line 659
;;; An error occurred in function DESTRUCTURE-BIND:
;;; Error: Invalid lambda list formation
;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1   Retry
    performing
         #<ASDF:LOAD-OP NIL #x17D5010>
         on
         #<ASDF:CL-SOURCE-FILE "api" #x1807AA0>.
;;; 2   Continue,
                                    treating
                                    #<ASDF:LOAD-OP NIL #x17D5010>
                                    on
                                    #<ASDF:CL-SOURCE-FILE "api" #x1807AA0>
                                    as
                                    having
                                    been
                                    successful.
;;; 3   Abort to top level.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
nhabedi



Joined: 08 Dec 2003
Posts: 36
Location: Hamburg, Germany

PostPosted: Mon Oct 04, 2004 11:55 pm    Post subject: Reply with quote

This seems to be a problem with CL-PPCRE, not with ASDF. Could you please try with an earlier version of CL-PPCRE (like 0.2.x or 0.3.x) and see if you still get these error messages? I suspect that one of the recent changes broke CCL compatibility 'cause I don't have the time to test each release against every supported Lisp.

BTW, the earlier messages are OK. Only the one that puts you into the debugger is serious.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ljcrook



Joined: 31 Dec 2003
Posts: 95
Location: California

PostPosted: Tue Jun 21, 2005 11:32 am    Post subject: Reply with quote

nhabedi wrote:
Could you please try with an earlier version of CL-PPCRE (like 0.2.x or 0.3.x) and see if you still get these error messages?


CL-PPCRE does not work in CCL 2.51

Send me the location of an earlier version of Cl-PPCRE and I'll try it out.

-Luke
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
nhabedi



Joined: 08 Dec 2003
Posts: 36
Location: Hamburg, Germany

PostPosted: Tue Jun 21, 2005 2:17 pm    Post subject: Reply with quote

Quote:
Send me the location of an earlier version of Cl-PPCRE and I'll try it out.


See the CL-PPCRE website where you'll find instructions on how to get older versions.

Cheers,
Edi.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ljcrook



Joined: 31 Dec 2003
Posts: 95
Location: California

PostPosted: Tue Jun 21, 2005 4:04 pm    Post subject: Reply with quote

Code:
http://weitz.de/files/cl-ppcre-<version>.tar.gz


I tried a number of versions indicated in the changelog, http://weitz.de/files/cl-ppcre-0.3.0.tar.gz , http://weitz.de/files/cl-ppcre-0.4.0.tar.gz

But I get a 404 error.

-Luke
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
nhabedi



Joined: 08 Dec 2003
Posts: 36
Location: Hamburg, Germany

PostPosted: Tue Jun 21, 2005 4:11 pm    Post subject: Reply with quote

Quote:
http://weitz.de/files/cl-ppcre-<version>.tar.gz


Actually, the website says:

Quote:
http://weitz.de/files/cl-ppcre-<version>.tar.gz (or ending in .tgz for 0.9.0 and older.)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
ljcrook



Joined: 31 Dec 2003
Posts: 95
Location: California

PostPosted: Tue Jun 21, 2005 4:44 pm    Post subject: Reply with quote

[quote="nhabedi"]Actually, the website says:

Quote:
http://weitz.de/files/cl-ppcre-<version>.tar.gz (or ending in .tgz for 0.9.0 and older.)


So it does Smile

Well, I have tried 0.3.0 and it seems to have entered an infinite loop.

Code:

;; Corman Lisp 2.51  Copyright © 2005 Corman Technologies. All rights reserved.
;; Licensed to Luke Crook [version 2.0].
(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal)
(#P"C:\Lisp\libs\")
(asdf:oos 'asdf:load-op :cl-ppcre)
; loading system definition from
; #P"C:\Lisp\libs\cl-ppcre\cl-ppcre.asd" into #<PACKAGE "ASDF7512">
; registering #<SYSTEM #:CL-PPCRE #xEB64A0> as CL-PPCRE
;;; Warning: Symbol +REGEX-CHAR-CODE-LIMIT+ assumed special
;;; Warning: Symbol +WHITESPACE-CHAR-STRING+ assumed special
;;; Warning: Unused variable G7554 in function MERGE-HASH, File C:\Lisp\libs\cl-ppcre\util.lisp, line 103
;;; Warning: Unused variable G7553 in function MERGE-HASH, File C:\Lisp\libs\cl-ppcre\util.lisp, line 103
;;; Warning: Unused variable G7584 in function CREATE-RANGES-FROM-HASH, File C:\Lisp\libs\cl-ppcre\util.lisp, line 119
;;; Warning: Unused variable G7583 in function CREATE-RANGES-FROM-HASH, File C:\Lisp\libs\cl-ppcre\util.lisp, line 119
;;; Warning: Unused variable G7921 in function CONVERT-AUX, File C:\Lisp\libs\cl-ppcre\convert.lisp, line 256
;;; Warning: Unused variable G7920 in function CONVERT-AUX, File C:\Lisp\libs\cl-ppcre\convert.lisp, line 256
;;; Warning: Unused variable G8062 in function CREATE-MATCHER-AUX, File C:\Lisp\libs\cl-ppcre\closures.lisp, line 289
;;; Warning: Unused variable G8061 in function CREATE-MATCHER-AUX, File C:\Lisp\libs\cl-ppcre\closures.lisp, line 289
;;; Warning: Symbol TEST assumed special
;;; Warning: Symbol TEST assumed special
;;; Warning: Unused variable G8062 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 152
;;; Warning: Unused variable G8061 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 152
;;; Warning: Unused variable G8062 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 412
;;; Warning: Unused variable G8061 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 412
;;; Warning: Unused variable G8062 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 659
;;; Warning: Unused variable G8061 in function NIL, File C:\Lisp\libs\cl-ppcre\repetition-closures.lisp, line 659


CCL has had the processor pegged at 100% for the past 5 minutes.

After breaking out, I receive the following error:

Code:

;;; Entering Corman Lisp debug loop.
;;; Use :C followed by an option to exit. Type :HELP for help.
;;; Restart options:
;;; 1   Retry performing #<ASDF:LOAD-OP NIL #x10502960> on
        #<ASDF:CL-SOURCE-FILE "api" #x1053B570>.
;;; 2   Continue, treating #<ASDF:LOAD-OP NIL #x10502960> on
        #<ASDF:CL-SOURCE-FILE "api" #x1053B570> as having been
        successful.
;;; 3   Abort to top level.


-Luke
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Corman Lisp Discussion Groups Forum Index -> Technical Issues All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group