byuflowlab / Xfoil.jl

Julia wrapper for the 2D airfoil panel code XFOIL
MIT License
19 stars 6 forks source link

Missing libxfoil dependency #5

Closed grgoon closed 3 years ago

grgoon commented 4 years ago

Hi, I have this error when trying to build Xfoil. I have also complied libxfoil separately but couldn't figure out how to have it added as a Julia dependency. Would you help, please? I'm using Windows.

Error: Error building Xfoil: │ ERROR: LoadError: None of the selected providers can install dependency libxfoil. │ Use BinDeps.debug(package_name) to see available providers │ │ Stacktrace: │ [1] error(::String) at .\error.jl:33 │ [2] satisfy!(::BinDeps.LibraryDependency, ::Array{DataType,1}) at C:\Users\grgoo.julia\packages\BinDeps\QvmEl\src\dependencies.jl:956
│ [3] satisfy!(::BinDeps.LibraryDependency) at C:\Users\grgoo.julia\packages\BinDeps\QvmEl\src\dependencies.jl:929 │ [4] top-level scope at C:\Users\grgoo.julia\packages\BinDeps\QvmEl\src\dependencies.jl:984 │ [5] include(::String) at .\client.jl:439 │ [6] top-level scope at none:5 │ in expression starting at C:\Users\grgoo.julia\packages\Xfoil\8wAJo\deps\build.jl:32 └ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.4\Pkg\src\Operations.jl:899

taylormcd commented 4 years ago

Ideally you wouldn't have to build the shared library at all, BinDeps should build and load the shared library for you. The real issue here is that I currently don't have a method implemented for building the shared library dependency on Windows.

taylormcd commented 4 years ago

As a workaround, just replace the section "Get XFOIL libraries" section in src/Xfoil.jl with

const libxfoil = "/path/to/your/compiled/float/library.dll"
const libxfoil_cs = "/path/to/your/compiled/complex/library.dll"
grgoon commented 4 years ago

I tried replacing the "Get XFOIL libraries" section in src/Xfoil.jl and receive the following error when importing Xfoil:

ERROR: LoadError: InitError: could not load library "C:/..../libxfoil.dll" %1 is not a valid Win32 application.

taylormcd commented 3 years ago

I'm working towards constructing a Xfoil_JLL package using BinaryBuilder, which should alleviate all these build process problems and make this package work on more architectures.

taylormcd commented 3 years ago

Good news. This package should work on most systems now thanks to prepackaged binaries built using BinaryBuilder. No build steps required.