Hi Dave, On Wed, Aug 24, 2005 at 12:56:27PM -0500, David D. Kilzer wrote: > On Tue, Aug 23, 2005 at 07:40:09PM -0500, David D. Kilzer wrote:
> > When the unixodbc package is built, the SHLIBEXT C pre-processor macro > > is not defined. (I believe this is because the libltdl library is > > intentionally not built by the Debian package, although I haven't tested > > this hypothesis.) The lack of definition may be seen in the buildd logs > > by searching for "SHLIBEXT": > > http://buildd.debian.org/fetch.php?&pkg=unixodbc&ver=2.2.4-11&arch=i386&stamp=1097873269&file=log&as=raw > I wanted to follow-up to this message since there were some > "interesting" details that I left out of the original message. > > Because SHLIBEXT is not set, code in DriverManager/SQLConnect.c attempts > > to load a file named "/usr/lib/libodbccr.1" at runtime (which obviously > > doesn't exist) instead of "/usr/lib/libodbccr.so.1". I ran into this > > while trying to configure phpbb2 to connect to a SQL Server 2000 > > database via ODBC. The initial error looked like this: > > Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open > > cursor lib 'libodbccr' : /usr/lib/libodbccr.1: cannot open shared object > > file: No such file or directory, SQL state 01000 in SQLConnect in > > /usr/share/phpbb2/site/db/mssql-odbc.php on line 54 > First, note that the *original* error I was seeing with phpbb2 and an > *unmodified* mssql-odbc.php was related to the "autocommit" feature not > being supported when I tried to post a new topic. After doing some web > research, I found a post on a PHP forum that said I should enable > cursors using the SQL_CUR_USE_ODBC constant. When I modified > mssql-odbc.php to use this cursor type (by adding the SQL_CUR_USE_ODBC > parameter to the pconnect() and connect() methods), I then got the above > error message about not being able to find /usr/lib/libodbccr.1. Ok. I've never needed the cursor lib, so (obviously) never ran into this. I'm afraid I don't know whether there's another way to get where you're trying to go here. > > The attached patch fixes the build-time issue by modifying configure.in > > and configure to simply use the $shrext variable which is set for all > > configurations anyway. This forces SHLIBEXT to be defined during build > > time. (NOTE: I tried re-running autoconf[2.*], but unixodbc has trouble > > finding X libraries while running "configure" after doing this.) > > Alas, this change did not fix the problem I was seeing with phpbb2. :( > What happened was that after the SHLIBEXT value was fixed, every apache2 > child process that was used to access the phpbb2 web site would now get > a segmentation fault (signal 11) instead of reporting an error message > about not being able to load the shared library. I used gdb to get a > stack trace, and it looked like the code was trying to unload a shared > library. > I don't have the time or experience to track down that secondary issue > any further, but it looks like fixing the SHLIBEXT issue may expose > other issues related to dynamic library loading in unixodbc, at least > when used with apache2, php4-odbc and phpbb2. Well, the SHLIBEXT problem is fixed in unixodbc 2.2.11, the version currently in unstable. Could you get me a backtrace of one of these apache2 segfaults? I'd like to also see whether that bug still exists in unstable, and whether or not we can do anything to take care of it for you in stable as well. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/
signature.asc
Description: Digital signature