Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodError: convert has no method matching convert(::Type{Ptr{GSL.gsl_sf_result}}, ::Array{GSL.gsl_sf_result,1}) #28

Closed
jeff-regier opened this issue May 7, 2015 · 2 comments

Comments

@jeff-regier
Copy link

With Julia 0.4 (but not with Julia 0.3), the unit tests for GSL don't pass on my system (Ubuntu Trusty, with libgsl 1.16 installed). I get the error message below:

julia> Pkg.clone("https://github.com/jiahao/GSL.jl.git")
INFO: Cloning GSL from https://github.com/jiahao/GSL.jl.git
INFO: Computing changes...
INFO: No packages to install, update or remove
INFO: Package database updated

julia> Pkg.build("GSL")
INFO: Building GSL
WARNING: beginswith is deprecated, use startswith instead.
 in depwarn at ./deprecated.jl:40
 in beginswith at deprecated.jl:10
 in available_versions at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:116
 in package_available at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:111
 in can_provide at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:608
 in _find_library at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:451
 in satisfy! at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:738 (repeats 2 times)
 in anonymous at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:778
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in evalfile at loading.jl:174 (repeats 2 times)
 in anonymous at pkg/entry.jl:626
 in cd at ./file.jl:20
 in build! at pkg/entry.jl:625
 in build at pkg/entry.jl:637
 in anonymous at pkg/dir.jl:29
 in cd at file.jl:20
 in cd at pkg/dir.jl:29
 in build at pkg.jl:62
WARNING: beginswith is deprecated, use startswith instead.
 in depwarn at ./deprecated.jl:40
 in beginswith at deprecated.jl:10
 in available_versions at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:124
 in package_available at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:111
 in can_provide at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:608
 in _find_library at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:451
 in satisfy! at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:738 (repeats 2 times)
 in anonymous at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:778
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in evalfile at loading.jl:174 (repeats 2 times)
 in anonymous at pkg/entry.jl:626
 in cd at ./file.jl:20
 in build! at pkg/entry.jl:625
 in build at pkg/entry.jl:637
 in anonymous at pkg/dir.jl:29
 in cd at file.jl:20
 in cd at pkg/dir.jl:29
 in build at pkg.jl:62

julia> Pkg.test("GSL")
INFO: Testing GSL
WARNING: beginswith is deprecated, use startswith instead.
 in depwarn at ./deprecated.jl:40
 in beginswith at deprecated.jl:10
 in available_versions at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:116
 in package_available at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:111
 in can_provide at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:608
 in _find_library at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:451
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in reload_path at ./loading.jl:156
 in _require at ./loading.jl:68
 in require at ./loading.jl:51
 in include at ./boot.jl:250
 in include_from_node1 at loading.jl:132
 in process_options at ./client.jl:308
 in _start at ./client.jl:407
WARNING: beginswith is deprecated, use startswith instead.
 in depwarn at ./deprecated.jl:40
 in beginswith at deprecated.jl:10
 in available_versions at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:124
 in package_available at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:111
 in can_provide at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:608
 in _find_library at /home/jeff/.julia/v0.4/BinDeps/src/dependencies.jl:451
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in reload_path at ./loading.jl:156
 in _require at ./loading.jl:68
 in require at ./loading.jl:51
 in include at ./boot.jl:250
 in include_from_node1 at loading.jl:132
 in process_options at ./client.jl:308
 in _start at ./client.jl:407
WARNING: int(x::FloatingPoint) is deprecated, use round(Int,x) instead.
 in depwarn at ./deprecated.jl:40
 in int at deprecated.jl:29
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in include at ./boot.jl:250
 in include_from_node1 at loading.jl:132
 in process_options at ./client.jl:308
 in _start at ./client.jl:407
ERROR: LoadError: LoadError: MethodError: `convert` has no method matching convert(::Type{Ptr{GSL.gsl_sf_result}}, ::Array{GSL.gsl_sf_result,1})
This may have arisen from a call to the constructor Ptr{GSL.gsl_sf_result}(...),
since type constructors fall back to convert methods.
Closest candidates are:
  convert{T}(::Type{Ptr{T}}, ::UInt64)
  convert{T}(::Type{Ptr{T}}, ::Int64)
  convert{T}(::Type{Ptr{T}}, ::Ptr{T})
  ...
 in anonymous at no file:16
 in include at ./boot.jl:250
 in include_from_node1 at ./loading.jl:132
 in include at ./boot.jl:250
 in include_from_node1 at loading.jl:132
 in process_options at ./client.jl:308
 in _start at ./client.jl:407
while loading /home/jeff/.julia/v0.4/GSL/test/basic.jl, in expression starting on line 11
while loading /home/jeff/.julia/v0.4/GSL/test/runtests.jl, in expression starting on line 7
@jiahao
Copy link
Collaborator

jiahao commented Jun 30, 2015

I believe this is an instance of what @JeffBezanson described in #27, that the Ptr{} syntax in the ccall should not be used. I'll try to fix it.

@jiahao
Copy link
Collaborator

jiahao commented Oct 3, 2015

I believe this issue should be fixed on master now. Will tag a new release.

@jiahao jiahao closed this as completed Oct 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants