pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How can I run installcheck using powershell ?
8+ messages / 3 participants
[nested] [flat]

* How can I run installcheck using powershell ?
@ 2016-07-19 21:09 Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Cramer @ 2016-07-19 21:09 UTC (permalink / raw)
  To: pgsql-odbc

Is there a way to run the tests ?

Alternatively nmake is giving me:
 error LNK2019: unresolved external symbol __vsnwprintf_s referenced in
function _StringCchPrintfW


Dave Cramer

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
@ 2016-07-19 23:56 ` Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Michael Paquier @ 2016-07-19 23:56 UTC (permalink / raw)
  To: Dave Cramer <davecramer@gmail.com>; +Cc: pgsql-odbc

On Wed, Jul 20, 2016 at 6:09 AM, Dave Cramer <davecramer@gmail.com> wrote:
> Is there a way to run the tests ?
>
> Alternatively nmake is giving me:
>  error LNK2019: unresolved external symbol __vsnwprintf_s referenced in
> function _StringCchPrintfW

Hm. I am not seeing this error on Windows using nmake from VS 2013
when compiling the tests..
-- 
Michael


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
@ 2016-07-20 00:10   ` Dave Cramer <davecramer@gmail.com>
  2016-07-20 00:33     ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Dave Cramer @ 2016-07-20 00:10 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc

Hi Michael,

I am using VC2015, which is probably the cause

Dave Cramer

On 19 July 2016 at 19:56, Michael Paquier <michael.paquier@gmail.com> wrote:

> On Wed, Jul 20, 2016 at 6:09 AM, Dave Cramer <davecramer@gmail.com> wrote:
> > Is there a way to run the tests ?
> >
> > Alternatively nmake is giving me:
> >  error LNK2019: unresolved external symbol __vsnwprintf_s referenced in
> > function _StringCchPrintfW
>
> Hm. I am not seeing this error on Windows using nmake from VS 2013
> when compiling the tests..
> --
> Michael
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
@ 2016-07-20 00:33     ` Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:55       ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Michael Paquier @ 2016-07-20 00:33 UTC (permalink / raw)
  To: Dave Cramer <davecramer@gmail.com>; +Cc: pgsql-odbc

On Wed, Jul 20, 2016 at 9:10 AM, Dave Cramer <davecramer@gmail.com> wrote:
> I am using VC2015, which is probably the cause



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-20 00:33     ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
@ 2016-07-20 00:55       ` Dave Cramer <davecramer@gmail.com>
  2016-07-20 01:20         ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 01:24         ` Re: How can I run installcheck using powershell ? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 8+ messages in thread

From: Dave Cramer @ 2016-07-20 00:55 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: pgsql-odbc

Michael,

Here is the complete link error

       link.exe @C:\Users\DAVECR~1\AppData\Local\Temp\nm45D.tmp
   Creating library .\_Unicode_Release\psqlodbc35w.lib and object
.\_Unicode_Release\psqlodbc35w.exp
odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
__vsnwprintf_s referenced in function _StringCchPrintfW
.\_Unicode_Release\psqlodbc35w.dll : fatal error LNK1120: 1 unresolved
externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\BIN\link.exe"' : return code '0x460'

Thanks!

Dave Cramer

On 19 July 2016 at 20:33, Michael Paquier <michael.paquier@gmail.com> wrote:

> On Wed, Jul 20, 2016 at 9:10 AM, Dave Cramer <davecramer@gmail.com> wrote:
> > I am using VC2015, which is probably the cause
>
> From which file(s) is the error coming? This strongly smells like a
> patch using _MSC_VER is needed.
> --
> Michael
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-20 00:33     ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:55       ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
@ 2016-07-20 01:20         ` Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Michael Paquier @ 2016-07-20 01:20 UTC (permalink / raw)
  To: Dave Cramer <davecramer@gmail.com>; +Cc: pgsql-odbc

On Wed, Jul 20, 2016 at 9:55 AM, Dave Cramer <davecramer@gmail.com> wrote:
> Here is the complete link error
>
>        link.exe @C:\Users\DAVECR~1\AppData\Local\Temp\nm45D.tmp
>    Creating library .\_Unicode_Release\psqlodbc35w.lib and object
> .\_Unicode_Release\psqlodbc35w.exp
> odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
> __vsnwprintf_s referenced in function _StringCchPrintfW
> .\_Unicode_Release\psqlodbc35w.dll : fatal error LNK1120: 1 unresolved
> externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\BIN\link.exe"' : return code '0x460'

OK, I can see it. After some research, VS is, as usual, a pain to work with:
https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and...
In this case it seems that __vsnwprintf_s is not DLL-exported, causing
the linking error. And a solution is to add
legacy_stdio_definitions.lib to fix that where odbccp32.lib is listed.
Like in the patch attached.

You could as well enforce the presence of this lib in CUSTOMLINKLIBS,
but I'd rather see win64.mak support natively the newest versions of
VS instead of the old ones.
-- 
Michael

-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Attachments:

pgodbc-vs2015-fix.patch (invalid/octet-stream, 1.3K) download diff --git a/win64.mak b/win64.mak index 87dda83..40fc20f 100755 --- a/win64.mak +++ b/win64.mak @@ -205,7 +205,7 @@ RSC_PROJ=$(RSC_PROJ) /d "_DEBUG" LINK32=link.exe LIB32=lib.exe -LINK32_FLAGS=libpq.lib kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib secur32.lib XOleHlp.lib winmm.lib msvcrt.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(DEF_FILE)" +LINK32_FLAGS=libpq.lib kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib secur32.lib XOleHlp.lib winmm.lib msvcrt.lib legacy_stdio_definions.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(DEF_FILE)" !IF "$(MSDTC)" != "no" LINK32_FLAGS=$(LINK32_FLAGS) "$(OUTDIR)\$(DTCLIB).lib" !ENDIF @@ -276,7 +276,7 @@ LINK32_DTCOBJS= \ "$(INTDIR)\msdtc_enlist.obj" "$(INTDIR)\xalibname.obj" XADEF_FILE= "$(XALIB).def" -LINK32_XAFLAGS=/nodefaultlib:libcmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib XOleHlp.lib winmm.lib msvcrt.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(XADEF_FILE)" +LINK32_XAFLAGS=/nodefaultlib:libcmt.lib kernel32.lib user32.lib gdi32.lib advapi32.lib odbc32.lib odbccp32.lib wsock32.lib XOleHlp.lib winmm.lib msvcrt.lib legacy_stdio_definitions.lib $(CUSTOMLINKLIBS) /nologo /dll /def:"$(XADEF_FILE)" LINK32_XAOBJS= \ "$(INTDIR)\pgxalib.obj"
^ permalink raw reply [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-20 00:33     ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:55       ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
@ 2016-07-20 01:24         ` Tom Lane <tgl@sss.pgh.pa.us>
  2016-07-20 01:28           ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Tom Lane @ 2016-07-20 01:24 UTC (permalink / raw)
  To: Dave Cramer <davecramer@gmail.com>; +Cc: Michael Paquier <michael.paquier@gmail.com>; pgsql-odbc

Dave Cramer <davecramer@gmail.com> writes:
> Here is the complete link error

>        link.exe @C:\Users\DAVECR~1\AppData\Local\Temp\nm45D.tmp
>    Creating library .\_Unicode_Release\psqlodbc35w.lib and object
> .\_Unicode_Release\psqlodbc35w.exp
> odbccp32.lib(dllload.obj) : error LNK2019: unresolved external symbol
> __vsnwprintf_s referenced in function _StringCchPrintfW
> .\_Unicode_Release\psqlodbc35w.dll : fatal error LNK1120: 1 unresolved
> externals
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\BIN\link.exe"' : return code '0x460'

Googling for __vsnwprintf_s indicates that it was turned into an inline
function in VS2015:
https://connect.microsoft.com/VisualStudio/feedback/details/1134693/vs-2015-ctp-5-c-vsnwprintf-s-and...

They seem to be asserting that you wouldn't be seeing this problem if
all program components were built with the same VS version.

			regards, tom lane


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: How can I run installcheck using powershell ?
  2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-19 23:56 ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:10   ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-20 00:33     ` Re: How can I run installcheck using powershell ? Michael Paquier <michael.paquier@gmail.com>
  2016-07-20 00:55       ` Re: How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
  2016-07-20 01:24         ` Re: How can I run installcheck using powershell ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2016-07-20 01:28           ` Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Michael Paquier @ 2016-07-20 01:28 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Dave Cramer <davecramer@gmail.com>; pgsql-odbc

On Wed, Jul 20, 2016 at 10:24 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> They seem to be asserting that you wouldn't be seeing this problem if
> all program components were built with the same VS version.

Even if you build Postgres libs with VS2015 and link pgodbc
compilation to that, the linking problem still shows up btw.
-- 
Michael


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2016-07-20 01:28 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 21:09 How can I run installcheck using powershell ? Dave Cramer <davecramer@gmail.com>
2016-07-19 23:56 ` Michael Paquier <michael.paquier@gmail.com>
2016-07-20 00:10   ` Dave Cramer <davecramer@gmail.com>
2016-07-20 00:33     ` Michael Paquier <michael.paquier@gmail.com>
2016-07-20 00:55       ` Dave Cramer <davecramer@gmail.com>
2016-07-20 01:20         ` Michael Paquier <michael.paquier@gmail.com>
2016-07-20 01:24         ` Tom Lane <tgl@sss.pgh.pa.us>
2016-07-20 01:28           ` Michael Paquier <michael.paquier@gmail.com>

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