[racket-dev] Math library pushed

From: Ryan Culpepper (ryan at cs.utah.edu)
Date: Fri Nov 16 18:26:20 EST 2012

I get this message (during doc build, actually):

raco setup: error running: (lib math/scribblings/math.scrbl)
ffi-lib: couldn't open "libmpfr.so" (libmpfr.so: cannot open shared 
object file: No such file or directory)

I have /usr/lib/libmpfr.so.1, which is symlinked to 
/usr/lib/libmpfr.so.1.2.2. I expect that libmpfr.so (no version number) 
is provided by the development package.

I changed math/private/bigfloat/mpfr.rkt to use the following lines instead:

(define libgmp (lazy (ffi-lib "libgmp" '("" "3") #:get-lib-dirs 
get-lib-dirs)))
(define libmpfr (lazy (ffi-lib "libmpfr" '("" "1") #:get-lib-dirs 
get-lib-dirs)))

(Running 32-bit Ubuntu 10.04.4)

When I run the test file with the changes, it works, and the last four 
digits are "4888" as expected.

Looks like my work machine (64-bit Ubuntu 12.10) has libmpfr.so.4 and 
libgmp.so.10. I haven't run the test program there yet.

Ryan


On 11/16/2012 01:59 PM, Neil Toronto wrote:
> [...]
> One thing I'm not sure of is whether the FFI to libmpfr works on all our
> supported platforms. Could I have all the devs run the following program
> after your next compile?
>
>    #lang racket
>    (require math/bigfloat)
>
>    (parameterize ([bf-precision 8192])
>      pi.bf)
>
> Then reply with the last four digits printed. They should be "4888". If
> the program doesn't run because Racket can't load libmpfr, it's an
> opportunity to test the documentation. Please see if I've made the docs
> for the `math/bigfloat' module clear enough to help you fix the problem.
>
> Thanks!
>
> Neil ⊥
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev


Posted on the dev mailing list.