newlisp on AMD64

Started by newdep, December 19, 2005, 05:14:44 AM

Previous topic - Next topic

newdep

#15
Seems the newlisp.so compiled on amd64 is hehaving a little strange ->

(compiled using the makefile_linux64_lib, no errors!)



newLISP v.8.7.5 on linux, execute 'newlisp -h' for more info.



> (import "./newlisp.so" "newlispEvalStr")

newlispEvalStr <556E2240>

> (newlispEvalStr "(+ 2 2)")

134923456

> (get-string (newlispEvalStr "(+ 2 2)"))

""

>





> (unpack "s2"  (newlispEvalStr "(+ 2 2)"))

("0000")

>





I just tested this under a fresh 32b slackware and does also not run, so probably I doing something wrong ;-)
-- (define? (Cornflakes))

Lutz

#16
Again, this seems to be specific to your compile on the slcakware amd64 platform. I cannot repeat this on the amd64 sourceforge machine.



Lutz

newdep

#17
Hi Lutz,



I dropped the slamd64 for now... this error is on a slackware 10.2 32Bits machine.!!



newLISP v.8.7.5 on linux, execute 'newlisp -h' for more info.



> (import "./newlisp.so" "newlispEvalStr")

newlispEvalStr <40241D10>

> (get-string (newlispEvalStr "(+ 2 2)"))

""

>



/newlisp-8.7.5$ldd ./newlisp

        libm.so.6 => /lib/libm.so.6 (0x4002d000)

        libdl.so.2 => /lib/libdl.so.2 (0x40051000)

        libreadline.so.4 => /usr/lib/libreadline.so.4 (0x40055000)

        libncurses.so.5 => /lib/libncurses.so.5 (0x40081000)

        libc.so.6 => /lib/libc.so.6 (0x400c0000)

        /lib/ld-linux.so.2 (0x40000000)

        libgpm.so.1 => /lib/libgpm.so.1 (0x401d9000)



/newlisp-8.7.5$ldd ./newlisp.so

        libm.so.6 => /lib/libm.so.6 (0x40052000)

        libdl.so.2 => /lib/libdl.so.2 (0x40076000)

        libc.so.6 => /lib/libc.so.6 (0x4007a000)

        /lib/ld-linux.so.2 (0x80000000)



/newlisp-8.7.5$cat makefile_linux

# makefile for newLISP v. 8.x.x on LINUX

#

# Note, that readline support may require different libraries on different OSs

#



OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o

        nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o



CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DREADLINE -DLINUX

#CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX



CC = gcc





default: $(OBJS)

#       $(CC) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp

        $(CC) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp

#       $(CC) $(OBJS) -g -lm -ldl -o newlisp

        strip newlisp



.c.o:

        $(CC) $(CFLAGS) $<



$(OBJS): primes.h protos.h makefile_linux







/newlisp-8.7.5$cat makefile_linux_lib

# makefile for newLISP v. 8.x.x on LINUX as a shared library - newlisp.so -

#

# Note, that readline support may require different libraries on different OSs

#



OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o

        nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o unix-lib.o



CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -DLINUX -DLIBRARY



CC = gcc



default: $(OBJS)

        $(CC) $(OBJS) -lm -ldl -shared -o newlisp.so

        strip newlisp.so



.c.o:

        $(CC) $(CFLAGS) $<



$(OBJS): primes.h protos.h makefile_linux_lib







--- no errors during compilation...





Hope you have a hint ;-)





regards, Norman
-- (define? (Cornflakes))

Lutz

#18
I just cannot repeat this, everything is fine on Debian and Fedora:

Linux 2.6 on Debian 3.1

newLISP v.8.7.5 on linux, execute 'newlisp -h' for more info.

> (import "./newlisp.so" "newlispEvalStr")
newlispEvalStr <401B39F0>
> (newlispEvalStr "(+ 3 4)")
134902984
> (get-string (newlispEvalStr "(+ 3 4)"))
"7n"
>

Linux 2.6 on Fedora FC2

newLISP v.8.7.5 on linux, execute 'newlisp -h' for more info.

> (import "./newlisp.so" "newlispEvalStr")
newlispEvalStr <710928>
> (get-string (newlispEvalStr "(+ 3 4)"))
"7n"
> (get-string (newlispEvalStr "(+ 2 2)"))
"4n"
>


I wonder if this is specific to Slackware, which is hard to imagine.



Lutz

Lutz

#19
... and FreeBSD 4.9 is fine too:

newLISP v.8.7.5 on BSD, execute 'newlisp -h' for more info.

> (import "./newlisp.so" "newlispEvalStr")
newlispEvalStr <281D6C28>
> (get-string (newlispEvalStr "(+ 3 4)"))
"7n"
>


Lutz

newdep

#20
I cant explain the problem, Pjot looked at my machine and had the same

problem in MY newlisp directory but not in His directory..



Problem is solved it works..BUT problem source is unknown...



Lets have a beer! ;-)



regards, Norman.
-- (define? (Cornflakes))

newdep

#21
'make clean' does wonders inbetween linux and linux_lib...



That explains why i had troubles with my last codes and import.. I was

always running an old newlisp.so... Snif snif...
-- (define? (Cornflakes))

Lutz

#22
... have one for me too ;)



Lutz



ps: sipping on my 'Cuba Libre'

newdep

#23
Your a Lucky Man !!!



Last year I was in Cuba for a month and I could not resist the Cuba-Libres ;-)



Enjoy!
-- (define? (Cornflakes))

pjot

#24
This was a nice problem! Enjoyed hacking it.... now I'm on a "Forbidden Fruit' beer, which I still owe you... ;-)

newdep

#25
I have here a GROLSCH "Weizen" A German Weizen OEM ;-)
-- (define? (Cornflakes))

cormullion

#26
I wasn't able to reply yesterday - too much demand for the computer in this house! ;-)



But a lovely bottle of "Leffe" was a great alternative ...



will return to more Lisp in the New Year, after hangover has disappeared...