Skip to content

Errors when compiling functions which depend on external libraries #80

@mdmaas

Description

@mdmaas

Hi!

First of all, I want to mention that this is an amazing package!

Ok, so I was trying to compile a quadrature rule from FastGaussQuadrature, and got a segmentation fault.

So I ran a few tests... I eventually found that the dependency on SpecialFunctions was causing the problem.

using StaticCompiler
using SpecialFunctions
bessel_compiled, path = compile(besselj, (Float64,Complex{Float64}), "besselj" )

Now, the besselj function from bessel.jl in SpecialFunctions is essentially a wrapper to the AMOS library, which is accessed via ccall.

I continued testing if we can compile something which in turn calls an external library, and continued getting errors. For example:

using FFTW
compile(fft,(Vector{Complex{Float64}},))

leads, in the first place to a warning Found data we don't know how to relocate.. And then a compiler error:

MethodError: Cannot `convert` an object of type LLVM.ConstantExpr to an object of type Int64

I'll continue to add smaller and smaller tests, to see if this problem with external dependencies can be tackled somehow.

Best regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions