Thunderbird windows builds busted - port bug 1684110 - /builds/worker/checkouts/gecko/comm/mail/components/search/nsMailWinSearchHelper.cpp(108,7): error: call to deleted function 'OpenSCManager'
Categories
(Thunderbird :: Upstream Synchronization, task, P1)
Tracking
(thunderbird_esr78 unaffected, thunderbird85 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | unaffected |
thunderbird85 | --- | unaffected |
People
(Reporter: mkmelin, Assigned: it)
References
(Regression)
Details
Attachments
(1 file, 4 obsolete files)
19.27 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
Regressed by something from https://hg.mozilla.org/mozilla-central/pushloghtml?changeset=cf6956a5ec8e21896736f96237b1476c9d0aaf45
I don't see what regressed it. The only thing possibly related seems bug 1684532 but that's a longshot.
Reporter | ||
Comment 1•3 years ago
|
||
There's also
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - /builds/worker/checkouts/gecko/comm/mailnews/addrbook/src/nsMapiAddressBook.cpp(35,27): error: call to deleted function 'LoadLibrary'
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - HMODULE libraryHandle = LoadLibrary("MAPI32.DLL");
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - ^~~~~~~~~~~
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - /builds/worker/workspace/obj-build/dist/stl_wrappers/windows.h(969,1): note: candidate function has been explicitly deleted
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - LoadLibrary(LPCTSTR a0)
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - ^
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - /builds/worker/checkouts/gecko/comm/mailnews/addrbook/src/nsMapiAddressBook.cpp(44,21): error: call to deleted function 'LoadLibrary'
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - libraryHandle = LoadLibrary("MAPI32BAK.DLL");
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - ^~~~~~~~~~~
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - /builds/worker/workspace/obj-build/dist/stl_wrappers/windows.h(969,1): note: candidate function has been explicitly deleted
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - LoadLibrary(LPCTSTR a0)
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - ^
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - 2 errors generated.
[task 2021-01-14T10:22:46.808Z] 10:22:46 ERROR - make[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:674: nsMapiAddressBook.obj] Error 1
[task 2021-01-14T10:22:46.808Z] 10:22:46 INFO - make[4]: Leaving directory '/builds/worker/workspace/obj-build/comm/mailnews/addrbook/src'
:toshi, any ideas? Could bug 1684532 have caused this?
Assignee | ||
Comment 2•3 years ago
|
||
OpenSCManager and LoadLibrary are Windows functions "wrapped" in https://searchfox.org/mozilla-central/source/__GENERATED__/dist/stl_wrappers/windows.h. Something happened to that wrapping? Would it be permissible to use the "native" A/W versions instead?
Reporter | ||
Comment 3•3 years ago
|
||
Oh, I see now. Bug 1684110.
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
So the calls should be like LoadLibraryW(L"foo.dll");
now, instead of LoadLibrary?
https://searchfox.org/comm-central/search?q=LoadLibrary%28&path=mail&case=false®exp=false
Richard, are you able to check if that works?
Comment 5•3 years ago
|
||
If you get me a patch I can try it.
Assignee | ||
Comment 6•3 years ago
|
||
This is incomplete, there are far more issues.
Comment 7•3 years ago
|
||
I don't get the loadLibrary error but like this one now:
1:20.65 comm/mailnews/mapi/mapihook/src
1:21.13 z:/Mozilla/comm-central/comm/mailnews/import/src/MapiApi.cpp(918,22): error: no matching function for call to 'strlen'
1:21.13 int strLen = strlen(lpStr);
1:21.14 ^~~~~~
1:21.15 C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\string.h(219,16): note: candidate function not viable: no known conversion from 'LPCTSTR' (aka 'const wchar_t *') to 'const char *' for 1st argument
1:21.16 size_t __cdecl strlen(
Assignee | ||
Comment 8•3 years ago
|
||
This compiles so far. This will need revisiting since we believe that like in the first patch, UNICODE should be set, but that causes a heap of other issues.
Reporter | ||
Comment 9•3 years ago
•
|
||
Comment on attachment 9197069 [details] [diff] [review]
take2.patch
Sent this to try now: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=55ed66774e05619b6f0a84fc6898450d7bad2e56
If it seems ok, let's get it landed.
Assignee | ||
Comment 10•3 years ago
|
||
Hmm, still doesn't compile. We'll take another look.
Assignee | ||
Comment 11•3 years ago
|
||
Somehow dependencies are not set up correctly, so mailnews/mapi/mapihook/src was missed in our prior build.
Comment 13•3 years ago
|
||
OK so I need to figure out if this is what is going to land. Need to figure out if the SeaMonkey suite builds successfully with what the final fix is or if I need to do a followup fix the suite patch.
Reporter | ||
Comment 14•3 years ago
|
||
Comment on attachment 9197106 [details] [diff] [review]
take2.patch - final
Sent to try: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=7a6fc5341706a797c05fd99e16935084978118ab
Comment 15•3 years ago
|
||
Comment on attachment 9197106 [details] [diff] [review] take2.patch - final Review of attachment 9197106 [details] [diff] [review]: ----------------------------------------------------------------- ::: mailnews/addrbook/src/nsWabAddressBook.cpp @@ +32,5 @@ > DWORD keyType = 0; > ULONG byteCount = sizeof(wabDLLPath); > HKEY keyHandle = NULL; > wabDLLPath[MAX_PATH - 1] = 0; > + // W-version not defined in WabApi.h. `L"" WAB_DLL_PATH_KEY` will work. ::: mailnews/import/src/MapiMimeTypes.cpp @@ +42,5 @@ > BOOL CMimeTypes::GetMimeTypeFromReg(const nsCString& ext, LPBYTE* ppBytes) { > HKEY extensionKey; > BOOL result = FALSE; > *ppBytes = NULL; > + if (GetKey(HKEY_CLASSES_ROOT, NS_ConvertUTF8toUTF16(ext).get(), Please do not (unless `ext` will never contain non-ASCII characters). Use `NS_CopyNativeToUnicode`.
Comment 16•3 years ago
|
||
Comment on attachment 9197106 [details] [diff] [review] take2.patch - final Review of attachment 9197106 [details] [diff] [review]: ----------------------------------------------------------------- ::: mailnews/import/src/MapiMimeTypes.cpp @@ +42,5 @@ > BOOL CMimeTypes::GetMimeTypeFromReg(const nsCString& ext, LPBYTE* ppBytes) { > HKEY extensionKey; > BOOL result = FALSE; > *ppBytes = NULL; > + if (GetKey(HKEY_CLASSES_ROOT, NS_ConvertUTF8toUTF16(ext).get(), The only caller of CMimeTypes::GetMimeTypeFromReg is CMimeTypes::GetMimeType(const nsCString&) and the only caller of CMimeTypes::GetMimeType(const nsCString&) is CMimeTypes::GetMimeType(const nsString&) and it calls LossyCopyUTF16toASCII. So `ext` is converted UTF-16 to ASCII and then converted back to UTF-16. Could you please just remove these useless conversions?
Assignee | ||
Comment 17•3 years ago
|
||
Yes, we came to the same conclusion.
Assignee | ||
Comment 18•3 years ago
|
||
Comment 19•3 years ago
|
||
I pushed to https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=35ae4df401161a1840337012a379040ece0b64f0, it's still building.
Reporter | ||
Comment 20•3 years ago
|
||
Comment on attachment 9197235 [details] [diff] [review] take2.patch - really final Review of attachment 9197235 [details] [diff] [review]: ----------------------------------------------------------------- Looks like success, thx! r=mkmelin
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Comment 21•3 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/9ca01b9e6433
Port bug 1684110: Switch to wide char for some Windows interfaces. r=mkmelin
Comment hidden (Intermittent Failures Robot) |
Comment 23•3 years ago
|
||
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/3c3a5e26805c followup - apply clang-format. rs=clang-format
Description
•