BrowserWorks / Waterfox-Classic

The Waterfox Classic repository, for legacy systems and customisation.
https://classic.waterfox.net
Mozilla Public License 2.0
175 stars 34 forks source link

Windows action failing #173

Closed adamp01 closed 1 year ago

adamp01 commented 1 year ago

Describe the bug Windows GHA is failing to build due to error below. I'll take a look to see when this started happening.

@hawkeye116477 - any ideas on this? nsprpub hasn't been updated and doesn't seem like anything touching this has changed...

 10:13.04 config/external/nspr/pr
10:20.60 config/external/nspr/ds
10:22.14 config/external/nspr/libc
10:25.02 d:/a/Waterfox-Classic/Waterfox-Classic/nsprpub/pr/src/io/prsocket.c(310,41): error: incompatible integer to pointer conversion passing 'PROsfd' (aka 'long long') to parameter of type 'HANDLE' (aka 'void *') [-Wint-conversion]
10:25.02                 if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == FALSE) {
10:25.02                                         ^~~~
10:25.02 C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\ioapiset.h(106,17): note: passing argument to parameter 'hFile' here
10:25.02     _In_ HANDLE hFile,
10:25.02                 ^
10:25.02 d:/a/Waterfox-Classic/Waterfox-Classic/nsprpub/pr/src/io/prsocket.c(342,33): error: incompatible integer to pointer conversion passing 'PROsfd' (aka 'long long') to parameter of type 'HANDLE' (aka 'void *') [-Wint-conversion]
10:25.02         if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == TRUE) {
10:25.02                                 ^~~~
10:25.02 C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um\ioapiset.h(106,17): note: passing argument to parameter 'hFile' here
10:25.02     _In_ HANDLE hFile,
10:25.02                 ^
10:25.02 d:/a/Waterfox-Classic/Waterfox-Classic/nsprpub/pr/src/io/prsocket.c(1239,23): error: incompatible integer to pointer conversion assigning to 'PRInt16 *' (aka 'short *') from 'int' [-Wint-conversion]
10:25.02             out_flags = PR_POLL_WRITE;
10:25.02                       ^ ~~~~~~~~~~~~~
10:25.02 3 errors generated.
10:25.03 mozmake.EXE[4]: *** [d:/a/Waterfox-Classic/Waterfox-Classic/config/rules.mk;766: prsocket.obj] Error 1
10:25.03 mozmake.EXE[3]: *** [d:/a/Waterfox-Classic/Waterfox-Classic/config/recurse.mk;73: config/external/nspr/pr/target] Error 2
10:25.03 mozmake.EXE[3]: *** Waiting for unfinished jobs....
10:25.89 mozmake.EXE[2]: *** [d:/a/Waterfox-Classic/Waterfox-Classic/config/recurse.mk;33: compile] Error 2
10:25.89 mozmake.EXE[1]: *** [d:/a/Waterfox-Classic/Waterfox-Classic/config/rules.mk;420: default] Error 2
10:25.91 mozmake.EXE: *** [client.mk;168: build] Error 2
10:25.96 0 compiler warnings present.
adamp01 commented 1 year ago

Looks like it started failing here: https://github.com/WaterfoxCo/Waterfox-Classic/actions/runs/2973258387

hawkeye116477 commented 1 year ago

Update NSPR to 4.35 or try apply as patch => https://hg.mozilla.org/projects/nspr/rev/54206e98cb4b75bcfa959830647eb8ef1b3f6c40. Eventually you can try with last good working llvm/clang version (14.0.6, scoop install [app]@[version]).

adamp01 commented 1 year ago

Thanks @hawkeye116477 - I applied just the patch and that improved things, still getting one error:

10:28.31 d:/a/Waterfox-Classic/Waterfox-Classic/nsprpub/pr/src/io/prsocket.c(1239,23): error: incompatible integer to pointer conversion assigning to 'PRInt16 *' (aka 'short *') from 'int' [-Wint-conversion]
10:28.31             out_flags = PR_POLL_WRITE;

Will try updating NSPR to 4.35 instead.

adamp01 commented 1 year ago

Resolved that specific issue as well, will see if that works and if not I'll just use 4.35

adamp01 commented 1 year ago

@hawkeye116477 Next error:

137:35.91 xul.dll
137:37.98 lld-link: error: undefined symbol: __declspec(dllimport) BCryptGenRandom
137:37.98 >>> referenced by /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\sync\once.rs:334
137:37.98 >>>               gkrust.lib(gkrust-fc3cf28ee1502e87.gkrust.364ecee5-cgu.0.rcgu.o):(std::sync::once::Once::call_once_force::_$u7b$$u7b$closure$u7d$$u7d$::h3ae91ed18eb223f3)
137:37.98 >>> referenced by /rustc/4b91a6ea7258a947e59c6522cd5898e7c0a6a88f/library\std\src\thread\local.rs:987
137:37.98 >>>               gkrust.lib(gkrust-fc3cf28ee1502e87.gkrust.364ecee5-cgu.0.rcgu.o):(std::thread::local::fast::Key$LT$T$GT$::try_initialize::ha63d03baeccc6976)

Is it reasonable to assume this is related to bumping rust version? Seems like it started occuring once we moved to v 1.63 in actions.

hawkeye116477 commented 1 year ago

That's the possible fix => https://bugzilla.mozilla.org/show_bug.cgi?id=1746785.

adamp01 commented 1 year ago

Thanks!

hawkeye116477 commented 1 year ago

From what I've read, looks like fix from https://hg.mozilla.org/releases/mozilla-esr91/rev/236ec0e8b771 also might be needed (except crashreporter part). Alternatively you can try switching back in GH Actions config to rust 1.56.1 (should be still compatible with current code).

adamp01 commented 1 year ago

Thanks for all the help @hawkeye116477, have managed to get it all fixed now. You really helped speed this up

ljcool2006 commented 1 year ago

It's still failing.

hawkeye116477 commented 1 year ago

It's still failing.

That's only CloudFlare action, which always failed :smile:.

ljcool2006 commented 1 year ago

It's still failing.

That's only CloudFlare action, which always failed 😄.

You might need to double check...

image

hawkeye116477 commented 1 year ago

Ah, right. I just quickly looked at latest commit and only saw testing version.

In that case looks like that keys for signing are expired and someone needs to generate new.