Le samedi 09 avril 2016 à 12:16 -0400, Isaiah Norton a écrit :
> > 1) It seems that Julia includes libgmp.{so,dylib} but not gmp.h,
> > which is necessary for the C library's compilation
>
> There was some prior discussion about this, for a similar reason [1],
> but I think they eventually decided to use MPIR.
>
> I don't know of a reason this shouldn't be done, and it likely
> requires only a few additional lines in the makefile. Please open an
> issue on JuliaLang/julia.
>
> (ps: Nemo may be of interest, in case you haven't seen it [2])
>
> > 2) It seems some black magic will be required to locate the gmp
> > installation path within the Julia tree
> I believe (hopefully Tony will confirm) that you need to check these
> two paths:
>
> joinpath(JULIA_HOME, "../lib") # source builds
> joinpath(JULIA_HOME, "../lib/julia") # binary downloads
This isn't actually correct for all setups. For example, Linux
distribution packages sometimes use lib64/ instead of lib/. The same
could theoretically happen for include/. So if we started shipping
gmp.h, we should also create a new variable in base/build_h.jl so that
packages can reliably get the path to the include/ directory.
Regards
> Best,
> Isaiah
>
>
> [1] https://groups.google.com/d/msg/julia-users/8emhRgpTN5E/8IouaSnn5
> xwJ
> [2] http://nemocas.org/ https://github.com/Nemocas/Nemo.jl
>
> On Sat, Apr 9, 2016 at 8:13 AM, Laurent Bartholdi <laurent.bartholdi@
> gmail.com> wrote:
> > Dear all,
> > My package contains a C library that requires gmp. It would be very
> > nice to be able to use Julia's gmp, so as not to install a
> > duplicate copy of gmp as by package's library's dependency.
> > However,
> > 1) It seems that Julia includes libgmp.{so,dylib} but not gmp.h,
> > which is necessary for the C library's compilation
> > 2) It seems some black magic will be required to locate the gmp
> > installation path within the Julia tree
> >
> > Suggestions are welcome on the best way to proceed!
> >