Re: Crashing with copy_and_convert_field - Mailing list pgsql-odbc

From Inoue,Hiroshi
Subject Re: Crashing with copy_and_convert_field
Date
Msg-id 4b53403a-7562-5f75-0c96-3ffa49cc1fc2@gmail.com
Whole thread Raw
In response to Re: Crashing with copy_and_convert_field  (Henrik Krohns <hege@hege.li>)
List pgsql-odbc
Hi Henrik,

On 2020/09/23 21:58, Henrik Krohns wrote:
> On Wed, Sep 23, 2020 at 07:59:55PM +0900, Inoue,Hiroshi wrote:
>> Hi Henrik,
>>
>> On 2020/09/22 17:00, Henrik Krohns wrote:
>>> Compiled fresh stack with unixODBC 2.3.9 / libpq 12.4 / psqlodbc git, with
>>> debugging info.
>>>
>>> Actually I can reproduce this with simple isql help command, forget the
>>> previous Oracle stuff.  I guess it's related to Solaris 11 somehow, I've
>>> tried both Solaris Studio 12.6 and GCC 9.3 for compiling.  Maybe I'll try
>>> compiling later on Linux if it's the same.
>> Could you show me config.h and config.log?
> Now that you mentioned.. I found the problem!
>
> Looking at config.log, there's many of these
>
> configure:12913: checking size of void *
> configure:12918: gcc -m64 -o conftest -g -O0  -I/opt/unixODBC/include -I/opt/unixODBC/include
-I/opt/unixODBC/include/postgresql/internal -L/opt/unixODBC/lib -L/opt/unixODBC/lib conftest.c -lpq -lpthread
-lodbcinst >&5
 
> configure:12918: $? = 0
> configure:12918: ./conftest
> ld.so.1: conftest: fatal: libpq.so.5: open failed: No such file or directory
> ./configure[1703]: eval: line 1: 7319: Killed
> configure:12918: $? = 265
> configure: program exited with status 265
>
> I fixed this by adding LDFLAGS="-R/opt/unixODBC/lib"  (where my libpq resides too)
>
> Now all SIZEOF_ are correctly defined in config.h and isql doesn't crash
> anymore. :-)
>
>
> --- config.h.old        2020-09-22 10:43:01.000000000 +0300
> +++ config.h    2020-09-23 15:49:29.384805935 +0300
> @@ -127,13 +127,13 @@
>   #define POSIX_MULTITHREAD_SUPPORT 1
>
>   /* The size of `long', as computed by sizeof. */
> -#define SIZEOF_LONG 0
> +#define SIZEOF_LONG 8
>
>   /* The size of `long int', as computed by sizeof. */
> -#define SIZEOF_LONG_INT 0
> +#define SIZEOF_LONG_INT 8
>
>   /* The size of `void *', as computed by sizeof. */
> -#define SIZEOF_VOID_P 0
> +#define SIZEOF_VOID_P 8
>
>   /* Define to 1 if SQLColAttribute use SQLLEN */
>   #define SQLCOLATTRIBUTE_SQLLEN 1
>
>
> Thanks for nudging me in right direction.  I would have assumed configure
> dying and printing error in such scenario, perhaps something to improve
> there?

I would try to improve configure script today.
Could you please try the script without LDFLAGS="-R/opt/unixODBC/lib"?

regards,
Hiroshi Inoue

>
> Cheers,
> Henrik
>
>




pgsql-odbc by date:

Previous
From: Henrik Krohns
Date:
Subject: Re: Crashing with copy_and_convert_field
Next
From: Javier Partida
Date:
Subject: [Driver] Compilation of psqlodbc-09.03.0400