sbcl windows can't load a dll

Bug #1597122 reported by Richard Fateman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Invalid
Undecided
Unassigned

Bug Description

See transcript below. FWIW, the same dll loads into Allegro CL, provides linkable entry points etc.
The mpfr.dll is a multi-precision floating-point / with rounding/ library.

If this doesn't provide enough info, I can post the 219kb file somewhere.

why do I care? Lots of similar libraries for numeric stuff potentially
useful for Maxima. None of them load. See nemocas.org for nice stuff.

Thanks for any hints!
Richard Fateman

..................

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

c:\Users\fateman\Desktop>sbcl.exe
sbcl.exe
This is SBCL 1.2.7, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.

WARNING: the Windows port is fragile, particularly for multithreaded
code. Unfortunately, the development team currently lacks the time
and resources this platform demands.
* t

T
* (load "c:/lisp/generic/mpfr.dll")

debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {2426EA61}>:
  READ error during LOAD:

    :CP1252 stream decoding error on
    #<SB-SYS:FD-STREAM for "file c:\\lisp\\generic\\mpfr.dll" {2427D5C9}>:
      the octet sequence #(144) cannot be decoded.

    (in form starting at line: 1, column: 0, file-position: 0)

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Abort loading file "c:\\lisp\\generic\\mpfr.dll".
  1: Exit debugger, returning to top level.

(SB-C:COMPILER-ERROR SB-C::INPUT-ERROR-IN-LOAD :CONDITION #<SB-INT:STREAM-DECODING-ERROR {2427F571}> :POSITION 0 :STREAM #<SB-SYS:FD-STREAM for "file c:\\lisp\\generic\\mpfr.dll" {2427D5C9}>)
0]

Revision history for this message
PuercoPop (pirata) wrote :

load is for lisp files. If you want to make avaiable a c library there you'd have to write a foreign function interface, as described in the manual[0]. Fortunately SBCL already comes with an interface for mpfr. All you have to do is require it, (require 'sb-mpfr) in the REPL to make it available.

[0]: http://www.sbcl.org/manual/#Foreign-Function-Interface

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.