From 8fd7db41e0f632c8122c1c719ef28b2ca1fe0f5a Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Sat, 17 Oct 2026 21:08:49 +0200 Subject: [PATCH] Use Base's MPFR library name in `ccall` Julia 1.14 on Windows no longer installs the unversioned `libmpfr.dll`, only `libmpfr-6.dll`, so a `ccall` into `:libmpfr` fails with `could not load library` there (JuliaLang/julia#63849). Use `Base.MPFR.libmpfr`, which names the library that Base itself loads. Co-Authored-By: Claude Opus 5.5 --- src/implementations/BigFloat.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/implementations/BigFloat.jl b/src/implementations/BigFloat.jl index ba8d414..f27780f 100644 --- a/src/implementations/BigFloat.jl +++ b/src/implementations/BigFloat.jl @@ -33,7 +33,7 @@ promote_operation(::typeof(copy), ::Type{BigFloat}) = BigFloat function operate_to!(out::BigFloat, ::typeof(copy), in::BigFloat) ccall( - (:mpfr_set, :libmpfr), + (:mpfr_set, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, _MPFRRoundingMode), out, @@ -51,7 +51,7 @@ promote_operation(::typeof(zero), ::Type{BigFloat}) = BigFloat function _set_si!(x::BigFloat, value) ccall( - (:mpfr_set_si, :libmpfr), + (:mpfr_set_si, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Clong, _MPFRRoundingMode), x, @@ -76,7 +76,7 @@ end function operate_to!(output::BigFloat, ::typeof(+), a::BigFloat, b::BigFloat) ccall( - (:mpfr_add, :libmpfr), + (:mpfr_add, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, _MPFRRoundingMode), output, @@ -97,7 +97,7 @@ promote_operation(::typeof(-), ::Vararg{Type{BigFloat},N}) where {N} = BigFloat function operate_to!(output::BigFloat, ::typeof(-), a::BigFloat, b::BigFloat) ccall( - (:mpfr_sub, :libmpfr), + (:mpfr_sub, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, _MPFRRoundingMode), output, @@ -136,7 +136,7 @@ promote_operation(::typeof(*), ::Type{BigFloat}, ::Type{BigFloat}) = BigFloat function operate_to!(output::BigFloat, ::typeof(*), a::BigFloat, b::BigFloat) ccall( - (:mpfr_mul, :libmpfr), + (:mpfr_mul, Base.MPFR.libmpfr), Int32, (Ref{BigFloat}, Ref{BigFloat}, Ref{BigFloat}, _MPFRRoundingMode), output, @@ -170,7 +170,7 @@ function operate_to!( z::F, ) where {F<:BigFloat} ccall( - (:mpfr_fma, :libmpfr), + (:mpfr_fma, Base.MPFR.libmpfr), Int32, (Ref{F}, Ref{F}, Ref{F}, Ref{F}, _MPFRRoundingMode), output,