Skip to content

Conversation

topolarity
Copy link
Member

This works around #56840 by installing GCC 12 instead of GCC 13, which fails with the error:

    LINK usr/lib/julia/basecompiler.dll
/usr/lib/gcc/x86_64-w64-mingw32/13/../../../../x86_64-w64-mingw32/bin/ld: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o: in function `_CRT_INIT':
/usr/src/debug/mingw64-x86_64-runtime-13.0.0-1/crt/crtdll.c:82:(.text+0x13b): undefined reference to `_initterm_e'
collect2: error: ld returned 1 exit status

This works around #56840
by installing GCC 12 instead of GCC 13, which fails with the error:
```
    LINK usr/lib/julia/basecompiler.dll
/usr/lib/gcc/x86_64-w64-mingw32/13/../../../../x86_64-w64-mingw32/bin/ld: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/dllcrt2.o: in function `_CRT_INIT':
/usr/src/debug/mingw64-x86_64-runtime-13.0.0-1/crt/crtdll.c:82:(.text+0x13b): undefined reference to `_initterm_e'
collect2: error: ld returned 1 exit status
```
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. Though I'm still a bit confused how this error arises, since it successfully links everything up until the system image. Possibly we should use lld to link the system image (just like we'll use it to link the pkgimages)?

@topolarity topolarity merged commit 71329d5 into master Sep 15, 2025
6 of 8 checks passed
@topolarity topolarity deleted the ct/fix-win-build-instructions branch September 15, 2025 19:19
@topolarity
Copy link
Member Author

Possibly we should use lld to link the system image (just like we'll use it to link the pkgimages)?

Hmm, seems that with a debug build lld hits similar issues:

lld: error: undefined symbol: __stack_chk_guard━━━━━━━━━━━━━━━━ 0/106
>>> referenced by jl_F83.tmp(text#0.o):(.refptr.__stack_chk_guard)
  ◑ dSFMT_jll -O3
  ◑ dSFMT_jll --check-bounds=yes -O3
...
  ◑ Downloads --check-bounds=yes -O3
lld: error: undefined symbol: __stack_chk_guard
>>> referenced by jl_F2A.tmp(text#0.o):(.refptr.__stack_chk_guard)
lld: error: undefined symbol: __stack_chk_guard
>>> referenced by jl_F17.tmp(text#0.o):(.refptr.__stack_chk_guard)
lld: error: undefined symbol: __stack_chk_guard
>>> referenced by jl_F2D.tmp(text#0.o):(.refptr.__stack_chk_guard)
lld: error: undefined symbol: __stack_chk_guard
>>> referenced by jl_F30.tmp(text#0.o):(.refptr.__stack_chk_guard)
Unhandled Task ERROR: failed process: Process(setenv(`'C:\cygwin64\home\cody\repos\julia\usr\tools\lld.exe' -flavor gnu -m i386pep -Bdynamic --enable-auto-image-base --allow-multiple-definition --disable-auto-import --disable-runtime-pseudo-reloc '' -shared -o 'C:\cygwin64\home\cody\repos\julia\usr\share\julia\compiled\v1.13\Base64\jl_F84.tmp' --whole-archive 'C:\cygwin64\home\cody\repos\julia\usr\share\julia\compiled\v1.13\Base64\jl_F83.tmp' --no-whole-archive '-LC:\cygwin64\home\cody\repos\julia\usr\lib\julia' '-LC:\cygwin64\home\cody\repos\julia\usr\bin' -ljulia-debug -ljulia-internal-debug -lopenlibm -lgcc_s -lgcc -lmsvcrt -lssp`,["ORBIT_UPDATE_INTERVAL=15m0s", "WINDIR=C:\\windows", "TERM=xterm", "ORIGINAL_PATH=/cygdrive/c/windows/system32:/cygdrive/c/windows:/cygdrive/c/windows/System32/Wbem:/cygdrive/c/windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/windows/System32/OpenSSH:%USERPROFILE%/AppData/Local/Microsoft/WindowsApps:/cygdrive/c/Users/cody/AppData/Local/Programs/Espanso", "=::=::\\", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "OPENBLAS_MAIN_FREE=1", "PROGRAMFILES=C:\\Program Files", "PROFILEREAD=true", "ALLUSERSPROFILE=C:\\ProgramData"  …  "HOME=C:\\cygwin64\\home\\cody", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "USERDOMAIN=DELL-TOPOS-MACH", "_=/home/cody/repos/julia/usr/bin/julia-debug.exe", "EXECIGNORE=*.dll", "COMPUTERNAME=DELL-TOPOS-MACH", "APPDATA=C:\\Users\\cody\\AppData\\Roaming", "MAKE_TERMERR=/dev/pty0", "LANG=C", "ONEDRIVE=C:\\Users\\cody\\OneDrive"]), ProcessExited(1)) [1]

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

Successfully merging this pull request may close these issues.

2 participants