Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL4MA-00022p-Rq for pgsql-odbc@arkaria.postgresql.org; Wed, 23 Sep 2020 12:58:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kL4M9-0003nZ-JK for pgsql-odbc@arkaria.postgresql.org; Wed, 23 Sep 2020 12:58:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL4M9-0003nS-BF for pgsql-odbc@lists.postgresql.org; Wed, 23 Sep 2020 12:58:45 +0000 Received: from pilvi.rengaskauppa.net ([188.117.24.212] helo=rengaskauppa.net) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kL4M2-0008AA-Bt for pgsql-odbc@postgresql.org; Wed, 23 Sep 2020 12:58:44 +0000 Received: from rengaskauppa.net (localhost [127.0.0.1]) by pilvi.rengaskauppa.net (Postfix) with ESMTP id 4BxJBz3Y74z8WD9; Wed, 23 Sep 2020 15:58:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hege.li; s=hege2; t=1600865915; bh=FvuhQ0N2+sxUIHI9Eb1ivjKaFKmBkVS9Qk96gzTnrs0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tcF5AxliZuWKDqjzkpICPtHl3KIfxMHQZahBi/cXWOXtZJ8zTJcTfq2ZXnvRyKssu qnCrEEJo22Dv1q2/yGxJs8MM5A/Y+6e1b2mITeObOg2X/c35Mb8L0AR+RxfGRngymF xno3g31zKCo0d8T9oJg8g1hrSmWG+Ph4M39zjo6rU51dmfRW9QsFsDXRuUHruUnXZ6 /S4K+vQInpe1KqglKIPNpjuPX7bGG2buhKkc62OUGaxA+DxkpXP+VV6ihXeuOB5fKm K/4lE94DX/+cjeAAhjVfoTcC68G9sXmf7Qvu/Gj7WDnNvZSpuTNVjytK+dn0T9DUNX jdt62gEbvx09w== Received: by pilvi.rengaskauppa.net (Postfix, from userid 1000) id 4BxJBz3Pl0z8WDB; Wed, 23 Sep 2020 15:58:35 +0300 (EEST) Date: Wed, 23 Sep 2020 15:58:35 +0300 From: Henrik Krohns To: "Inoue,Hiroshi" Cc: pgsql-odbc@postgresql.org Subject: Re: Crashing with copy_and_convert_field Message-ID: <20200923125835.GA18117@hege.li> References: <20200824144131.GA32577@hege.li> <20200901043648.GA2161@hege.li> <20200920080114.GA9518@hege.li> <20200922080031.GA32213@hege.li> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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? Cheers, Henrik