External Module not found - LGitLibrary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

External Module not found - LGitLibrary

BrunoBB
Hi,

Using Pharo on Windows time to time i got "External Module not found" for
LGitLibrary.

Not sure if i'm hitting:
https://github.com/pharo-project/pharo-launcher/issues/307

But this time the problem is not fixed. Other time after some trying to open
the image in different way (PharoLaucher, from CommandLine, selecting
Pharo.exe to open .image files, ..) the problem fixed itself.

ExternalLibraryFunction(Object)>>error:
ExternalLibraryFunction(Object)>>externalCallFailed
ExternalLibraryFunction(ExternalFunction)>>invokeWithArguments:
LGitLibrary>>libgit2_init
FFICalloutAPI>>function:module:
LGitLibrary(Object)>>ffiCall:
LGitLibrary>>libgit2_init
[ self libgit2_init.
self recordInitializationSuccess ] in LGitLibrary>>initializeLibGit2 in
Block: [ self libgit2_init....
BlockClosure>>on:do:
LGitLibrary>>initializeLibGit2
LGitLibrary class>>startUp:
ClassSessionHandler>>startup:
[ :each | each startup: isImageStarting ] in WorkingSession>>runStartup: in
Block: [ :each | each startup: isImageStarting ]
[ aBlock value: each ] in [ :each |
[ aBlock value: each ]
        on: Exception
        do: [ :error | self errorHandler handleError: error ] ] in
WorkingSession>>runList:do: in Block: [ aBlock value: each ]
BlockClosure>>on:do:
[ :each |
[ aBlock value: each ]
        on: Exception
        do: [ :error | self errorHandler handleError: error ] ] in
WorkingSession>>runList:do: in Block: [ :each | ...
Array(SequenceableCollection)>>do:
WorkingSession>>runList:do:
WorkingSession>>runStartup:
WorkingSession>>start:
SessionManager>>launchSnapshot:andQuit:
[ isImageStarting := self launchSnapshot: save andQuit: quit.
wait signal ] in SessionManager>>snapshot:andQuit: in Block: [
isImageStarting := self launchSnapshot: save and...etc...
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self
value....




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

Andrei Chis
Hi,

We got a slightly similar error with Pharo 8 on a Linux CI  when loading code quite often (but still randomly).
Does it happen for you when loading code or just when opening the image? Which Pharo 8.0 build are you using?

Error: External module not found
ExternalLibraryFunction(Object)>>error:
ExternalLibraryFunction(Object)>>externalCallFailed
ExternalLibraryFunction(ExternalFunction)>>invokeWithArguments:
LGitCommit>>commit_tree:commit:
LGitCommit>>tree
LGitCommitStore>>nodeAt:ifPresent:ifAbsent:
LGitCommitStore(FileSystemStore)>>exists:
FileSystem>>exists:
FileReference>>exists
IceBasicProjectReader>>canReadProjectFromCommitish:
[ :any | any canReadProjectFromCommitish: anIceCommitish ] in IceProjectReader class>>readProjectFrom: in Block: [ :any | any canReadProjectFromCommitish: anIceCom...etc...
[ :each |
(aBlock value: each)
ifTrue: [ ^ foundBlock cull: each ] ] in OrderedCollection(Collection)>>detect:ifFound:ifNone: in Block: [ :each | ...
OrderedCollection>>do:
OrderedCollection(Collection)>>detect:ifFound:ifNone:
OrderedCollection(Collection)>>detect:ifNone:
OrderedCollection(Collection)>>detect:
IceProjectReader class>>readProjectFrom:
[ IceProjectReader readProjectFrom: self ] in IceGitCommit>>project in Block: [ IceProjectReader readProjectFrom: self ]
BlockClosure>>on:do:
IceGitCommit>>project
IceWorkingCopy>>refreshProjectFromRepository
IceWorkingCopy>>referenceCommit:
IceWorkingCopy>>adoptCommit:
IceGitCommit(IceCommit)>>adopt
IceCheckoutDoNotLoadPackages>>checkoutOn:
IceWorkingCopy>>checkout:
IceLibgitRepository(IceRepository)>>checkout:
IceGitLocalBranch(IceCommitish)>>checkout:
IceGitLocalBranch(IceCommitish)>>switch
IceLibgitRepository(IceRepository)>>switchToCommitishNamed:


On Fri, Dec 20, 2019 at 1:28 AM BrunoBB <[hidden email]> wrote:
Hi,

Using Pharo on Windows time to time i got "External Module not found" for
LGitLibrary.

Not sure if i'm hitting:
https://github.com/pharo-project/pharo-launcher/issues/307

But this time the problem is not fixed. Other time after some trying to open
the image in different way (PharoLaucher, from CommandLine, selecting
Pharo.exe to open .image files, ..) the problem fixed itself.

ExternalLibraryFunction(Object)>>error:
ExternalLibraryFunction(Object)>>externalCallFailed
ExternalLibraryFunction(ExternalFunction)>>invokeWithArguments:
LGitLibrary>>libgit2_init
FFICalloutAPI>>function:module:
LGitLibrary(Object)>>ffiCall:
LGitLibrary>>libgit2_init
[ self libgit2_init.
self recordInitializationSuccess ] in LGitLibrary>>initializeLibGit2 in
Block: [ self libgit2_init....
BlockClosure>>on:do:
LGitLibrary>>initializeLibGit2
LGitLibrary class>>startUp:
ClassSessionHandler>>startup:
[ :each | each startup: isImageStarting ] in WorkingSession>>runStartup: in
Block: [ :each | each startup: isImageStarting ]
[ aBlock value: each ] in [ :each |
[ aBlock value: each ]
        on: Exception
        do: [ :error | self errorHandler handleError: error ] ] in
WorkingSession>>runList:do: in Block: [ aBlock value: each ]
BlockClosure>>on:do:
[ :each |
[ aBlock value: each ]
        on: Exception
        do: [ :error | self errorHandler handleError: error ] ] in
WorkingSession>>runList:do: in Block: [ :each | ...
Array(SequenceableCollection)>>do:
WorkingSession>>runList:do:
WorkingSession>>runStartup:
WorkingSession>>start:
SessionManager>>launchSnapshot:andQuit:
[ isImageStarting := self launchSnapshot: save andQuit: quit.
wait signal ] in SessionManager>>snapshot:andQuit: in Block: [
isImageStarting := self launchSnapshot: save and...etc...
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self
value....




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

BrunoBB
Hi,

My problem is in Pharo 7 and also it happend randomly.

But this time is not going away ...

My Pharo 7 VM is installed in "C:\Users\Usuario\Documents\Pharo\vms\70-x64"

If i remember correctly i have read there are some issues when is not
installed in the default path.

regards,
bruno



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

BrunoBB
Hi,

Any idea how to fix this problem ?

regards,
bruno



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

BrunoBB
The following also fail:

DynamicLoader loadLibrary:
'C:\Users\Usuario\Documents\Pharo\vms\70-x64\libgit2.dll'



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

Ben Coman
In reply to this post by BrunoBB


On Fri, 20 Dec 2019 at 22:36, BrunoBB <[hidden email]> wrote:
Hi,

My problem is in Pharo 7 and also it happend randomly.

But this time is not going away ...

My Pharo 7 VM is installed in "C:\Users\Usuario\Documents\Pharo\vms\70-x64"

If i remember correctly i have read there are some issues when is not
installed in the default path.

Although not a brilliant solution... what happens if you reboot your machine.

cheers -ben 
Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

BrunoBB
Hi,

Reboot the machine usually fixed the problem but not this time.

Note:
It happen on image startup.

regards,
bruno



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: External Module not found - LGitLibrary

BrunoBB
Hi,

Finally i remember how i fixed this problem in the past.

Just a small description for the record.

libgit2.dll fail to load on startup on Pharo 7 on Windows (in this case 8).

* Starting Pharo from launcher >> libgit2.dll load FAIL
* Starting Pharo from command line >> libgit2.dll load FAIL
* Double click on Pharo.exe and selecting the image (and viceversa) >>
libgit2.dll load FAIL

Solution:
Open 2 different file explorers and drag&drop your Pharo image on Pharo.exe
>> it works !!!

The funny thing is after applying the solution the previous methods that
failed to load the DLL start to work ok.

So, it seems some hacky problem with Windows LoadLibrary()... and the
association between .image file and Pharo.exe

Thanks Andrei and Ben for your answers !!!

regards,
bruno



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html