pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Henrik Krohns <hege@hege.li>
To: Inoue,Hiroshi <hinoue205@gmail.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Crashing with copy_and_convert_field
Date: Wed, 23 Sep 2020 15:58:35 +0300
Message-ID: <20200923125835.GA18117@hege.li> (raw)
In-Reply-To: <dd2a5eb9-6b9a-4f9e-67c0-7a6978d60fc3@gmail.com>
References: <20200824144131.GA32577@hege.li>
	<20200901043648.GA2161@hege.li>
	<20200920080114.GA9518@hege.li>
	<20200922080031.GA32213@hege.li>
	<dd2a5eb9-6b9a-4f9e-67c0-7a6978d60fc3@gmail.com>


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. :-)


inline patch 1: config.h (+3/-3 lines) download inline-1.patch--- 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? Cheers, Henrik

view thread (7+ messages)  latest in thread

Message-ID: <20200923125835.GA18117@hege.li>
Permalink:  ../20200923125835.GA18117@hege.li/
Also on:    postgresql.org/message-id/20200923125835.GA18117@hege.li

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: hege@hege.li, hinoue205@gmail.com
  Subject: Re: Crashing with copy_and_convert_field
  In-Reply-To: <20200923125835.GA18117@hege.li>
  References: <20200824144131.GA32577@hege.li> <20200901043648.GA2161@hege.li> <20200920080114.GA9518@hege.li> <20200922080031.GA32213@hege.li> <dd2a5eb9-6b9a-4f9e-67c0-7a6978d60fc3@gmail.com> <20200923125835.GA18117@hege.li>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox