- curl-7.61.1_6-win64-mingw (for libcurl and curl)
- windows 10 OS Build: 17134.346
- java version "1.8.0_191"ruby
- ruby 2.4.4p296 (2018-03-28 revision 63013) [x64-mingw32]
- jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.191-b12 on 1.8.0_191-b12 +jit [mswin32-x86_64]
I'm trying to access a neo4j database using neo4j-core (8.1.4) gem with the HTTP adapter and I receive the error below. A couple of notes:
- The machine was originally an 8.1 OS that I upgraded to windows 10. But I have also tried a fresh install.
- I'm working with libcurl from curl-7.61.1-win64-mingw. I have tried both the 64 and 32 bit versions.
- The NEO4J server works fine
- I get the error when I try to establish a session
neo4j_session = Neo4j::Core::CypherSession.new(neo4j_adaptor)
- I try to install the curb gem and I get the error "Can't find libcurl or curl/curl.h (RuntimeError)". CURB has a dependencies on libcurl (i understand).
- The curl.exe is in the path and works great. I ensured that the path containing the libcurl.dll and the curl.exe where first in the path order.
- I executed the same script just using ruby, to eliminate any jruby specific issues, with the same problem: (LoadError)libcurl': The specified module could not be found.
- I tried to register the dll with RegSvr32 but it says it cannot find the dll. However, the DLL is clearly at the location I'm specifying. I think this supports the idea that its one of libcurls dependencies...but not sure.
At this point its pretty clear that the system cannot find libcurl. So, I:
- Update the path to point at the directory that libcurl.dll is in
- I also try putting the DLL in known working path locations
- Looked on haxx to better understand the prerequisites. No help.
I use dependency walker on libcurl-x64.dll (curl-7.61.1-win64-mingw) and I get the following in the log:
- Error: At least one required implicit or forwarded dependency was not found.
- Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
- Error: A circular dependency was detected.
- Warning: At least one delay-load dependency module was not found.
- Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
and here is a sample of a modules it says are missing:
- API-MS-WIN-CORE-CONSOLE-L3-2-0.DLL
- API-MS-WIN-CORE-CRT-L1-1-0.DLL
- API-MS-WIN-CORE-LARGEINTEGER-L1-1-0.DLL
I guess im surprised at the number of modules that are reported as missing considering the machine works fine otherwise. It appears that some were removed as part of architectural changes based on this: https://social.msdn.microsoft.com/Forums/en-US/a28331ae-19a3-4a34-b3ba-1e8fd4430375/missing-apimswincore-dlls
Libcurl is common tool and so I am surprised by the remarkable pain in the ass this has been.
Any thoughts? I'm reluctant to do a clean build at this point and hunting on DLL sites seems like a non starter.
The error
LoadError: Could not open library 'libcurl' : The operation completed successfully.
Could not open library 'libcurl.dll' : The operation completed successfully.
Could not open library 'libcurl.so.4' : The operation completed successfully.
Could not open library 'libcurl.so.4.dll' : The operation completed successfully.
block in ffi_lib at C:/jruby-9.2.0.0/lib/ruby/stdlib/ffi/library.rb:114
map at org/jruby/RubyArray.java:2557
ffi_lib at C:/jruby-9.2.0.0/lib/ruby/stdlib/ffi/library.rb:84
<module:Curl> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curls/settings.rb:7
<module:Ethon> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curls/settings.rb:2
<main> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curls/settings.rb:1
require at org/jruby/RubyKernel.java:970
require at C:/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
<module:(root)> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curl.rb:1
<module:Curl> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curl.rb:27
<main> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curl.rb:13
require at org/jruby/RubyKernel.java:970
require at C:/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
<main> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon/curl.rb:8
require at org/jruby/RubyKernel.java:970
require at C:/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
<main> at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon.rb:1
require at org/jruby/RubyKernel.java:970
require at C:/jruby-9.2.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
block in (root) at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/ethon-0.11.0/lib/ethon.rb:15
block in (root) at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/typhoeus-1.3.0/lib/typhoeus.rb:1
(root) at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/typhoeus-1.3.0/lib/typhoeus.rb:2
(root) at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/neo4j-core-8.1.4/lib/neo4j/core/cypher_session/adaptors/http.rb:1
HTTP at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/neo4j-core-8.1.4/lib/neo4j/core/cypher_session/adaptors/http.rb:20
block in faraday_connection at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/neo4j-core-8.1.4/lib/neo4j/core/cypher_session/adaptors/http.rb:162
initialize at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/faraday-0.15.3/lib/faraday/connection.rb:89
new at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/faraday-0.15.3/lib/faraday.rb:70
faraday_connection at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/neo4j-core-8.1.4/lib/neo4j/core/cypher_session/adaptors/http.rb:154
initialize at C:/jruby-9.2.0.0/lib/ruby/gems/shared/gems/neo4j-core-8.1.4/lib/neo4j/core/cypher_session/adaptors/http.rb:117
<main> at import-into-neo4j.rb:11