Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error on Windows10 and need wheel #96

Open
scphantm opened this issue Feb 18, 2018 · 3 comments
Open

Build error on Windows10 and need wheel #96

scphantm opened this issue Feb 18, 2018 · 3 comments

Comments

@scphantm
Copy link

scphantm commented Feb 18, 2018

This is being used as a dependency of another library i am using. can i PLEASE get a py36-win32 wheel for this as i have to figure out how to install this thing on 1800 laptops and installing VC++ on 1800 machines just simply isnt going to happen.

I could care less if its on pypi or not, email it to me, ftp it to me, carrier pigeon, i don't care. I just simply can't be doing compile installs on my winblows machines. I've wasted 2 days and broke about half a dozen corporate policies trying to get this thing to compile to redistribute as it is.

Processing c:\users\lid4ec9\.gradle\caches\modules-2\files-2.1\pypi\psycopg2cffi\2.7.7\ff0beb00e7b30d6935a39dd35044b090cc125d4c\psycopg2cffi-2.7.7.tar.gz
    Complete output from command python setup.py egg_info:
    _cffi__xd0f55f83xcd0f2155.c
       Creating library C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\__pycache__\Release\psycopg2cffi\_impl\__pycache__\_cffi__xd0f55f83xcd0f2155.cp36-win32.lib and object C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\__pycache__\Release\psycopg2cffi\_impl\__pycache__\_cffi__xd0f55f83xcd0f2155.cp36-win32.exp
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQescapeString
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_truncate
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfreemem
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_write
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_export
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQsetnonblocking
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQunescapeBytea
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetvalue
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQconnectPoll
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQresultStatus
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_import
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQoidValue
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQcmdStatus
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQsocket
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQputCopyData
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQstatus
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQisBusy
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQconsumeInput
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQresultErrorField
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfsize
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQserverVersion
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQnotifies
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfname
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQsendQuery
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetCopyData
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQsetNoticeProcessor
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQerrorMessage
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQflush
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetisnull
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQftype
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_read
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQnfields
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQescapeLiteral
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetCancel
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_tell
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfinish
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQrequestCancel
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQresultErrorMessage
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQexec
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_create
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQescapeByteaConn
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_lseek
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQescapeStringConn
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQprotocolVersion
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQcancel
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQtransactionStatus
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetlength
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfreeCancel
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_unlink
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQbackendPID
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQclear
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQfmod
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_open
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQcmdTuples
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQconnectdb
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQntuples
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQescapeBytea
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQputCopyEnd
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQgetResult
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQconnectStart
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _lo_close
    _cffi__xd0f55f83xcd0f2155.obj : error LNK2001: unresolved external symbol _PQparameterStatus
    C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\__pycache__\_cffi__xd0f55f83xcd0f2155.cp36-win32.pyd : fatal error LNK1120: 62 unresolved externals
    Traceback (most recent call last):
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\libpq.py", line 2, in <module>
        from psycopg2cffi._impl._libpq import ffi, lib as libpq
    ModuleNotFoundError: No module named 'psycopg2cffi._impl._libpq'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\_msvccompiler.py", line 478, in link
        self.spawn([self.linker] + ld_args)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\_msvccompiler.py", line 501, in spawn
        return super().spawn(cmd)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\ccompiler.py", line 909, in spawn
        spawn(cmd, dry_run=self.dry_run)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\spawn.py", line 38, in spawn
        _spawn_nt(cmd, search_path, dry_run=dry_run)
      File "C:\highmarkapps\Python\Python36-32\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 14.0\\VC\\BIN\\link.exe' failed with exit status 1120
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\ffiplatform.py", line 51, in _build
        dist.run_command('build_ext')
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\setuptools\command\build_ext.py", line 75, in run
        _build_ext.run(self)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
        self.build_extension(ext)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
        _build_ext.build_extension(self, ext)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\command\build_ext.py", line 558, in build_extension
        target_lang=language)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\ccompiler.py", line 717, in link_shared_object
        extra_preargs, extra_postargs, build_temp, target_lang)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\_msvccompiler.py", line 481, in link
        raise LinkError(msg)
    distutils.errors.LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\setup.py", line 126, in <module>
        setup(**setup_kwargs)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\setuptools\dist.py", line 339, in __init__
        _Distribution.__init__(self, attrs)
      File "C:\highmarkapps\Python\Python36-32\lib\distutils\dist.py", line 281, in __init__
        self.finalize_options()
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\setuptools\dist.py", line 434, in finalize_options
        ep.load()(self, ep.name, value)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\setuptools_ext.py", line 193, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "psycopg2cffi/_impl/_build_libpq.py", line 171, in <module>
        _config = PostgresConfig()
      File "psycopg2cffi/_impl/_build_libpq.py", line 22, in __init__
        from psycopg2cffi import _config
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\__init__.py", line 4, in <module>
        from psycopg2cffi import extensions
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\extensions.py", line 39, in <module>
        from psycopg2cffi._impl import connection as _connection
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\connection.py", line 10, in <module>
        from psycopg2cffi._impl import exceptions
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\exceptions.py", line 12, in <module>
        from psycopg2cffi._impl.libpq import libpq, ffi
      File "C:\Users\lid4ec9\AppData\Local\Temp\pip-x57qsnc4-build\psycopg2cffi\_impl\libpq.py", line 5, in <module>
        libpq = ffi.verify(C_SOURCE, **C_SOURCE_KWARGS)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\api.py", line 444, in verify
        lib = self.verifier.load_library()
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\verifier.py", line 104, in load_library
        self._compile_module()
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\verifier.py", line 201, in _compile_module
        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\ffiplatform.py", line 22, in compile
        outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
      File "C:\HighmarkApps\Willie\code\frameworks\syzygy\syzygy_gradle\build\venv\lib\site-packages\cffi\ffiplatform.py", line 58, in _build
        raise VerificationError('%s: %s' % (e.__class__.__name__, e))
    cffi.error.VerificationError: LinkError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120
    
    ----------------------------------------
@willredington
Copy link

same issue

@jeremylcarter
Copy link

jeremylcarter commented Sep 29, 2020

Any resolution on this? Looks like it can't find libpq.

@ExtReMLapin
Copy link

ExtReMLapin commented Nov 8, 2021

has this error because of missing build tools

sudo apt-get install build-essential plus pip install psycopg2-binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants