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

Allow --debug to pass through to linker on Windows with debug version of python #465

Closed
gus opened this issue Sep 27, 2018 · 0 comments
Closed

Comments

@gus
Copy link

gus commented Sep 27, 2018

Environment

To diagnose, we usually need to know the following, including version numbers. On Windows, be
sure to specify 32-bit Python or 64-bit:

  • Python: 3.5.4 / debug version
  • pyodbc: 4.0.22
  • OS: MS Windows 2016 Datacenter / 10.0.14393
  • DB: n/a
  • driver: n/a

Issue

With a debug version of python, when building pyodbc via setup.py an error is generated creating a DLL:

LINK : fatal error LNK1104: cannot open file 'python35.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1104

The expectation is that link.exe should be using python35_d.lib instead.

I tracked the issue down to this commit and specifically the line removing the --debug flag from sys.argv. Removing that line allows the build to move forward as expected.

While this issue is with 4.0.22, this should also be the case in master as the related code in setup.py is the same. I suspect setup.py needs to check if python itself is the debug version before removing --debug from the sys.argv.

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

1 participant