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

fix exchange module batch builds #1018

Closed
ghost opened this issue Jul 28, 2015 · 6 comments
Closed

fix exchange module batch builds #1018

ghost opened this issue Jul 28, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 28, 2015

This patch resolves issues building the exchange module for 32-bit and 64-bit builds using the project batch build scripts. 64-bit builds now also include dummy functions that will raise a NotImplementedError for all of the unsupported 32-bit ExchangeSDK functions.

This patch also reverts some changes to setup.py introduced in [#124] that are no longer used.

Thanks to Mark for all of his help and suggestions to create this patch.

Building the exchange module requires installation of the Microsoft Exchange 2003 SDK

Reported by: nczeczulin

Original Ticket: pywin32/patches/144

@ghost
Copy link
Author

ghost commented Feb 27, 2016

Sadly I can't make this work. I installed the new SDK and while 32bit builds work, the 64bit builds fail with unresolved externals for the UUIDs:

Creating library build\temp.win-amd64-2.7\Release\com/win32comext/mapi/src\exchange.lib and objec
t build\temp.win-amd64-2.7\Release\com/win32comext/mapi/src\exchange.exp
mapiutil.obj : error LNK2001: unresolved external symbol IID_IProfSect
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMAPIStatus
mapiutil.obj : error LNK2001: unresolved external symbol IID_IABContainer
mapiutil.obj : error LNK2001: unresolved external symbol IID_IDistList
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMailUser
mapiutil.obj : error LNK2001: unresolved external symbol IID_IAttachment
mapiutil.obj : error LNK2001: unresolved external symbol IID_IMessage
build\lib.win-amd64-2.7\win32comext/mapi\exchange.pyd : fatal error LNK1120: 7 unresolved externals
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\link.exe"' failed with exit status 1120

Note that setup.py includes the block:

    if distutils.util.get_platform() == 'win-amd64':
        # Additional utility functions are only available for 32-bit builds.
        pass
    else:
        libs += " version user32 advapi32 Ex2KSdk sadapi netapi32"

but it's not clear there are 64bit libs in that sdk. I'm out of time to dig further. I've attached the patch rebased against current tip.

Original comment by: mhammond

@ghost
Copy link
Author

ghost commented Feb 27, 2016

I seemed to have been behind for some reason when I cloned, so I had to manually resolve the patch. Of course I didn't realize until much later that I was simply missing [#158]. However, I don't think that should have affected my build result being different.

That said, I also originally failed building. Except I failed on the exchdapi module instead. The only change I needed to make for a successful build was:

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -810,7 +810,7 @@
         # Exclude exchange 32-bit utility libraries from 64-bit
         # builds. Note that the exchange module now builds, but only
         # includes interfaces for 64-bit builds.
-        if self.plat_name == 'win-amd64' and ext.name in ['exchdapi', 'exchange']:
+        if self.plat_name == 'win-amd64' and ext.name in ['exchdapi']:
             return "No 64-bit library for utility functions available."
         if get_build_version() >=14 and ext.name in ['exchdapi', 'exchange']:
             return "Haven't worked out how to make exchange modules build on vs2015"

The fact that you are able to build the 32-bit version and only failing on the 64-bit exchange module leaves me puzzled as well.

Original comment by: nczeczulin

@Avasam
Copy link
Collaborator

Avasam commented Mar 16, 2024

Tagging @nczeczulin as the original SourceForge issue creator.

@Avasam
Copy link
Collaborator

Avasam commented Sep 15, 2024

The only downloadable SDK I could find is from 2007 and requires an active subscription: https://my.visualstudio.com/Downloads?q=exchange%20sdk (check the box "All downloads")
Are we sure we still want to try and attempt restoring supporting for this ?
Read #2374 (comment) for more details

@nczeczulin
Copy link
Contributor

There is no 64bit lib. Also, there is an old recommendation from support against using it: EDK Library == Badness

#1404 resolved any dependency the mapi module had on it as well.

@Avasam
Copy link
Collaborator

Avasam commented Oct 11, 2024

Closed by #1404 and #2374 .
MAPI modules also seem deprecated as per #2368

@Avasam Avasam closed this as completed Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants