2
  • 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
  • see possible duplicate of https://stackoverflow.com/questions/3146858/using-curb-gem-and-libcurl-on-windows#3773533 – lacostenycoder Oct 19 '18 at 20:51
  • also it appears your trying to juse jruby? see https://stackoverflow.com/questions/968136/curbcurl-for-jruby – lacostenycoder Oct 19 '18 at 20:54
  • yes. I am indeed trying to use jruby. Which, seems to work fine. – user3931456 Oct 19 '18 at 21:13
  • The question is really about libcurl and why the system is not able to use it. I do appreciate the reference...and for the record the suggested fix for the curb install did not work because (drumroll) it could not find libcurl. – user3931456 Oct 19 '18 at 21:16
  • @lacostenycoder, your question about jruby prompted me to execute the code using just ruby. The result was a slightly different error message but the same basic result: – user3931456 Oct 19 '18 at 21:37
  • Personally I wouldn't touch Windows with a 10 foot cattle prod, so you might look at https://www.cs.mcgill.ca/~mxia3/2018/02/18/Five-different-Rails-development-environment-on-Windows-10-and-their-pros-and-cons/ also see https://stackoverflow.com/questions/164896/limitations-in-running-ruby-rails-on-windows#166548 – lacostenycoder Oct 19 '18 at 21:42
  • Sure. A vm to do testing of builds is an interesting idea but it's supposed to work as it is... and frankly, sounds like a time suck. I suspect I'm missing something basic. Need. Other. Clues. Thanks. – user3931456 Oct 20 '18 at 03:29
  • as for time suck, with vm you'd be up and rolling by now. – lacostenycoder Oct 20 '18 at 03:42
  • Rebuilt a 64bit system, same software specs. no love. Same. Exact. Issue. what a time sucking adventure. On to 32bit ruby, jruby, java stack. because I love testing other peoples software. – user3931456 Oct 22 '18 at 21:40
  • This is interesting. I was able to get curb installed on the 32bit stack (except the os) machine by following these instructions: http://blog.cloud-mes.com/2014/08/19/how-to-install-gem-curb-in-windows/ Obviously, these instructions did not work on the 64bit (the entire stack) machine. Why would they? What is really interesting is this guy is using this to get Typhoeus to work. http://blog.cloud-mes.com/2014/08/19/how-to-install-gem-curb-in-windows/ How long will it take? What will I have to do next? Who knows? stay tuned for another episode of "what stupid crap is next" – user3931456 Oct 23 '18 at 00:15
  • I put together a cygwin environment on the 64bit box windows10 machine and its amazing: Essentially, the same error – user3931456 Oct 23 '18 at 20:00
  • I was also able to install the curb gem on cygwin. The most recent version. I've purged the exact version.... – user3931456 Oct 24 '18 at 02:36

1 Answers1

0

I've run out of time. The answer is (sadly) a workaround: neography

The neography gem apparently avoids the libcurl dependency which has been a plague on my existence and yet still provides enough abstraction. Thanks.