geertj/gruvi

Building gruvi from a clean git clone will fail on the first attempt

jmooreoliva opened this issue · 1 comments

Building gruvi ("python setup.py build") from a clean git clone will fail on the first attempt. After the error occurs, running "python.setup.py build" again will succeed.

System issue observed on:

python 3.4.1 windows 32 bit
Visual studio 2010 express for compilation
git cloned on 2014-06-21 12:00 PM (I am new to git, not sure if there is a revision number as in svn to refer to instead)

Steps to reproduce:

a) git clone https://github.com/geertj/gruvi
b) cd gruvi
(if dependencies are not installed, run pip install -r requirements.txt)
c) python setup.py build

The following is the output of the build process until it fails

C:\winrelay\gruvi>C:\python34\python setup.py build
Updated _version.py
_http_ffi.c
   Creating library C:\winrelay\gruvi\gruvi\__pycache__\Release\gruvi\__pycache_
_\_http_ffi.lib and object C:\winrelay\gruvi\gruvi\__pycache__\Release\gruvi\__p
ycache__\_http_ffi.exp
_jsonrpc_ffi.c
   Creating library C:\winrelay\gruvi\gruvi\__pycache__\Release\gruvi\__pycache_
_\_jsonrpc_ffi.lib and object C:\winrelay\gruvi\gruvi\__pycache__\Release\gruvi\
__pycache__\_jsonrpc_ffi.exp
_http_ffi.c
LINK : fatal error LNK1104: cannot open file 'C:\winrelay\gruvi\gruvi\__pycache_
_\_http_ffi.pyd'
Traceback (most recent call last):
  File "C:\python34\lib\distutils\msvc9compiler.py", line 639, in link
    self.spawn([self.linker] + ld_args)
  File "C:\python34\lib\distutils\ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "C:\python34\lib\distutils\spawn.py", line 38, in spawn
    _spawn_nt(cmd, search_path, dry_run=dry_run)
  File "C:\python34\lib\distutils\spawn.py", line 81, in _spawn_nt
    "command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft
 Visual Studio 10.0\\VC\\BIN\\link.exe' failed with exit status 1104

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\python34\lib\site-packages\cffi\ffiplatform.py", line 47, in _build
    dist.run_command('build_ext')
  File "C:\python34\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\python34\lib\site-packages\setuptools\command\build_ext.py", line 52,
 in run
    _build_ext.run(self)
  File "C:\python34\lib\distutils\command\build_ext.py", line 348, in run
    self.build_extensions()
  File "C:\python34\lib\distutils\command\build_ext.py", line 457, in build_exte
nsions
    self.build_extension(ext)
  File "C:\python34\lib\site-packages\setuptools\command\build_ext.py", line 186
, in build_extension
    _build_ext.build_extension(self,ext)
  File "C:\python34\lib\distutils\command\build_ext.py", line 544, in build_exte
nsion
    target_lang=language)
  File "C:\python34\lib\distutils\ccompiler.py", line 717, in link_shared_object

    extra_preargs, extra_postargs, build_temp, target_lang)
  File "C:\python34\lib\distutils\msvc9compiler.py", line 641, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual S
tudio 10.0\\VC\\BIN\\link.exe' failed with exit status 1104

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 116, in <module>
    main()
  File "setup.py", line 92, in main
    import http_ffi, jsonrpc_ffi
  File "gruvi\http_ffi.py", line 95, in <module>
    """, modulename='_http_ffi', ext_package='gruvi', include_dirs=[topdir])
  File "C:\python34\lib\site-packages\cffi\api.py", line 341, in verify
    lib = self.verifier.load_library()
  File "C:\python34\lib\site-packages\cffi\verifier.py", line 74, in load_librar
y
    self._compile_module()
  File "C:\python34\lib\site-packages\cffi\verifier.py", line 139, in _compile_m
odule
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "C:\python34\lib\site-packages\cffi\ffiplatform.py", line 25, in compile
    outputfilename = _build(tmpdir, ext)
  File "C:\python34\lib\site-packages\cffi\ffiplatform.py", line 50, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.ffiplatform.VerificationError: LinkError: command 'C:\\Program Files (x86)\
\Microsoft Visual Studio 10.0\\VC\\BIN\\link.exe' failed with exit status 1104

I'll look into it..