On 4 June 2013 11:40, kilon <thekilon@yahoo.co.uk> wrote:
Ok new problem, NBOpengl seems to not work at all on my UBUNTU 12.10 machine. I was trying to do GLViewportMorph new openInWorld , which works fine on my iMac and it gave me error: function unavailable.
So I assumed it cannot find some dynamic library , so I checked around the code and found that in package NBXLib-Core NBXlibHandle>>nbLibraryNameOrHandle class method, it returns '/usr/lib/libX11.so'. However browsing through the directories its clear that the library is not located in there but rather is located as a symlink in a) /usr/lib/i386-linux-gnu b) /usr/lib/x86_64-linux-gnu. Both symlink point to libx11.so.6.3.0 libraries.
So knowning that pharo is 32 bit I went for option (a) however still it gives me the same error.
Any idea what it may be ?
Another question I have is does it not NB check first to see if the library is available ? Because it looks weird that it complains about non existent functions but does not complain about non existent library.
NB uses a VM API to look for a function in library. That function provides no error feedback (just success or not). and also, it combines with loading library as well. So it is hard to say what exactly happened: did library failed to load or library loaded fine, but function not found. (see #loadSymbol:fromModule: implementation) To put an end to endless mystery, i propose you to implement a small diagnostic tool.. There is not much to do: - call dlopen() - if it fails, call dlerror() , and get details about failure. - call dlsym - if it fails, call dlerror() , and get details about failure.
Here is the stack
NBFFICallout(Object)>>error: NBFFICallout>>generateCall:module: NBGlxAPI>>call: in Block: [...] NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: in Block: [...] BlockClosure>>on:do: NBRecursionDetect class>>in:during: NBFFICallout class(NBNativeCodeGen class)>>generateCode:andRetry: NBFFICallout class(NBNativeCodeGen class)>>handleFailureIn:nativeCode: NBGlxAPI>>call: NBGlxAPI>>queryExtension:errorBase:eventBase: NBGLXContextDriver>>createContext: NBGLContextDriver class>>createContext: NBGLDisplay class>>extent: GLViewportMorph>>initializeForNewSession GLViewportMorph>>initialize GLViewportMorph class(Behavior)>>new UndefinedObject>>DoIt Compiler>>evaluate:in:to:notifying:ifFail:logged: SmalltalkEditor>>evaluateSelectionAndDo: SmalltalkEditor>>evaluateSelection PluggableTextMorph>>doIt in Block: [...] PluggableTextMorph>>handleEdit: in Block: [...] TextMorphForEditView(TextMorph)>>handleEdit: PluggableTextMorph>>handleEdit: PluggableTextMorph>>doIt Workspace(Object)>>perform:orSendTo: ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent: in Block: [...] BlockClosure>>ensure: CursorWithMask(Cursor)>>showWhile: ToggleMenuItemMorph(MenuItemMorph)>>invokeWithEvent:
-- View this message in context: http://forum.world.st/Understanding-NBOpenGL-tp4686514p4691549.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.