[sword-devel] C# runtime problem

Troy A. Griffitts scribe at crosswire.org
Thu Aug 28 14:30:19 MST 2014


Jon,

Yes, you need to be sure your install of SWORD is working well before 
trying the bindings.

make
sudo make install
sudo make install_config

?

And then you had an internet connection when you typed the installmgr 
commands, and agreed to the warning about using remote content?

 From the utilities folder, what does: sudo ./installmgr -rl CrossWire
show?  It should list available modules in the CrossWire repository.

Do the installmgr commands return positive feedback to you? Here is the 
output when I run them on my system:

[(master) scribe at charisLaptop utilities]$ sudo ./installmgr -sc
[ File Bytes: 484                                                          ]
  --------------------------------------------------------------------------
Sync'd config file with master remote source list.



[(master) scribe at charisLaptop utilities]$ sudo ./installmgr -r CrossWire
[ File Bytes: 131843                                                       ]
  --------------------------------------------------------------------------
Remote Source Refreshed



[(master) scribe at charisLaptop utilities]$ sudo ./installmgr -ri 
CrossWire KJV
[ Total Bytes: 4294269; Completed Bytes: 0                                 ]


Downloading (1 of 7): kjvpref.rtf
[ File Bytes: 70500                                                        ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 70500                             ]
  =

Downloading (2 of 7): nt.bzs
[ File Bytes: 336                                                          ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 70836                             ]
  =

Downloading (3 of 7): nt.bzv
[ File Bytes: 82460                                                        ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 153296                            ]
  ==

Downloading (4 of 7): nt.bzz
[ File Bytes: 1756115                                                      ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 1909411                           ]
  ================================

Downloading (5 of 7): ot.bzs
[ File Bytes: 480                                                          ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 1909891                           ]
  ================================

Downloading (6 of 7): ot.bzv
[ File Bytes: 241150                                                       ]
  --------------------------------------------------------------------------
[ Total Bytes: 4294269; Completed Bytes: 2151041                           ]
  =====================================

Downloading (7 of 7): ot.bzz
[ File Bytes: 2143228                                                      ]
  --------------------------------------------------------------------------
Installed module: [KJV]






On 08/28/2014 01:35 PM, Jon Behrens wrote:
> Still no go.
>
> I've completely removed everything, gotten a new copy via SVN and followed
> the install instructions included in that distribution.
>
> Everything goes as expected until I get here:
>
>         Now let's grab some content:
>
>             cd utilities/
>             sudo ./installmgr -sc
>             sudo ./installmgr -r CrossWire
>             sudo ./installmgr -ri CrossWire KJV
>
> The last command returns:
>     Remote source [CrossWire] does not make available module [KJV]
>
> OK - so I follow the instructions later in the install file and 
> download KJV.zip and
> extract it to /usr/share/sword
>
> I then go to the command line example
>
>     Now lets try it out:
>
>         cd ../examples/cmdline
>         make
>         ./lookup KJV Jn.3.16
>
> The last command returns:
>     Could not find module [KJV].  Available modules:
>
> This at least tells me that libsword.so is available and working - it 
> doesn't throw
> an exception, just can't find the module.
>
> As advised below, I set LD_LIBRARY_PATH="/usr/lib" which is where 
> setup put
> libsword.so. Reboot, open a shell and type 'env' to make sure the path 
> is set. It is.
>
> Finally, I open MonoDevelop and load up the C# project. Make the 
> project and try
> to run the LookupExample
>
> I still get the same exception.
>
> Again, thanks to all who are trying to help.
>
>
> On 08/27/2014 11:01 PM, Troy A. Griffitts wrote:
>> :)
>>
>> The shim is SWORD's flatapi.  I still believe libsword.so is not 
>> found by the bindings.  How have you made it available?
>> It should either be:
>> installed by the make system.  If you used autotools to build, then: 
>> sudo make install
>> or you need to set your LD_LIBRARY_PATH variable to include a path 
>> which contains libsword.so
>>
>>
>> On 08/27/2014 07:10 PM, Greg Hellings wrote:
>>> I'm fairly sure that org_crosswire_sword_SWMgr_new() is a specific 
>>> thing to the C# bindings. The appropriate namespace in the C++ 
>>> library is "sword::SWMgr::new". The org.crosswire part is left out 
>>> of the C++ namespacing. Perhaps there is a shim library that bridges 
>>> the gap between the C++ lib and the C# bindings that's missing?
>>>
>>> --Greg
>>>
>>>
>>> On Wed, Aug 27, 2014 at 9:07 PM, Jon Behrens <jbb at crimsonthread.com 
>>> <mailto:jbb at crimsonthread.com>> wrote:
>>>
>>>     Hello again
>>>
>>>     I though finding 'libsword.so' would fix the problem, but not
>>>     so. Compiling and running
>>>     the C# LookupExample in the distribution package still gives the
>>>     following error:
>>>
>>>     Unhandled Exception:
>>>     System.EntryPointNotFoundException: org_crosswire_sword_SWMgr_new
>>>       at (wrapper managed-to-native)
>>>     Sword.NativeMethods:org_crosswire_sword_SWMgr_new ()
>>>       at Sword.Manager..ctor () [0x00008] in
>>>     /raid/swordProject/bindings/csharp/Manager.cs:26
>>>       at Sword.Tests.LookupExample.Lookup (System.String modName,
>>>     System.String key) [0x00001] in
>>>     /raid/swordProject/bindings/csharp/examples/LookupExample.cs:33
>>>       at Sword.Tests.LookupExample.Main (System.String[] args)
>>>     [0x00020] in
>>>     /raid/swordProject/bindings/csharp/examples/LookupExample.cs:27
>>>     [ERROR] FATAL UNHANDLED EXCEPTION:
>>>     System.EntryPointNotFoundException: org_crosswire_sword_SWMgr_new
>>>       at (wrapper managed-to-native)
>>>     Sword.NativeMethods:org_crosswire_sword_SWMgr_new ()
>>>       at Sword.Manager..ctor () [0x00008] in
>>>     /raid/swordProject/bindings/csharp/Manager.cs:26
>>>       at Sword.Tests.LookupExample.Lookup (System.String modName,
>>>     System.String key) [0x00001] in
>>>     /raid/swordProject/bindings/csharp/examples/LookupExample.cs:33
>>>       at Sword.Tests.LookupExample.Main (System.String[] args)
>>>     [0x00020] in
>>>     /raid/swordProject/bindings/csharp/examples/LookupExample.cs:27
>>>
>>>     Since I assume the function 'org_crosswire_sword_SWMgr_new()'
>>>     does in fact exist in libsword.so, the only thing I can imagine
>>>     is that there's a path variable not set somewhere.
>>>
>>>     As I mentioned before, I'm a real newby to Linux, so this may be
>>>     something obvious to
>>>     someone with more experience.
>>>
>>>     Thanks for any help
>>>
>>>     Jon
>>>
>>>     _______________________________________________
>>>     sword-devel mailing list: sword-devel at crosswire.org
>>>     <mailto:sword-devel at crosswire.org>
>>>     http://www.crosswire.org/mailman/listinfo/sword-devel
>>>     Instructions to unsubscribe/change your settings at above page
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> sword-devel mailing list:sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>
>>
>>
>> _______________________________________________
>> sword-devel mailing list:sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140828/98955b8d/attachment-0001.html>


More information about the sword-devel mailing list