-
Notifications
You must be signed in to change notification settings - Fork 239
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
Project fails to build on Windows Server 2019 #5507
Comments
If I go into Click to see full build log:admin@windows-01 MINGW64 .../miniupnp/miniupnpc ((17cecd5...)) $ make gcc -o build/upnpc-static build/upnpc.o build/libminiupnpc.a c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x93): undefined reference to `__imp_UPNP_GetConnectionTypeInfo' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xc6): undefined reference to `__imp_UPNP_GetStatusInfo' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xf8): undefined reference to `__imp_UPNP_GetLinkLayerMaxBitRates' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1f1): undefined reference to `__imp_UPNP_GetExternalIPAddress'c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x462): undefined reference to `__imp_UPNP_GetExternalIPAddress' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x4c9): undefined reference to `__imp_UPNP_AddAnyPortMapping' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x543): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x59f): undefined reference to `__imp_UPNP_AddPortMapping' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x5f1): undefined reference to `__imp_UPNP_GetSpecificPortMappingEntry' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x663): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x691): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x793): undefined reference to `__imp_WSAStartup' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xd56): undefined reference to `__imp_UPNP_GetIGDFromUrl' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xd92): undefined reference to `__imp_UPNP_GetValidIGD' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xe29): undefined reference to `__imp_upnpDiscover' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xf2d): undefined reference to `__imp_FreeUPNPUrls'c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xf38): undefined reference to `__imp_freeUPNPDevlist' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0xf3e): undefined reference to `__imp_WSACleanup' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1032): undefined reference to `__imp_UPNP_GetGenericPortMappingEntry' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1194): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x120b): undefined reference to `__imp_UPNP_GetListOfPortMappings' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x128f): undefined reference to `__imp_FreePortListing' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x12d8): undefined reference to `__imp_UPNP_GetListOfPortMappings' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x134a): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1371): undefined reference to `__imp_FreePortListing' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x137e): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1481): undefined reference to `__imp_UPNP_DeletePortMapping' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1619): undefined reference to `__imp_UPNP_DeletePortMappingRange' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1708): undefined reference to `__imp_UPNP_GetTotalBytesSent' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x171c): undefined reference to `__imp_UPNP_GetTotalBytesReceived' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1730): undefined reference to `__imp_UPNP_GetTotalPacketsSent' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1744): undefined reference to `__imp_UPNP_GetTotalPacketsReceived' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1a24): undefined reference to `__imp_UPNP_AddPinhole' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1a32): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1acb): undefined reference to `__imp_UPNP_CheckPinholeWorking' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1b30): undefined reference to `__imp_UPNP_UpdatePinhole' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1b54): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1b95): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1c26): undefined reference to `__imp_UPNP_CheckPinholeWorking' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1c34): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1cd7): undefined reference to `__imp_strupnperror' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1cf6): undefined reference to `__imp_UPNP_GetPinholePackets' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1d55): undefined reference to `__imp_UPNP_DeletePinhole' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1da1): undefined reference to `__imp_UPNP_GetFirewallStatus' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1e0e): undefined reference to `__imp_UPNP_GetTotalBytesSent' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1e22): undefined reference to `__imp_UPNP_GetTotalBytesReceived' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1e36): undefined reference to `__imp_UPNP_GetTotalPacketsSent' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1e4a): undefined reference to `__imp_UPNP_GetTotalPacketsReceived' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1ef1): undefined reference to `__imp_UPNP_GetOutboundPinholeTimeout' c:/programdata/scoop/apps/mingw-nuwen/current/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: build/upnpc.o:upnpc.c:(.text+0x1eff): undefined reference to `__imp_strupnperror' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:327: build/upnpc-static] Error 1 >/pre> What's interesting is that here the error is |
What's also interesting is that if I run the command
|
And after that another thing fails, this time
But again, if I take that command and run it manually:
It works... and then |
Upgrading from
To recent normal
Resulted in error:
Which I guess means I have to adjust
|
Interestingly
|
Does this still apply to Windows Server 2022? https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2019 states that as of |
If i remember correctly you need to have |
I have not checked this in a while. Now that Prater is essentially dead it's time to deploy Holesky nodes. Will get back to you once it's re-installed by support and I try to build |
@tersec extended support for 2019 version is until 2029: https://learn.microsoft.com/en-us/lifecycle/products/windows-server-2019 |
I manged to build nimbus@windows-01 MINGW64 ~/beacon-node-holesky-stable
$ bin/nimbus_beacon_node.exe --help
Segmentation fault
nimbus@windows-01 MINGW64 ~/beacon-node-holesky-stable
$ bin/nimbus_beacon_node.exe --version
Segmentation fault I guess I need to open a new issue. |
I think the build issue is no longer relevant. And possibly it was caused by use of Essentials rather than Standard Windows. |
Actually, I just got build failures for
|
I managed to fix it by copying these files from
|
If I build the target directly it works fine:
So it seems to me the issue is clearly directly related to |
This is what
Best bet is that this is caused by order of entries in |
Seems the only modification is addition of libminiupnpc.a: | sanity-checks
ifeq ($(OS), Windows_NT)
+ [ -e vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc/$@ ] || \
PATH=".:${PATH}" "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc -f Makefile.mingw CC=$(CC) $@ $(HANDLE_OUTPUT)
else
+ "$(MAKE)" -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc build/$@ $(HANDLE_OUTPUT)
endif I actually have absolutely no idea what's the point of that |
That was added in:
But WHY? |
Interestingly, after I cleaned up
It started failing again, so i removed the
No idea why it's necessary at all. |
Otherwise the build fails with: ``` nimbus@windows-01 MINGW64 /d/beacon-node-holesky-libp2p/repo (nim-libp2p-auto-bump-unstable) $ make libminiupnpc.a --debug Reading makefiles... Updating makefiles.... Updating goal targets.... File 'libminiupnpc.a' does not exist. File 'sanity-checks' does not exist. Must remake target 'sanity-checks'. Successfully remade target file 'sanity-checks'. Must remake target 'libminiupnpc.a'. process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed. Makefile.mingw:56: pipe: No error gcc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory compilation terminated. make[1]: *** [Makefile.mingw:121: wingenminiupnpcstrings.exe] Error 1 make: *** [vendor/nimbus-build-system/makefiles/targets.mk:134: libminiupnpc.a] Error 2 ``` For more details see: status-im/nimbus-eth2#5507 Signed-off-by: Jakub Sokołowski <jakub@status.im>
Otherwise the build fails with: ``` nimbus@windows-01 MINGW64 /d/beacon-node-holesky-libp2p/repo (nim-libp2p-auto-bump-unstable) $ make libminiupnpc.a --debug Reading makefiles... Updating makefiles.... Updating goal targets.... File 'libminiupnpc.a' does not exist. File 'sanity-checks' does not exist. Must remake target 'sanity-checks'. Successfully remade target file 'sanity-checks'. Must remake target 'libminiupnpc.a'. process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed. Makefile.mingw:56: pipe: No error gcc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory compilation terminated. make[1]: *** [Makefile.mingw:121: wingenminiupnpcstrings.exe] Error 1 make: *** [vendor/nimbus-build-system/makefiles/targets.mk:134: libminiupnpc.a] Error 2 ``` Resolves: status-im/nimbus-eth2#5507 Signed-off-by: Jakub Sokołowski <jakub@status.im>
Also use correct `;` divider. Otherwise the build fails with: ``` nimbus@windows-01 MINGW64 /d/beacon-node-holesky-libp2p/repo (nim-libp2p-auto-bump-unstable) $ make libminiupnpc.a --debug Reading makefiles... Updating makefiles.... Updating goal targets.... File 'libminiupnpc.a' does not exist. File 'sanity-checks' does not exist. Must remake target 'sanity-checks'. Successfully remade target file 'sanity-checks'. Must remake target 'libminiupnpc.a'. process_begin: CreateProcess(NULL, git rev-parse --short HEAD, ...) failed. Makefile.mingw:56: pipe: No error gcc: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory compilation terminated. make[1]: *** [Makefile.mingw:121: wingenminiupnpcstrings.exe] Error 1 make: *** [vendor/nimbus-build-system/makefiles/targets.mk:134: libminiupnpc.a] Error 2 ``` Resolves: status-im/nimbus-eth2#5507 I still don't get why this `PATH` modification is even necessary, it works without it. Signed-off-by: Jakub Sokołowski <jakub@status.im>
Describe the bug
The build fails on Windows Server 2019 on the
make update
call.More specifically it can be reproduced with
make libminiupnpc.a
.To Reproduce
Steps to reproduce the behavior:
Microsoft Windows Server 2019 Standard
,10.0.17763 N/A Build 17763
stable
/23.9.1
/cfa0268d89461bfcba75a6d15e994037a0527726
make update
--debug
flag formake
):Additional context
Found a relevant issue:
There was a fix applied in transmission/miniupnpc@fa4fa71 from this PR:
But it appears we already have this fix in our fork: status-im/miniupnp@d3a7441
Although this comment states that it was not really fixed: miniupnp/miniupnp#270 (comment)
The text was updated successfully, but these errors were encountered: