[elephant-devel] Fix the use of internal symbol of sb-kernel in memutils
Robert L. Read
read at robertlread.net
Tue Jan 8 21:52:12 UTC 2008
Thank you. I have committed this patch to the repository.
However, under sbcl on a x86_64 architecture, I have to build libmemutil
by hand, because of the errors below. I have no way to explain these.
After executing gcc by hand, it is not a problem.
This is the REPL error:
Implicitly creating new generic function ENQUEUE-OR-MOVE-TO-FRONT.
; $ gcc -shared -march=x86-64 -fPIC -Wall -O2
-g /home/read/projects/kbench/sql-back-end/elephant/src/memutil/libmemutil.c -o /home/read/projects/kbench/sql-back-end/elephant/src/memutil/libmemutil.so -lm
And this is the backtrace is below:
Unhandled memory fault at #x2AAAB1CB2000.
[Condition of type SB-SYS:MEMORY-FAULT-ERROR]
Restarts:
0: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL {100356DF51}> on
#<ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE "libmemutil" {100356DF71}>.
1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {100356DF51}> on
#<ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE "libmemutil" {100356DF71}> as having
been successful.
2: [ABORT] Return to SLIME's top level.
3: [TERMINATE-THREAD] Terminate this thread (#<THREAD
"repl-thread" {10030C1DA1}>)
Backtrace:
0: (SB-SYS:MEMORY-FAULT-ERROR)
1: (SB-SYS:MEMORY-FAULT-ERROR)
2: ("foreign function: #x41C312")
3: ("foreign function: #x41C3E0")
4: (SB-KERNEL:COPY-UB8-TO-SYSTEM-AREA
:INVALID-VALUE-FOR-UNESCAPED-REGISTER-STORAGE
0
#.(SB-SYS:INT-SAP #X2AAAB1CB1FF0)
0
19)
5: (SB-IMPL::STRING-LIST-TO-C-STRVEC
("PWD=/home/read/projects/kbench/sql-back-end/elephant/tests"
"TERM=dumb" "TERMCAP=" "COLUMNS=95" "EMACS=t"
"COLORTERM=gnome-terminal" "XAUTHORITY=/home/read/.Xauthority"
"G_BROKEN_FILENAMES=1" "DISPLAY=:0.0"
"LESSOPEN=|/usr/bin/lesspipe.sh %s" ...))
6: ((LAMBDA ()))
7: ((FLET SB-THREAD::%CALL-WITH-SYSTEM-MUTEX))
8: (SB-UNIX::CALL-ALLOWING-WITH-INTERRUPTS
#<CLOSURE (FLET SB-UNIX::ALLOW-WITH-INTERRUPTS-THUNK)
{2AAAB1A63549}>
T)
9: ((FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK) T)
10: ((FLET SB-UNIX::RUN-WITHOUT-INTERRUPTS))
11: (SB-UNIX::CALL-WITHOUT-INTERRUPTS
#<CLOSURE (FLET SB-UNIX::WITHOUT-INTERRUPTS-THUNK)
{2AAAB1A63729}>)
12: (SB-THREAD::CALL-WITH-SYSTEM-MUTEX
#<CLOSURE (LAMBDA #) {100418F859}>
#S(SB-THREAD:MUTEX
:NAME "Lock for active processes."
:%OWNER #<SB-THREAD:THREAD "repl-thread" {10030C1DA1}>
:STATE 1)
NIL)
13: (RUN-PROGRAM
"/bin/sh"
("-c"
"gcc -shared -march=x86-64 -fPIC -Wall -O2
-g /home/read/projects/kbench/sql-back-end/elephant/src/memutil/libmemutil.c -o /home/read/projects/kbench/sql-back-end/elephant/src/memutil/libmemutil.so -lm "))
14: (ASDF:RUN-SHELL-COMMAND "~A ~{~A ~}")
15: ((SB-PCL::FAST-METHOD ASDF:PERFORM
(ASDF:COMPILE-OP ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE))
#<unavailable argument>
#<unavailable argument>
#<ASDF:COMPILE-OP NIL {100356DF51}>
#<ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE "libmemutil" {100356DF71}>)
16: ((LAMBDA
(SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
SB-PCL::.ARG1.))
#<unavailable argument>
#<unavailable argument>
#<ASDF:COMPILE-OP NIL {100356DF51}>
#<ELEPHANT-SYSTEM:ELEPHANT-C-SOURCE "libmemutil" {100356DF71}>)
17: ((LAMBDA ()))
18: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK))
19: (SB-UNIX::CALL-WITH-LOCAL-INTERRUPTS
#<CLOSURE (FLET SB-UNIX::WITH-LOCAL-INTERRUPTS-THUNK)
{2AAAB1A63D39}>
T)
--more--
On Sat, 2007-12-29 at 22:24 -0200, Leonardo Varuzza wrote:
> Hello,
>
> I found a minor problem compiling memutil.lisp , because the
> functions sb-kernel::copy-*-from-system-area aren't exported in the
> latest version of sbcl.
>
> I made a little patch to fix it.
>
> Best Regards,
> Leonardo Varuzza.
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list