[Pharo-users] How to debug why external library isn't loading with UFFI or appears not to be ?
What's the best way to debug whether an external library is being loaded or not with UFFI ? I can't tell if it is or not, and nothing is showing up in the pharodebug.log. It's being loaded with the unix64LibraryName method. Thanks
[Pharo-users] REEF examples
Hi, I'm trying to use REEF but can only find a few limited examples which aren't helping really. Does anyone know for example how I would update a RETextField value when a REButton is clicked ? I found this example someone answered to a the query I had but it doesn't work: REForm subclass: #MyForm instanceVariableNames: 'textFieldContents' classVariableNames: '' poolDictionaries: '' category: 'ReefSample1-View'. textFieldContents ^textFieldContents textFieldContents: aString textFieldContents := aString initializeContents self add: (RETextField new on: #textFieldContents of: self). self add: (REButton new label: 'Try me!'; callback: [ self triggerThenDo: [ self inform: self textFieldContents ]]). All it does is generate a dialog box when the button is clicked. I don't know if inform: has usage since that was written. Thanks
[Pharo-users] OSX el capitan - SIP
Hi, Thanks for the suggestion, didn't realise you could do that with OSX applications. I've created a wrapper shell script called Pharo in the MacOS folder with the environment set for DYLD_LIBRARY_PATH and renamed the Pharo executable and launched it from the shell script, and it now works correctly and launches as an OSX application from Finder. Thanks
[Pharo-users] OSX el capitan - SIP
Hi, OSX el capitan implements System Integrity Protection: https://en.wikipedia.org/wiki/System_Integrity_Protection One of the effects of this is you can no longer modify DYLD_LIBRARY_PATH for an OSX application. I use a FFI wrapper to load and use an Oracle library in Pharo but this requires modification of the DYLD_LIBRARY_PATH to work. Up until now I could do this by adding a plist config file to /Library/LaunchAgents for the Pharo application which modified DYLD_LIBRARY_PATH. This no longer works because of SIP. Launching Pharo from a terminal having modified DYLD_LIBRARY_PATH via .bash_profile works as required but this is less than ideal. Anyone know of any other way of doing this so I can launch Pharo directly as an OSX application ? Thanks
[Pharo-users] Reddit example
Thanks for the pointers. I've got it working in Pharo 4 but had to change this method as I was getting a database session connection error. It appears to be losing the Glorp session, so I changed this class method thus: RedditDatabaseResource login>> "^ DefaultLogin ifNil: [ DefaultLogin := self createLogin ]" ^ DefaultLogin := self createLogin.
[Pharo-users] Reddit example
Hi, Yes, I've tried to follow the instructions on https://medium.com/concerning-pharo/reddit-st-in-10-cool-pharo-classes-1b5327ca0740 If I run: Gofer it smalltalkhubUser: 'SvenVanCaekenberghe' project: 'Reddit'; configuration; loadStable. I get the following error: NameLookupFailure: cannot resolve 'http' and a dialog box saying either Retry or Give Up It's attempting to download files as follows: Loading all file names from http://http://mc.stfx.eu/Neo/ which appears to be the issue. Thanks
[Pharo-users] Reddit example
Hi, I'm trying to load the Reddit example from SmalltalkHub (Monticello), it fails with: This package depends on the following classes: DescriptorSystem You must resolve these dependencies before you will be able to load these definitions: RedditSchema allTableNames classModelForRedditLink: constructAllClasses descriptorForRedditLink: tableForREDDIT_LINKS: and also tried loading mcz file directly that fails to. If I try to install using: MCHttpRepository location: 'http://smalltalkhub.com/mc/SvenVanCaekenberghe/Reddit/main' user: '' password: '' It fails with an incorrect url: http://http ... when attempting to pull some package. This is using Pharo 4. Thanks
[Pharo-users] Oracle FFI - External module not found on OS X
I found to working solutions which fix issue, also doesn't require symlink in Plugins directory: 1) create plist file in /Library/LaunchAgents which sets library path and Oracle home or 2) create apple script that sets environment variables and run a user login
[Pharo-users] Oracle FFI - External module not found on OS X
Discovered the issue, the Oracle FFI wrapper is loading correctly but then is not finding the Oracle Instant Client library correctly. Creating sym links fixes the issue with finding the Oracle Instant Client dylibs but then it still doesn't find Oracle TNS settings etc .. BTW used dtruss (dtrace tool) to track dylib failures.
[Pharo-users] Oracle FFI - External module not found on OS X
Thanks, it's giving this, so it's appears to be 32 bit (I compiled with CFLAGS=-m32): /usr/local/lib/libocilib.dylib: Mach-O dynamically linked shared library i386 I think the library is ok, it's just not being found by Pharo when I launch it as an application from the Finder dialog. If I launch Pharo from a terminal window,like ./Pharo, it finds the library using DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH, it doesn't even need a sym link in the Pharo Plugins directory and the library is found by Pharo and works. If I create a sym link in the Plugins directory or copy the dylib to the Plugins directory and launch Pharo via the Finder dialog window, it fails with "External module not found", so it appears to be how Pharo and/or OSX sets it library path when launched as an Application that is causing the issue. Thanks.
[Pharo-users] Oracle FFI - External module not found on OS X
Hi, Yes, it's on the same machine. I've tried copying the dylib to MacOS/Plugins directory and it doesn't fix it. Weirdly, if I start the Pharo executable from the command line, where I've set the DYLD_LIBRARY_PATH for the dylib in the shell environment, it works. So it seems to be something to do with how OSX Applications have their DYLD_LIBRARY_PATH set. I know there used to be a file in /etc/ on older versions of OS X where you could set it where it did get picked up by applications, but that no longer seems to be the case with the latest version of OSX. Thanks
[Pharo-users] Oracle FFI - External module not found on OS X
Hi, I wrote a FFI wrapper for an Oracle library ( OCILib ) sometime ago, which worked on Pharo 1.4 and Pharo 2.0 / 3.0. I'm now trying to use it with Pharo 4.0 and its failing with "External module not found". This is on OSX and I've set DYLD_LIB_LIBRARY so the OCILib dylib is present in it. I've also tried putting a sym link to the library in Resources directory. Do I need to set anything else, such as Info.plist ? Thanks
[Pharo-users] Zodiac/SqueakSSL plugin on OSX with Pharo 2.0 error
>Yes, this is a known issue: certificate management is simple not implemented >in the plugin. Client side you >can ignore this (although that is a security >problem), server side it is functionally necessary. > >ZnSecureServer only works on Linux, AFAIK. I've said this from day one. > >Sven Thanks for the info.
[Pharo-users] Zodiac/SqueakSSL plugin on OSX with Pharo 2.0 error
Forgot to include command that fails: (ZnSecureServer on: 8443 ) certificate: '/Development/Smalltalk/self-crt/server.pem'; logToTranscript; start; yourself.
[Pharo-users] Zodiac/SqueakSSL plugin on OSX with Pharo 2.0 error
Hi, I'm getting this plugin error when trying to use this command to run a SSL webserver on OSX with Pharo 2.0/Zodiac/SqueakSSL plugin: Error: SSL Exception: accept failed [code: -5] being called here: accept "Do the SSL server handshake." | count result | self resetEncryptedBuffers. count := 0. connecting := true. [ self sslSession isConnected ] whileFalse: [ count := self readEncryptedBytes: in startingAt: 1 count: in size. result := self sslSession accept: in from: 1 to: count into: out. result < -1 ifTrue: [ ^ self sslException: 'accept failed' code: result ]. result > 0 ifTrue: [ self flushEncryptedBytes: out startingAt: 1 count: result ] ]. connecting := false Looking at the SqueakSSL plugin source code: -5 indicates a generic SSL exception/error, any ideas what this could be ? My self-signed certificate works fine when run using openssl ( openssl s_server -accept 8443 -cert server.pem -WWW ). Thanks
[Pharo-users] Muiltple images / FFI
Hi, I have an app (seaside) that is configured with multiple pharo (1.3) images behind an apache proxy, using a FFI wrapper to a OCI native library to connect to Oracle. It works fine with one image but with multiple images it crashes with a seg fault/memory error when under user load. The error appears to happen when the wrapper code closes an OCI statement/connection. It appears with multiple images that they are allocating/de-allocating memory via the wrapper/OCI and over-writing each over. Is that possible ? Thanks