Menu

#688 readline-7.0: rl_readline_state changed to unsigned long

build problems
closed-fixed
None
5
2017-02-26
2016-09-20
No

In readline-7.0, the extern variable rl_readline_state changed from int to unsigned long. This breaks compilation of clisp-2.49 with readline enabled because the expected size/alignment does not match the actual one (at least on NetBSD-7.99.38/amd64).
The fix is easy, just replace the expected type with ulong. I'm not sure how you can handle backwards compatibility to readline<7 though, I'll leave that up to you.

1 Attachments

Discussion

  • Alvis Yardley

    Alvis Yardley - 2017-02-14

    Same problem here:

    1. uname -a : Linux [comp name] 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_64 x86_│NABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I. -fPIC -Wl,--export-dynamic modules.o readline.o -lrea
      64 x86_64 GNU/Linux
      system : Distributor ID: Ubuntu
      Description: Ubuntu 16.10
      Release: 16.10
      Codename: yakkety
    2. source : https://ftp.gnu.org/pub/gnu/clisp/release/latest/clisp-2.49.tar.gz
    3. build : ./configure --cbc build
    4. No output from "clisp --version" because it fails to "make".
    5. Output of error messages:
      base/lisp.run -B . -M base/lispinit.mem -norc -q -i i18n/i18n -i syscalls/posix -i regexp/regexp -i readline/readline -x (saveinitmem "base/lispinit.mem")
      ;; Loading file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/i18n/i18n.fas ...
      ;; Loaded file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/i18n/i18n.fas
      ;; Loading file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/syscalls/posix.fas ...
      ;; Loaded file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/syscalls/posix.fas
      ;; Loading file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/regexp/regexp.fas ...
      ;; Loaded file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/regexp/regexp.fas
      ;; Loading file /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc/readline/readline.fas ...
      *** - FFI::FIND-FOREIGN-VARIABLE: foreign variable #<foreign-variable "rl_readline_state"="" #x00007f4803ecd030=""> does not have the required size or alignment
      ./clisp-link: failed in /home/alvis/projects/repos/clisp-bug-report/clisp-2.49/build-with-gcc
      Makefile:2597: recipe for target 'base' failed make: *** [base] Error 1</foreign-variable>

    Note: I have submitted this bug report only because it is the same but, but on a different platform.

     
  • Bruno Haible

    Bruno Haible - 2017-02-26

    Thanks for the report. This is now fixed in the hg repository.
    Patch attached.

     
  • Bruno Haible

    Bruno Haible - 2017-02-26
    • status: open --> closed-fixed
    • assigned_to: Bruno Haible
     

Log in to post a comment.

MongoDB Logo MongoDB