#340 build error in ffi modules

build problems
closed-fixed
modules (18)
5
2014-08-20
2006-05-08
No

./configure --with-module=bindings/glibc --build build-O
....
/home/sds/src/clisp/current/build-O/lisp.run -M
/home/sds/src/clisp/current/build-O/lispinit.mem -B
/home/sds/src/clisp/current/build-O -N
/home/sds/src/clisp/current/build-O/locale -Efile UTF-8
-Eterminal UTF-8 -Emisc 1:1 -norc -q -c wrap.lisp
;; Compiling file
/home/sds/src/clisp/current/build-O/bindings/glibc/wrap.lisp
...
*** - EVAL: variable #:DEF-CALL-OUT-3311 has no value

0 errors, 0 warnings
gmake[1]: *** [wrap.fas] Error 1
gmake[1]: Leaving directory
`/home/sds/src/clisp/current/build-O/bindings/glibc'make:
*** [bindings/glibc] Error 2

$ ./clisp -v -v -norc -c bindings/glibc/wrap.lisp
i i i i i i i ooooo o ooooooo ooooo
ooooo
I I I I I I I 8 8 8 8 8
o 8 8
I \ `+' / I 8 8 8 8
8 8
\ `-+-' / 8 8 8 ooooo
8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam
Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2006

;; Compiling file
/home/sds/src/clisp/current/build-O/bindings/glibc/wrap.lisp
...
; (REQUIRE "linux")
<1> #<system-function EXT:SHOW-STACK> 3
<2> #<compiled-function SYSTEM::PRINT-BACKTRACE>
<3> #<compiled-function SYSTEM::REPORT-ERROR>
<4> #<compiled-function SYSTEM::EXITUNCONDITIONALLY>
<5> #<compiled-function SYSTEM::EXITONERROR>
<6> #<compiled-function EXT::SET-GLOBAL-HANDLER-1-1>
<7> #<compiled-function #:COMPILED-FORM-118-1>
<8> #<standard-generic-function SYSTEM::GLOBAL-HANDLER>
<9> #<standard-generic-function SYSTEM::GLOBAL-HANDLER>
<10> #<system-function signal> 1
<11> #<system-function error>
<12> #<compiled-function SYSTEM::CHECK-VALUE>
EVAL frame for form #:DEF-CALL-OUT-3311
EVAL frame for form (FFI::C-TYPE-TO-SIGNATURE
#:DEF-CALL-OUT-3311)
EVAL frame for form
(SYSTEM::C-DEFUN 'MODULE__LINUX__CONSTANT_MAP_INT
(FFI::C-TYPE-TO-SIGNATURE #:DEF-CALL-OUT-3311))
<13> #<system-function eval>
<14> #<compiled-function SYSTEM::EVAL-LOADED-FORM-LOW>
<15> #<compiled-function SYSTEM::EVAL-LOADED-FORM>
<16> #<compiled-function load>
<17> #<compiled-function SYSTEM::C-REQUIRE-LOAD-LIB>
<18> #<compiled-function SYSTEM::C-REQUIRE>
EVAL frame for form (SYSTEM::C-REQUIRE '"linux")
<19> #<special-operator progn>
EVAL frame for form (progn (SYSTEM::C-REQUIRE '"linux"))
<20> #<system-function eval>
<21> #<compiled-function SYSTEM::C-EVAL-AND-WRITE-LIB>
EVAL frame for form (SYSTEM::C-EVAL-AND-WRITE-LIB
'(progn (SYSTEM::C-REQUIRE '"linux")))
<22> #<special-operator progn>
EVAL frame for form (progn
(SYSTEM::C-EVAL-AND-WRITE-LIB '(progn
(SYSTEM::C-REQUIRE '"linux"))))
Printed 22 frames
*** - EVAL: variable #:DEF-CALL-OUT-3311 has no value

0 errors, 0 warnings
Bye.

$ uname -a
Linux quant8 2.6.16-1.2096_FC5 #1 Wed Apr 19 05:15:21
EDT 2006 i686 i686 i386 GNU/Linux

Discussion

  • Sam Steingold

    Sam Steingold - 2006-05-30

    Logged In: YES
    user_id=5735

    current cvs head:

    ;; Compiling file
    /usr/local/src/clisp/current/build-g/bindings/glibc/wrap.lisp
    ...
    ; (REQUIRE "linux")
    Segmentation fault
    (gdb) where
    #0 frame_up_4 (stackptr=0xb7f04038) at debug.d:771
    #1 0x080ea9ef in C_show_stack () at debug.d:1507
    #2 0x0805ae09 in funcall_subr (fun={one_o = 136040438},
    args_on_stack=3)
    at eval.d:5338
    #3 0x080661ac in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7017
    #4 0x080687cb in funcall_closure (closure={one_o =
    558687022}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5760
    #5 0x08064826 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7029
    #6 0x08068492 in funcall_closure (closure={one_o =
    558653830}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #7 0x080647c7 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7023
    #8 0x08068492 in funcall_closure (closure={one_o =
    558653910}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #9 0x080647c7 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7023
    #10 0x08068492 in funcall_closure (closure={one_o =
    558653966}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #11 0x08064939 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7085
    #12 0x08068492 in funcall_closure (closure={one_o =
    558929454}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #13 0x08064939 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7085
    #14 0x08068492 in funcall_closure (closure={one_o =
    559463334}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #15 0x08066cfd in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:6754
    #16 0x08068492 in funcall_closure (closure={one_o =
    558654702}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #17 0x08066cde in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:8143
    #18 0x08068492 in funcall_closure (closure={one_o =
    558654702}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #19 0x0806b19b in invoke_handlers (cond={one_o = 559448542})
    at eval.d:732
    #20 0x080ec6f6 in C_clcs_signal (argcount=0,
    rest_args_pointer=0xb7ea3894)
    at error.d:775
    #21 0x0805aebd in funcall_subr (fun={one_o = 136041302},
    args_on_stack=0)
    at eval.d:5333
    #22 0x080ec554 in signal_and_debug (condition=Variable
    "condition" is not available.
    ) at error.d:204
    #23 0x080f0564 in C_error (argcount=0,
    rest_args_pointer=0xb7ea3878)
    at error.d:495
    #24 0x08064599 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7047
    #25 0x08068492 in funcall_closure (closure={one_o =
    558646022}, args_on_stack=Variable "args_on_stack" is not
    available.
    )
    at eval.d:5779
    #26 0x0805d371 in eval1 (form=Variable "form" is not available.
    ) at eval.d:2984
    #27 0x0805e84e in eval (form={one_o = 559447718}) at eval.d:2907
    #28 0x0805da0b in eval1 (form=Variable "form" is not available.
    ) at eval.d:3638
    #29 0x0805e84e in eval (form={one_o = 1749557722}) at
    eval.d:2907
    #30 0x0805e42a in eval1 (form=Variable "form" is not available.
    ) at eval.d:3669
    #31 0x0805e84e in eval (form={one_o = 1749557770}) at
    eval.d:2907
    #32 0x0805f38a in eval_5env (form={one_o = 1749557770}, var_env=
    {one_o = 136066270}, fun_env={one_o = 136066270},
    block_env=
    {one_o = 136066270}, go_env={one_o = 136066270}, decl_env=
    {one_o = 1750005106}) at eval.d:1024
    #33 0x0805f3d6 in eval_noenv (form={one_o = 1749557770}) at
    eval.d:1036
    #34 0x0806caa1 in C_eval () at control.d:2163
    ---Type <return> to continue, or q <return> to quit---
    #35 0x08064454 in interpret_bytecode_ (closure=Variable
    "closure" is not available.
    ) at eval.d:7035

     
  • Jörg Höhle

    Jörg Höhle - 2006-05-31

    Logged In: YES
    user_id=377168

    Do you mean that between 05-08 and 05-29 CVS was modified in
    such a way that the ./configure -build now segfaults as
    shown, on the otherwise identical machine?

    The Lisp error is caused by the 2006-01-30 change.
    COMPILER::EVAL-WHEN-COMPILE is also used when writing the
    .LIB file. When loading the .LIB file, information that was
    present during compilation is not available any more,
    causing the #:def-call-out unbound symbol-value error.

    (EXT:COMPILER-LET ((,def ,ctype))
    (COMPILER::EVAL-WHEN-COMPILE
    (COMPILER::C-DEFUN ',name (C-TYPE-TO-SIGNATURE ,def))))
    I didn't think about provide/require interaction back then.
    DEF-CALL-OUT needs another mechanism to let CLISP know
    about the foreign function's signature that works for a .LIB

     
  • Sam Steingold

    Sam Steingold - 2006-05-31

    Logged In: YES
    user_id=5735

    to get a crash you need to pass "-v -v -v"

     
  • Jörg Höhle

    Jörg Höhle - 2006-06-01

    Logged In: YES
    user_id=377168

    The sigsegv bug is independent and equally raised by an
    attempt to compile the following via -v -v -v -c
    (eval-when (compile) (barf))
    Possibly the error handling system is not fully set up.
    A single -v is enough to crash in this scenario.
    Actually, -v is not needed when you start from a .mem that
    has CUSTOM:*REPORT-ERROR-PRINT-BACKTRACE* true.
    Then, -x '(compile-file "bindings/glibc/foo.lisp")' also
    crashes.
    In other words, ./lisp.run ... -v -x '(barf)' crashes as well.

     
  • Sam Steingold

    Sam Steingold - 2006-06-01

    Logged In: YES
    user_id=5735

    I do not observe this:

    $ clisp -norc -v -v -x '(barf)'
    i i i i i i i ooooo o ooooooo ooooo ooooo
    I I I I I I I 8 8 8 8 8 o 8 8
    I \ `+' / I 8 8 8 8 8 8
    \ `-+-' / 8 8 8 ooooo 8oooo
    `-__|__-' 8 8 8 8 8
    | 8 o 8 8 o 8 8
    ------+------ ooooo 8oooooo ooo8ooo ooooo 8

    Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
    Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
    Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam
    Steingold 1998
    Copyright (c) Bruno Haible, Sam Steingold 1999-2000
    Copyright (c) Sam Steingold, Bruno Haible 2001-2006

    <1> #<SYSTEM-FUNCTION SHOW-STACK> 3
    <2> #<COMPILED-FUNCTION SYSTEM::PRINT-BACKTRACE>
    <3> #<COMPILED-FUNCTION SYSTEM::REPORT-ERROR>
    <4> #<COMPILED-FUNCTION SYSTEM::EXITUNCONDITIONALLY>
    <5> #<COMPILED-FUNCTION SYSTEM::EXITONERROR>
    <6> #<COMPILED-FUNCTION EXT::SET-GLOBAL-HANDLER-1-1>
    <7> #<COMPILED-FUNCTION #:COMPILED-FORM-117-1>
    <8> #<STANDARD-GENERIC-FUNCTION SYSTEM::GLOBAL-HANDLER>
    <9> #<STANDARD-GENERIC-FUNCTION SYSTEM::GLOBAL-HANDLER>
    <10> #<SYSTEM-FUNCTION SIGNAL> 1
    <11> #<SYSTEM-FUNCTION ERROR>
    <12> #<COMPILED-FUNCTION SYSTEM::CHECK-VALUE>
    EVAL frame for form (BARF)
    Printed 12 frames
    *** - EVAL: undefined function BARF

    Bye.

    if you do, please file a separate bug report about the crash
    and let us keep this item devoted to the build failure.

     
  • Sam Steingold

    Sam Steingold - 2006-06-14

    Logged In: YES
    user_id=5735

    thank you for your bug report.
    the bug has been fixed in the CVS tree.
    you can either wait for the next release (recommended)
    or check out the current CVS tree (see http://clisp.cons.org\)
    and build CLISP from the sources (be advised that between
    releases the CVS tree is very unstable and may not even build
    on your platform).

     
  • Sam Steingold

    Sam Steingold - 2006-06-14
    • status: open --> closed-fixed
     
  • Sam Steingold

    Sam Steingold - 2006-06-14
    • assigned_to: hoehle --> sds
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks