Skip Menu |

This queue is for tickets about the Math-Pari CPAN distribution.

Report information
The Basics
Id: 93806
Status: open
Priority: 0/
Queue: Math-Pari

People
Owner: Nobody in particular
Requestors: Matthew.Persico [...] lazard.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problems trying to compile for Windows
Date: Wed, 12 Mar 2014 19:15:38 -0400
To: bug-Math-Pari [...] rt.cpan.org
From: Matthew.Persico [...] lazard.com
This is not much of a bug report, but has anyone seen this error trying to compile on Windows before I start going down the rabbit hole trying to figure it out? Here's the compile error: cl -c -I ../pari-2.1.7/src -I ../pari-2.1.7/src/headers -I ../pari-2.1.7/src/graph -I . -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERLDLL -O1 -MD -Zi -DNDEBUG -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_err -DDYNAMIC_PLOTTING -Fohighlvl.obj ../pari-2.1.7/src/gp/highlvl.c highlvl.c C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : error C2146: syntax error : missing ')' before identifier 'gpsi' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : error C2061: syntax error : identifier 'gpsi' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : error C2059: syntax error : ';' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : error C2059: syntax error : ',' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11305) : error C2059: syntax error : ')' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11313) : error C2146: syntax error : missing ')' before identifier 'gpsi' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11313) : error C2061: syntax error : identifier 'gpsi' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11313) : error C2059: syntax error : ';' C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11313) : error C2059: syntax error : ')' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.EXE"' : return code '0x2' Stop. ---------------------------------------------------------------- The snippet of header that is a problem (which I don't understand because there is no gpsi anywhere): typedef struct tagSCROLLINFO { UINT cbSize; UINT fMask; int nMin; int nMax; UINT nPage; int nPos; int nTrackPos; } SCROLLINFO, FAR *LPSCROLLINFO; typedef SCROLLINFO CONST FAR *LPCSCROLLINFO; WINUSERAPI int WINAPI SetScrollInfo( _In_ HWND hwnd, _In_ int nBar, _In_ LPCSCROLLINFO lpsi, // <=11304 _In_ BOOL redraw);// <=11305 WINUSERAPI BOOL WINAPI GetScrollInfo( _In_ HWND hwnd, _In_ int nBar, _Inout_ LPSCROLLINFO lpsi); // <= 11313 ----------------------------------------------------------------------------------------------------- Here's the Perl info: E:\perlbuild\tools>perl -V Summary of my perl5 (revision 5 version 18 subversion 2) configuration: Platform: osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO', optimize='-O1 -MD -Zi -DNDEBUG', cppflags='-DWIN32' ccversion='17.00.50727.1', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"e:\perl-5.18.2_20140218\lib\MSWin32-x86-multi-thread\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitectur e='*' publicKeyToken='6595b64144ccf1df' language='*'"' libpth="c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl518.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"e:\perl-5.18.2_20140218\lib\MSWin32-x86-multi-thread\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processor Architecture='*' publicKeyToken='6595b64144ccf1df' language='*'"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Feb 18 2014 15:26:52 @INC: e:/perl-5.18.2_20140218/site/lib/MSWin32-x86-multi-thread e:/perl-5.18.2_20140218/site/lib e:/perl-5.18.2_20140218/lib/MSWin32-x86-multi-thread e:/perl-5.18.2_20140218/lib . ---------------------------------------------------------------------------------- And the compiler info: E:\perlbuild\tools>cl Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x86 Copyright (C) Microsoft Corporation. All rights reserved. And the windows info E:\perlbuild\tools>ver Microsoft Windows [Version 6.1.7601] (Windows 2008 R2 Sp1) -- Matthew O. Persico Lazard 30 Rockefeller Plaza New York, NY 10112 212 632 6136

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Wed, 12 Mar 2014 17:17:16 -0700
To: "Matthew.Persico [...] lazard.com via RT" <bug-Math-Pari [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Wed, Mar 12, 2014 at 07:15:58PM -0400, Matthew.Persico@lazard.com via RT wrote: Show quoted text
> cl -c -I ../pari-2.1.7/src -I ../pari-2.1.7/src/headers -I > ../pari-2.1.7/src/graph -I . -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 > -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE > -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERLDLL -O1 -MD > -Zi -DNDEBUG -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_err > -DDYNAMIC_PLOTTING -Fohighlvl.obj ../pari-2.1.7/src/gp/highlvl.c
highlvl.c is very special. Good. Show quoted text
> C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : > error C2146: syntax error : missing ')' before identifier 'gpsi'
Show quoted text
> The snippet of header that is a problem (which I don't understand because > there is no gpsi anywhere): > _In_ LPCSCROLLINFO lpsi, // <=11304
This is a very common problem when you need to include header files for two GIANT unrelated pieces of software: #define’s for one subsystem may conflict with names of identifies used in another subsystem. I suspect that here GP/PARI #define’s lpsi to something which involves gpsi, and that GP/PARI #include’s come before the Windows’ #include’s. However, as I said, highlvl.c is VERY special, and there is a big probability that it does not need PARI’s definitions of lpsi at all. Then a solution would be to #undef lpsi BETWEEN #include’ing GP/PARI and Windows’ headers in highlvl.c. Can you test and report, please? Thanks, Ilya
CC: Matthew.Persico [...] lazard.com
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Thu, 13 Mar 2014 07:12:48 -0400
To: "bug-Math-Pari [...] rt.cpan.org" <bug-Math-Pari [...] rt.cpan.org>
From: Matthew.Persico [...] lazard.com
Will do at some point between training sessions today. -- Matthew Show quoted text
> On Mar 12, 2014, at 20:17, "Ilya Zakharevich via RT"
<bug-Math-Pari@rt.cpan.org> wrote: Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > On Wed, Mar 12, 2014 at 07:15:58PM -0400, Matthew.Persico@lazard.com via RT
wrote: Show quoted text
> > cl -c -I ../pari-2.1.7/src -I ../pari-2.1.7/src/headers -I > > ../pari-2.1.7/src/graph -I . -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32 > > -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE > > -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS > > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERLDLL -O1 -MD > > -Zi -DNDEBUG -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_err > > -DDYNAMIC_PLOTTING -Fohighlvl.obj ../pari-2.1.7/src/gp/highlvl.c
> > highlvl.c is very special. Good. >
> > C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : > > error C2146: syntax error : missing ')' before identifier 'gpsi'
>
> > The snippet of header that is a problem (which I don't understand because > > there is no gpsi anywhere): > > _In_ LPCSCROLLINFO lpsi, // <=11304
> > This is a very common problem when you need to include header files > for two GIANT unrelated pieces of software: #define’s for one > subsystem may conflict with names of identifies used in another subsystem. > > I suspect that here GP/PARI #define’s lpsi to something which involves > gpsi, and that GP/PARI #include’s come before the Windows’ #include’s. > However, as I said, highlvl.c is VERY special, and there is a big > probability that it does not need PARI’s definitions of lpsi at all. > > Then a solution would be to > #undef lpsi > BETWEEN #include’ing GP/PARI and Windows’ headers in highlvl.c. Can > you test and report, please? > > Thanks, > Ilya >
CC: matthewpersico [...] orestesoftware.com
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Fri, 21 Mar 2014 15:44:44 -0400
To: bug-Math-Pari [...] rt.cpan.org
From: Matthew.Persico [...] lazard.com
Bingo! $ diff highlvl.c.orig highlvl.c.new 76a77 Show quoted text
> # undef lpsi
Can you let me know when you might patch and release so I can pull from CPAN instead of using my local patch? Thanks! -- Matthew O. Persico Lazard 30 Rockefeller Plaza New York, NY 10112 212 632 6136 From: "Ilya Zakharevich via RT" <bug-Math-Pari@rt.cpan.org> To: Matthew Persico/ITS/Lazard@Lazard NYC Date: 03/12/2014 08:17 PM Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > On Wed, Mar 12, 2014 at 07:15:58PM -0400, Matthew.Persico@lazard.com via RT wrote: Show quoted text
> cl -c -I ../pari-2.1.7/src -I ../pari-2.1.7/src/headers -I > ../pari-2.1.7/src/graph -I . -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG
-DWIN32 Show quoted text
> -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE > -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS > -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERLDLL -O1
-MD Show quoted text
> -Zi -DNDEBUG -DVERSION=\"\" -DXS_VERSION=\"\" -Derr=pari_err > -DDYNAMIC_PLOTTING -Fohighlvl.obj ../pari-2.1.7/src/gp/highlvl.c
highlvl.c is very special. Good. Show quoted text
> C:\Program Files (x86)\Windows Kits\8.0\include\um\winuser.h(11304) : > error C2146: syntax error : missing ')' before identifier 'gpsi'
Show quoted text
> The snippet of header that is a problem (which I don't understand
because Show quoted text
> there is no gpsi anywhere): > _In_ LPCSCROLLINFO lpsi, // <=11304
This is a very common problem when you need to include header files for two GIANT unrelated pieces of software: #define’s for one subsystem may conflict with names of identifies used in another subsystem. I suspect that here GP/PARI #define’s lpsi to something which involves gpsi, and that GP/PARI #include’s come before the Windows’ #include’s. However, as I said, highlvl.c is VERY special, and there is a big probability that it does not need PARI’s definitions of lpsi at all. Then a solution would be to #undef lpsi BETWEEN #include’ing GP/PARI and Windows’ headers in highlvl.c. Can you test and report, please? Thanks, Ilya
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Fri, 25 Apr 2014 01:25:33 -0700
To: "Matthew.Persico [...] lazard.com via RT" <bug-Math-Pari [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Fri, Mar 21, 2014 at 03:44:59PM -0400, Matthew.Persico@lazard.com via RT wrote: Show quoted text
> Queue: Math-Pari > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > Bingo! > > $ diff highlvl.c.orig highlvl.c.new > 76a77
> > # undef lpsi
> > Can you let me know when you might patch and release so I can pull from > CPAN instead of using my local patch? > > Thanks!
I’m starting to suspect that you just did not apply the necessary patches (should be auto-applied given `patch' on path, and building from pari_tgz or from auto-download). Anyway, `diff' is useless. One should use, as a minimum, `diff -pu'. Yours, Ilya
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Fri, 25 Apr 2014 08:58:43 -0400
To: "bug-Math-Pari [...] rt.cpan.org" <bug-Math-Pari [...] rt.cpan.org>
From: Matthew.Persico [...] lazard.com
I noticed that. However, The patch was small enough that I just edited by hand. Didn't want to bother you for another round trip email for such a small edit. -- Matthew Show quoted text
> On Apr 25, 2014, at 4:26, "Ilya Zakharevich via RT"
<bug-Math-Pari@rt.cpan.org> wrote: Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > On Fri, Mar 21, 2014 at 03:44:59PM -0400, Matthew.Persico@lazard.com via RT
wrote: Show quoted text
> > Queue: Math-Pari > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > > > Bingo! > > > > $ diff highlvl.c.orig highlvl.c.new > > 76a77
> > > # undef lpsi
> > > > Can you let me know when you might patch and release so I can pull from > > CPAN instead of using my local patch? > > > > Thanks!
> > I’m starting to suspect that you just did not apply the necessary > patches (should be auto-applied given `patch' on path, and building > from pari_tgz or from auto-download). > > Anyway, `diff' is useless. One should use, as a minimum, `diff -pu'. > > Yours, > Ilya >
CC: "bug-Math-Pari [...] rt.cpan.org" <bug-Math-Pari [...] rt.cpan.org>
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Fri, 25 Apr 2014 12:07:04 -0400
To: Matthew.Persico [...] lazard.com
From: Matthew.Persico [...] lazard.com
Wait a minute. Backtrack. I just read the email trail now that I got to work and I'm off my phone email. You did not supply a patch nor did you suggest that you did - I misread your comments. You originally supplied a suggestion: Show quoted text
> Then a solution would be to > #undef lpsi > BETWEEN #include’ing GP/PARI and Windows’ headers in highlvl.c. Can > you test and report, please?
I applied that suggestion manually to the existing build in E:\perlbuild\.cpanplus\5.18.2\build\Math-Pari-2.01080605\pari-2.1.7\src\gp, rebuilt it and it worked. I then did a diff to show you what I did. I did not do a diff to supply you a patch, nor did I apply a proper patch - just made the change and all was well. That was my mistake. In the interests of disclosure, you should know that this is now longer in my critical path because I ended up moving back to Strawberry for a different reason. So if you'd rather not disturb your current codebase, I am willing to let it drop. However, just in case you do want to pursue this, I will download the Math-Pari-2.01080605 tarball this weekend, unpack it somewhere else and do a proper diff across the whole distrib so I can make sure I did not change anything else. And I'll make sure a proper rebuild is done on the patched code. I'll have something for you by Monday. Thanks again and apologies for the confusion. Any particular diff args you want beside -pu? -- Matthew O. Persico Lazard 30 Rockefeller Plaza New York, NY 10112 212 632 6136 From: Matthew Persico/ITS/Lazard To: "bug-Math-Pari@rt.cpan.org" <bug-Math-Pari@rt.cpan.org> Date: 04/25/2014 08:58 AM Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows I noticed that. However, The patch was small enough that I just edited by hand. Didn't want to bother you for another round trip email for such a small edit. -- Matthew Show quoted text
> On Apr 25, 2014, at 4:26, "Ilya Zakharevich via RT"
<bug-Math-Pari@rt.cpan.org> wrote: Show quoted text
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > On Fri, Mar 21, 2014 at 03:44:59PM -0400, Matthew.Persico@lazard.com via
RT wrote: Show quoted text
> > Queue: Math-Pari > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93806 > > > > > Bingo! > > > > $ diff highlvl.c.orig highlvl.c.new > > 76a77
> > > # undef lpsi
> > > > Can you let me know when you might patch and release so I can pull
from Show quoted text
> > CPAN instead of using my local patch? > > > > Thanks!
> > I’m starting to suspect that you just did not apply the necessary > patches (should be auto-applied given `patch' on path, and building > from pari_tgz or from auto-download). > > Anyway, `diff' is useless. One should use, as a minimum, `diff -pu'. > > Yours, > Ilya >
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Sat, 26 Apr 2014 07:56:29 -0700
To: "Matthew.Persico [...] lazard.com via RT" <bug-Math-Pari [...] rt.cpan.org>
From: Ilya Zakharevich <nospam-abuse [...] ilyaz.org>
On Fri, Apr 25, 2014 at 12:07:19PM -0400, Matthew.Persico@lazard.com via RT wrote: Show quoted text
> You did not supply a patch nor did you suggest that you did - I misread > your comments.
Patches are supplied with the distribution. They are auto-applied if the necessary tools are present, and the user did not override this. Show quoted text
> I then did a diff to show you what I did.
Your diff does not show anything useful. You need to use arguments -pu or some such. Yours, Ilya
Subject: Re: [rt.cpan.org #93806] Problems trying to compile for Windows
Date: Sat, 26 Apr 2014 11:57:39 -0400
To: "bug-Math-Pari [...] rt.cpan.org" <bug-Math-Pari [...] rt.cpan.org>
From: Matthew.Persico [...] lazard.com
I'll find docs in the release and Do The Right Thing -- Matthew Show quoted text
> On Apr 26, 2014, at 10:57, "Ilya Zakharevich via RT"
<bug-Math-Pari@rt.cpan.org> wrote: Show quoted text
> > such.