Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96954 > unrolled thread

Re: problem building python 3.5 extensions for windows

Started byRobin Becker <robin@reportlab.com>
First post2015-09-21 17:54 +0100
Last post2015-09-23 11:20 +0100
Articles 7 — 3 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: problem building python 3.5 extensions for windows Robin Becker <robin@reportlab.com> - 2015-09-21 17:54 +0100
    Re: problem building python 3.5 extensions for windows cjgohlke@gmail.com - 2015-09-21 17:36 -0700
      Re: problem building python 3.5 extensions for windows Robin Becker <robin@reportlab.com> - 2015-09-22 11:14 +0100
      Re: problem building python 3.5 extensions for windows Robin Becker <robin@reportlab.com> - 2015-09-22 14:35 +0100
      Re: problem building python 3.5 extensions for windows Terry Reedy <tjreedy@udel.edu> - 2015-09-22 16:48 -0400
        Re: problem building python 3.5 extensions for windows cjgohlke@gmail.com - 2015-09-22 14:37 -0700
          Re: problem building python 3.5 extensions for windows Robin Becker <robin@reportlab.com> - 2015-09-23 11:20 +0100

#96954 — Re: problem building python 3.5 extensions for windows

FromRobin Becker <robin@reportlab.com>
Date2015-09-21 17:54 +0100
SubjectRe: problem building python 3.5 extensions for windows
Message-ID<mailman.44.1442854462.28679.python-list@python.org>
.........
>
> This also sounds like the C++ stuff just wasn't installed.  I'm afraid
> reinstallation is probably your best bet.
>
I used the default installation, but it failed first time around (perhaps a 
network thing) and I stupidly assumed 'repair' would work.

After a full reinstallation at least vcvarsall is present and  I can at least 
get the amd64/x86 compilers to work with bdist_wheel (I didn't get any errors 
from using my already compiled relocatable libs) and I can no build the open 
source reportlab extensions.

One simple extension

https://bitbucket.org/rptlab/pyrxp

doesn't get built. For some reason I get a hang in the linker for both amd64 & 
x86. This builds fine for 27, 33 & 34.


However, I see this in the output

          | creating C:\ux\XB33\repos\pyRXP\build\lib.win-amd64-3.5
          | C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL
/MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ux\XB33\py35_amd64\libs 
/LIBPATH:C:\python35\libs /LIBPATH:C:\python35
/LIBPATH:C:\ux\XB33\py35_amd64\PCbuild\amd64 "/LIBPATH:C:\Program Files 
(x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
  "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 
14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Win
dows Kits\10\lib\10.0.10150.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows 
Kits\NETFXSDK\4.6\lib\um\x64" "/LIBPATH
:C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" wsock32.lib 
/EXPORT:PyInit_pyRXPU build\temp.win-amd64-3.5\
Release\ux\XB33\repos\pyRXP\src\pyRXP.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\xmlparser.obj bui
ld\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\url.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
rc\rxp\charset.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\string16.obj 
build\temp.win-amd64-3.5\Re
lease\ux\XB33\repos\pyRXP\src\rxp\ctype16.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\dtd.obj build
\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\input.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
rc\rxp\stdio16.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\system.obj 
build\temp.win-amd64-3.5\Rele
ase\ux\XB33\repos\pyRXP\src\rxp\hash.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\version.obj build\
temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\namespaces.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyR
XP\src\rxp\http.obj 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\nf16check.obj 
build\temp.win-amd64-3.5\
Release\ux\XB33\repos\pyRXP\src\rxp\nf16data.obj 
/OUT:build\lib.win-amd64-3.5\pyRXPU.cp35-win_amd64.pyd /IMPLIB:build\te
mp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib

          | pyRXP.obj : warning LNK4197: export 'PyInit_pyRXPU' specified 
multiple times; using first specification
          |    Creating library 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib 
and ob
ject 
build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.exp


          | Generating code
Stderr:  | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 
14.0\\VC\\BIN\\amd64\\link.exe' failed with
exit status 1

so there are some warnings which I don't understand. Maybe I need to do 
something special for pyRXP (possibly I have some ifdefs poorly configured).
-- 
Robin Becker

[toc] | [next] | [standalone]


#96969

Fromcjgohlke@gmail.com
Date2015-09-21 17:36 -0700
Message-ID<7f633007-1391-4172-a022-262899537981@googlegroups.com>
In reply to#96954
On Monday, September 21, 2015 at 9:54:51 AM UTC-7, Robin Becker wrote:
> .........
> >
> > This also sounds like the C++ stuff just wasn't installed.  I'm afraid
> > reinstallation is probably your best bet.
> >
> I used the default installation, but it failed first time around (perhaps a 
> network thing) and I stupidly assumed 'repair' would work.
> 
> After a full reinstallation at least vcvarsall is present and  I can at least 
> get the amd64/x86 compilers to work with bdist_wheel (I didn't get any errors 
> from using my already compiled relocatable libs) and I can no build the open 
> source reportlab extensions.
> 
> One simple extension
> 
> https://bitbucket.org/rptlab/pyrxp
> 
> doesn't get built. For some reason I get a hang in the linker for both amd64 & 
> x86. This builds fine for 27, 33 & 34.
> 
> 
> However, I see this in the output
> 
>           | creating C:\ux\XB33\repos\pyRXP\build\lib.win-amd64-3.5
>           | C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\BIN\amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL
> /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ux\XB33\py35_amd64\libs 
> /LIBPATH:C:\python35\libs /LIBPATH:C:\python35
> /LIBPATH:C:\ux\XB33\py35_amd64\PCbuild\amd64 "/LIBPATH:C:\Program Files 
> (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64"
>   "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 
> 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Win
> dows Kits\10\lib\10.0.10150.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows 
> Kits\NETFXSDK\4.6\lib\um\x64" "/LIBPATH
> :C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64" wsock32.lib 
> /EXPORT:PyInit_pyRXPU build\temp.win-amd64-3.5\
> Release\ux\XB33\repos\pyRXP\src\pyRXP.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\xmlparser.obj bui
> ld\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\url.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
> rc\rxp\charset.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\string16.obj 
> build\temp.win-amd64-3.5\Re
> lease\ux\XB33\repos\pyRXP\src\rxp\ctype16.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\dtd.obj build
> \temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\input.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\s
> rc\rxp\stdio16.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\system.obj 
> build\temp.win-amd64-3.5\Rele
> ase\ux\XB33\repos\pyRXP\src\rxp\hash.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\version.obj build\
> temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\namespaces.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyR
> XP\src\rxp\http.obj 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\rxp\nf16check.obj 
> build\temp.win-amd64-3.5\
> Release\ux\XB33\repos\pyRXP\src\rxp\nf16data.obj 
> /OUT:build\lib.win-amd64-3.5\pyRXPU.cp35-win_amd64.pyd /IMPLIB:build\te
> mp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib
> 
>           | pyRXP.obj : warning LNK4197: export 'PyInit_pyRXPU' specified 
> multiple times; using first specification
>           |    Creating library 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib 
> and ob
> ject 
> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.exp
> 
> 
>           | Generating code
> Stderr:  | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 
> 14.0\\VC\\BIN\\amd64\\link.exe' failed with
> exit status 1
> 
> so there are some warnings which I don't understand. Maybe I need to do 
> something special for pyRXP (possibly I have some ifdefs poorly configured).
> -- 
> Robin Becker

How long did you let it "hang"? For me the incremental linker took in the order of 30 minutes to link. I mentioned this on the Python issue tracker at <http://bugs.python.org/issue24872#msg249589>. 

[toc] | [prev] | [next] | [standalone]


#96978

FromRobin Becker <robin@reportlab.com>
Date2015-09-22 11:14 +0100
Message-ID<mailman.62.1442916894.28679.python-list@python.org>
In reply to#96969
On 22/09/2015 01:36, cjgohlke@gmail.com wrote:
> On Monday, September 21, 2015 at 9:54:51 AM UTC-7, Robin Becker wrote:
............
>> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.lib
>> and ob
>> ject
>> build\temp.win-amd64-3.5\Release\ux\XB33\repos\pyRXP\src\pyRXPU.cp35-win_amd64.exp
>>
>>
>>            | Generating code
>> Stderr:  | error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
>> 14.0\\VC\\BIN\\amd64\\link.exe' failed with
>> exit status 1
>>
>> so there are some warnings which I don't understand. Maybe I need to do
>> something special for pyRXP (possibly I have some ifdefs poorly configured).
>> --
>> Robin Becker
>
> How long did you let it "hang"? For me the incremental linker took in the order of 30 minutes to link. I mentioned this on the Python issue tracker at <http://bugs.python.org/issue24872#msg249589>.
>
Thanks for the pointer Christoph.

I certainly didn't let it run for 30 minutes. When I build with 2.7, 3.3 or 3.4 
the whole build including reportlab stuff is over in a couple of minutes. I will 
try again, but a linker that takes 30 minutes to create an extension that ends 
up 204Kb long has to be seriously broken. Is it trying to hard? Most of the code 
size is in arrays for code points etc etc.
-- 
Robin Becker

[toc] | [prev] | [next] | [standalone]


#96983

FromRobin Becker <robin@reportlab.com>
Date2015-09-22 14:35 +0100
Message-ID<mailman.65.1442928907.28679.python-list@python.org>
In reply to#96969
On 22/09/2015 11:14, Robin Becker wrote:
> On 22/09/2015 01:36, cjgohlke@gmail.com wrote:
.........t
>> <http://bugs.python.org/issue24872#msg249589>.
>>
> Thanks for the pointer Christoph.
>
> I certainly didn't let it run for 30 minutes. When I build with 2.7, 3.3 or 3.4
> the whole build including reportlab stuff is over in a couple of minutes. I will
> try again, but a linker that takes 30 minutes to create an extension that ends
> up 204Kb long has to be seriously broken. Is it trying to hard? Most of the code
> size is in arrays for code points etc etc.

I timed my builds of pyRXPU for x86 + amd64; these are on a core i5-3470 @ 
3.20Ghz with 4Gb memory.

python 3.4   1 minute  14 seconds
python 3.5  52 minutes 50 seconds

so with VS2015 it will now take me an hour to make and test any changes to this 
extension. I don't see how the issue can be considered closed. VS2015 is clearly 
not the way forward for any reasonable development process.
-- 
Robin Becker

[toc] | [prev] | [next] | [standalone]


#96992

FromTerry Reedy <tjreedy@udel.edu>
Date2015-09-22 16:48 -0400
Message-ID<mailman.70.1442954934.28679.python-list@python.org>
In reply to#96969
On 9/22/2015 9:35 AM, Robin Becker wrote:
> On 22/09/2015 11:14, Robin Becker wrote:
>> On 22/09/2015 01:36, cjgohlke@gmail.com wrote:
> .........t
>>> <http://bugs.python.org/issue24872#msg249589>.
>>>
>> Thanks for the pointer Christoph.
>>
>> I certainly didn't let it run for 30 minutes. When I build with 2.7,
>> 3.3 or 3.4
>> the whole build including reportlab stuff is over in a couple of
>> minutes. I will
>> try again, but a linker that takes 30 minutes to create an extension
>> that ends
>> up 204Kb long has to be seriously broken. Is it trying to hard? Most
>> of the code
>> size is in arrays for code points etc etc.
>
> I timed my builds of pyRXPU for x86 + amd64; these are on a core i5-3470
> @ 3.20Ghz with 4Gb memory.
>
> python 3.4   1 minute  14 seconds
> python 3.5  52 minutes 50 seconds
>
> so with VS2015 it will now take me an hour to make and test any changes
> to this extension. I don't see how the issue can be considered closed.
> VS2015 is clearly not the way forward for any reasonable development
> process.

I think you should add the above to the issue.

-- 
Terry Jan Reedy

[toc] | [prev] | [next] | [standalone]


#96998

Fromcjgohlke@gmail.com
Date2015-09-22 14:37 -0700
Message-ID<d5ad328a-1bef-4185-b17c-4303357683e4@googlegroups.com>
In reply to#96992
On Tuesday, September 22, 2015 at 1:49:16 PM UTC-7, Terry Reedy wrote:
> On 9/22/2015 9:35 AM, Robin Becker wrote:
> > On 22/09/2015 11:14, Robin Becker wrote:
> >> On 22/09/2015 01:36, CG wrote:
> > .........t
> >>> <http://bugs.python.org/issue24872#msg249589>.
> >>>
> >> Thanks for the pointer Christoph.
> >>
> >> I certainly didn't let it run for 30 minutes. When I build with 2.7,
> >> 3.3 or 3.4
> >> the whole build including reportlab stuff is over in a couple of
> >> minutes. I will
> >> try again, but a linker that takes 30 minutes to create an extension
> >> that ends
> >> up 204Kb long has to be seriously broken. Is it trying to hard? Most
> >> of the code
> >> size is in arrays for code points etc etc.
> >
> > I timed my builds of pyRXPU for x86 + amd64; these are on a core i5-3470
> > @ 3.20Ghz with 4Gb memory.
> >
> > python 3.4   1 minute  14 seconds
> > python 3.5  52 minutes 50 seconds
> >
> > so with VS2015 it will now take me an hour to make and test any changes
> > to this extension. I don't see how the issue can be considered closed.
> > VS2015 is clearly not the way forward for any reasonable development
> > process.
> 
> I think you should add the above to the issue.
> 
> -- 
> Terry Jan Reedy

It's a compiler bug. To work around, disable compiler optimizations, i.e. set `extra_compile_args=['/Od']` in setup.py.

--
Christoph

[toc] | [prev] | [next] | [standalone]


#97033

FromRobin Becker <robin@reportlab.com>
Date2015-09-23 11:20 +0100
Message-ID<mailman.98.1443003624.28679.python-list@python.org>
In reply to#96998
On 22/09/2015 22:37, cjgohlke@gmail.com wrote:
> On Tuesday, September 22, 2015 at 1:49:16 PM UTC-7, Terry Reedy wrote:
>> On 9/22/2015 9:35 AM, Robin Becker wrote:
>>> On 22/09/2015 11:14, Robin Becker wrote:
>>>> On 22/09/2015 01:36, CG wrote:
>>> .........t
>>>>> <http://bugs.python.org/issue24872#msg249589>.
>>>>>
>>>> Thanks for the pointer Christoph.
>>>>
>>>> I certainly didn't let it run for 30 minutes. When I build with 2.7,
>>>> 3.3 or 3.4
>>>> the whole build including reportlab stuff is over in a couple of
>>>> minutes. I will
>>>> try again, but a linker that takes 30 minutes to create an extension
>>>> that ends
>>>> up 204Kb long has to be seriously broken. Is it trying to hard? Most
>>>> of the code
>>>> size is in arrays for code points etc etc.
>>>
>>> I timed my builds of pyRXPU for x86 + amd64; these are on a core i5-3470
>>> @ 3.20Ghz with 4Gb memory.
>>>
>>> python 3.4   1 minute  14 seconds
>>> python 3.5  52 minutes 50 seconds
>>>
>>> so with VS2015 it will now take me an hour to make and test any changes
>>> to this extension. I don't see how the issue can be considered closed.
>>> VS2015 is clearly not the way forward for any reasonable development
>>> process.
>>
>> I think you should add the above to the issue.
>>
>> --
>> Terry Jan Reedy
>
> It's a compiler bug. To work around, disable compiler optimizations, i.e. set `extra_compile_args=['/Od']` in setup.py.
>
> --
> Christoph
>
Thanks Christoph, I guessed it must be something like that. I suppose it's 
trying desperately to place small chunks of encoding tables or something.

-- 
Robin Becker

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web