Lisp HUG Maillist Archive

lispworks ide cannot open

Hello.

I got this error when running lispworks. I am using lispworks professional edition.  My platform is CentOS 5.  Anyone pls help me to solve this problem.

Error: Could not register handle for external module X-UTILITIES::CAPIX11:
 libXm.so.3: cannot open shared object file: No such file or directory.
  1 (abort) Quit process.

Re: lispworks ide cannot open

strace lispworks | grep libXm

You should see one or more locations where it's trying to open libXm.so.3. At that location (one of those locations), make a symbolic link to the place where you actually have libXm.so.3 ..

Jeff Caldwell


On 9/10/07, aus firdaus <firdaus19@gmail.com> wrote:
Hello.

I got this error when running lispworks. I am using lispworks professional edition.  My platform is CentOS 5.  Anyone pls help me to solve this problem.

Error: Could not register handle for external module X-UTILITIES::CAPIX11:
 libXm.so.3: cannot open shared object file: No such file or directory.
  1 (abort) Quit process.

Bit array should be local - acting global

After it is compiled and the first time the function below is called, it
correctly prints #*00000000 as the value of the local b-array.  When it is
run again, it incorrectly returns #*00010000.  There seems to be a problem
with a bit array inside a let not being local.
 
(defun bit-array-test ()
  (let ((b-array #8*0))
    (format t "b-array = ~A~%" b-array)
    (setf (sbit b-array 3) 1)))
 
 
Mitch


Re: Bit array should be local - acting global

... this, no doubt, gets into the can of worms regarding "deep" versus "shallow" copies...

David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com
Skype: dbmcclain



Re: Bit array should be local - acting global

This happens also if you initialize a sequence to any constant value

(defun tst ()
(let ((b "hello"))
(print b)
(setf (char b 0) #\H)))

You probably need to ensure that you make a copy of any constant initializer. The local appears to merely point at whatever you init with.

Don't know if this violates spec or not, but it does appear to be reasonable behavior...

David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ  85750

email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://www.refined-audiometrics.com
Skype: dbmcclain


On Sep 10, 2007, at 09:39, Mitch Berkson wrote:


After it is compiled and the first time the function below is called, it
correctly prints #*00000000 as the value of the local b-array.  When it is
run again, it incorrectly returns #*00010000.  There seems to be a problem
with a bit array inside a let not being local.

(defun bit-array-test ()
  (let ((b-array #8*0))
    (format t "b-array = ~A~%" b-array)
    (setf (sbit b-array 3) 1)))


Mitch



Re: Bit array should be local - acting global

Mitch Berkson wrote:

> After it is compiled and the first time the function below is called, it
> correctly prints #*00000000 as the value of the local b-array.  When it is
> run again, it incorrectly returns #*00010000.  There seems to be a problem
> with a bit array inside a let not being local.
>(defun bit-array-test ()
>   (let ((b-array #8*0))
>     (format t "b-array = ~A~%" b-array)
>     (setf (sbit b-array 3) 1)))

You're modifying a literal, which is a no-no.  Demons flying out of noses,
etcetera.  In this case, I suppose that wrapping a COPY-SEQ around the
literal should do what you need.

Arthur


RE: Bit array should be local - acting global

> -----Original Message-----
> From: Arthur Lemmens [mailto:alemmens@xs4all.nl] 
> Sent: Monday, September 10, 2007 1:23 PM
> To: Mitch Berkson; lisp-hug@lispworks.com
> Subject: Re: Bit array should be local - acting global
> 
> Mitch Berkson wrote:
> 
> > After it is compiled and the first time the function below 
> is called, 
> >it  correctly prints #*00000000 as the value of the local b-array.  
> >When it is  run again, it incorrectly returns #*00010000.  
> There seems 
> >to be a problem  with a bit array inside a let not being local.
> >(defun bit-array-test ()
> >   (let ((b-array #8*0))
> >     (format t "b-array = ~A~%" b-array)
> >     (setf (sbit b-array 3) 1)))
> 
> You're modifying a literal, which is a no-no.  Demons flying 
> out of noses, etcetera.  In this case, I suppose that 
> wrapping a COPY-SEQ around the literal should do what you need.

Then, I am unclear about why this works without the literal issue:

(defun let-test ()
    (let ((num 7))
    (format t "num = ~A~%" num)
    (setf num -5)))

Mitch


Re: Bit array should be local - acting global

Mitch Berkson wrote:

>> >(defun bit-array-test ()
>> >   (let ((b-array #8*0))
>> >     (format t "b-array = ~A~%" b-array)
>> >     (setf (sbit b-array 3) 1)))
>>
>> You're modifying a literal, which is a no-no.  Demons flying
>> out of noses, etcetera.  In this case, I suppose that
>> wrapping a COPY-SEQ around the literal should do what you need.
>
> Then, I am unclear about why this works without the literal issue:
>
> (defun let-test ()
>     (let ((num 7))
>     (format t "num = ~A~%" num)
>     (setf num -5)))

In this case you're not modifying a literal (i.e. you're not
modifying the number 7), but you're changing the value of a
binding (NUM in this case).  That's no problem.

Doing

   (defun bit-array-test ()
      (let ((b-array #8*0))
        (format t "b-array = ~A~%" b-array)
        (setf b-array #8*1)))

is no problem either.

If this is still not clear, you may want to ask for more advice
on comp.lang.lisp.  This is not a bug, and it's not specific to
Lispworks.  It's how Common Lisp works.

Arthur




Re: Bit array should be local - acting global

On 10 Sep 2007, at 18:58, Mitch Berkson wrote:


>
> Then, I am unclear about why this works without the literal issue:
>
> (defun let-test ()
>     (let ((num 7))
>     (format t "num = ~A~%" num)
>     (setf num -5)))

Because you're not modifying a literal.  Indeed, numbers in CL are  
immutable and can't be modified, but even if they could be (which  
would be weird, but one could see uses for it for things which dealt  
with bignums a lot) this code would not be modifying a literal any  
more than this would:

(let ((x "foo"))
   (print x)
   (setf x "bar")
   (print x))

The only time you're modifying an object is when the object has  
modifiable parts (like arrays, conses, but unlike numbers, say) and  
when you're performing some modification to one of those parts.

The reason this matters in CL more than most languages is that it  
actually *has* literals for potentially any class of object, and it  
is an unreasonable constraint on the compiler to detect this for all  
objects.

--tim


Re: Bit array should be local - acting global

On 10 Sep 2007, at 17:39, Mitch Berkson wrote:

>
> After it is compiled and the first time the function below is  
> called, it
> correctly prints #*00000000 as the value of the local b-array.   
> When it is
> run again, it incorrectly returns #*00010000.  There seems to be a  
> problem
> with a bit array inside a let not being local.

Your code is broken.  Don't modify literals!

--tim


RE: Bit array should be local - acting global

Another example with just a plain list:

(defun let-test ()
  (let ((lst '(0 0)))
    (format t "lst = ~A~%" lst)
    (setf (first lst) 5)))

First time after compiling, prints "lst = (0 0)".  Subsequently prints "lst
= (5 0)". 

Mitch


Re: Bit array should be local - acting global

Mitch Berkson wrote:

> Another example with just a plain list:
>
> (defun let-test ()
>   (let ((lst '(0 0)))
>     (format t "lst = ~A~%" lst)
>     (setf (first lst) 5)))
>
> First time after compiling, prints "lst = (0 0)".  Subsequently prints "lst
> = (5 0)".

Right.  Another case of modifying a literal.  Depending on the phase
of the moon, this may or may not cause the same demons to fly out of
your nose.

Arthur


AW: Bit array should be local - acting global



> ... Depending on 
> the phase of the moon, this may or may not cause the same 
> demons to fly out of your nose ...

LOL



Re: lispworks ide cannot open

Aus Firdaus,

I didn't notice that your previous message wasn't on the list. Here
are the missing exchanges:

Tq Jeff for reply.

Can u explain more detail because i cannot got that.

thanks
firdaus.


Sure, firdaus.

The strace command tracks sysem calls and prints out the parameters to
each one. Lispworks uses system calls when trying to find libXm.so.3.
Just prefix strace to your command that runs lispworks, e.g . I run
the very old lispworks-4300 so I do:

strace lispworks-4300

Use your version, of course. You'll get a lot of output, more than you
probably want to see. Use grep to filter out only the lines referring
to libXm. The command becomes:

strace lispworks-4300 2>&1 | grep libXm

and you'll see only lines referring to libXm. The 2>&1 redirects file
2 to file 1 because strace writes to file 2 while grep reads from file
1. That syntax is bash syntax, you'll need to figure out your own
shell's syntax or figure out how to use bash.

You should then see the system calls where lispworks is looking for
libXm. Lispworks is looking in one place and you have it in another
place.  You'll see where lispworks is looking in the strace output. To
find where you have it on your system, do something like:

locate libXm

or, if that didn't work,

find / -iname "libXm*"

Finally, cd to the directory where lispworks is looking for libXm and
create a symbolic link to the place where you actually have libXm.

ln -s <full-path-to-where-libXm.so.3
-really-is-including-libXm.so.3-name> libXm.so.3

Good luck.

Jeff Caldwell


On 9/10/07, aus firdaus <firdaus19@gmail.com> wrote:
> Hello
>
> i try to enter strace command but in centos 5 it not work. Then i try to find "locate libXm" and found the location of that file at /usr/X11R6/lib/libXm.so.3. and then try to create smbolic link as you told like this:
>
> ln - s /usr/X11R6/lib/libXm.so.3 libXm.so.3
>
> but it not work. The same error come out when running lispwork. Pls give some ideas because i'm afraid if i enter the wrong command.
>
> Thanks
> firdaus
>

Well, you have to know where to put the symbolic link. It has to go in
the place where lispworks is looking for it.  Go ahead and rm the link
you created, wherever that was, because it's not in the right place.

Why did strace not work? Please post the command you're entering and
the output that results, i.e. error messages or whatever. For me it
is:

bash-3.1$ strace lispworks-4300 -init x 2>&1 | grep libXm
open("/usr/lib/libXm.so.2", O_RDONLY)   = 3
open("/usr/lib/libXmu.so.6", O_RDONLY) = 3

but my version is Lispworks Pro is pretty old. Your Lispworks may
differ, maybe not. Were you in bash when you ran strace? Enter

bash
strace lispworks-4300 -init x 2>&1 | grep libXm

except use whatever lispworks-<version> you have. If your version is
still looking in /usr/lib, then become root and:

cd /usr/lib/libXm.so.3
 ln - s /usr/X11R6/lib/libXm.so.3 libXm.so.3

A book like Unix Power Tools might go a long way, teaching you to
understand enough to solve problems like this one.

If this doesn't fix it for you, please start posting the commands you
enter and the output you get.

Jeff Caldwell


Updated at: 2020-12-10 08:45 UTC