Hi Friedrich,
sorry it didn't help. I just took a look at ODBCConnection and I see
that it uses ODBC 2 per default. (no similar logic to VA Smalltalk's
ODBC version determination and no call of SQLAllocHandle). So I guess I
cannot really help you any further.
Still there is some smell in ODBCConnection>>#connect that I don't
understand:
connect
"Connect to the database"
self registerForFinalization.
hEnv := self sqlAllocEnv.
false ifTrue:
[ self
sqlSetEnvAttr: 200
value: 2 "SQL_ATTR_ODBC_VERSION" ].
hdbc := self sqlAllocConnect: hEnv.
what does this false ifTrue: thing mean here?
I mean, IIUC, sqlSetEnvAttr will never be called. Maybe that doesn't
matter, but it's strange anyways. It's not related to your problem,
because you get an exception right before that, so not yet of concern to
you ;-)
Still, it is strange. It would, however, not be any better to ask hEnv
whether it is true, because it never will be a Boolean, even not if
sqlAllocEnv fails.
But as I said, it's a code smell, but not related to your problem (at
least I am quite sure).
Good Luck with your Library hunting. Been there, got no T-shirt, nor
anything else ;-)
Joachim
Am 24.06.13 11:50, schrieb Friedrich Dominicus:
"[email protected]" <[email protected]> writes:
Hi Friedrich,
I am not sure if this is relevant for your case, but I had a very
similar problem with VAST and DB2 on Linux 64 bits. The funny thing is
that I also hat problems with the very same call and on digging deeper
found out the problem is a missing Ubuntu package. AFAIK, Pharo is
also 32 bits, right? (otherwise your call wouldn't come through
libdl.so.2 in /lib32/)
If so, see if you have libpam-modules:i386 installed on your box. In
my case, this solved my problem.
You can find a few more details about my case here:
https://groups.google.com/d/msg/va-smalltalk/tYTXU5ZqQAo/RVr5cHRiRKUJ
Be sure to read the whole thread to understand why I think your
problem is related.
And please let me/us know if your problem can be solved the same way.
I tried it with the libpam-modules installation. I modified the
LD_LIBRARY_PATH to contain the path to the libpam libraries also.
I restarted Pharo and tried to connect result:
pharo VM version: 3.9-7 #1 Wed Mar 13 18:22:44 CET 2013 gcc 4.4.3
Built from: NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
With: NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid:
a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
Revision: git://gitorious.org/cogvm/blessed.git Commit:
412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban
Lorenzano <[email protected]> Jenkins build #14535
Build host: Linux linux-ubuntu-10 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4
11:26:59 UTC 2012 x86_64 GNU/Linux
plugin path: /home/frido/Smalltalks/default/bin [default:
/home/frido/Smalltalks/default/bin/]
C stack backtrace:
/home/frido/Smalltalks/default/bin/pharo[0x80a0c0c]
/home/frido/Smalltalks/default/bin/pharo[0x80a0f28]
linux-gate.so.1(__kernel_rt_sigreturn+0x0)[0xf77d7410]
/lib/ld-linux.so.2(+0x13697)[0xf77eb697]
/lib/ld-linux.so.2(+0xf3de)/lib32/libdl.so.2(+0xcce)[0xf7763cce]
Smalltalk stack dump:
0xff958a10 I ODBCConnection>sqlAllocEnv 0xbb60d2dc: a(n) ODBCConnection
0xff958a30 I ODBCConnection>connect 0xbb60d2dc: a(n) ODBCConnection
0xff958a50 I ODBCConnection>open 0xbb60d2dc: a(n) ODBCConnection
0xff958a74 I [] in ODBCConnection class>dsn:user:password: 0xba3bea7c: a(n)
ODBCConnection class
0xff958a90 M BlockClosure>on:do: 0xbb60d3d8: a(n) BlockClosure
0xff958abc I ODBCConnection class>dsn:user:password: 0xba3bea7c: a(n)
ODBCConnection class
0xff958ae0 M UndefinedObject>? 0xb7428004: a(n) UndefinedObject
0xff958b18 I Compiler>evaluate:in:to:notifying:ifFail:logged: 0xbb589684: a(n)
Compiler
Then I tried the same code on/in Windows and there the connection
works. I have had this connection via ODBC running on Linux before. So I
guess you are right with some libraries, but they seem not to be related
to libpam.
Regards
Friedrich