Skip to content

Instantly share code, notes, and snippets.

@inkydragon
Last active June 15, 2026 10:33
Show Gist options
  • Select an option

  • Save inkydragon/40cb95c5cf1077fa900dbcfe25de8b23 to your computer and use it in GitHub Desktop.

Select an option

Save inkydragon/40cb95c5cf1077fa900dbcfe25de8b23 to your computer and use it in GitHub Desktop.
JuliaLang/julia#56840 - By: Claude Code + DeepSeek V4 Pro
#!/bin/bash
# ============================================================
# Issue #56840 CRT version mismatch diagnosis script
# Run from the build directory (e.g., julia-w64/).
# Source tree is assumed to be one level up (../).
# ============================================================
set -euo pipefail
echo "============================================================"
echo " CRT Version Mismatch Diagnosis"
echo " Issue: https://github.com/JuliaLang/julia/issues/56840"
echo "============================================================"
# ----------------------------------------------------------
# 1. Julia and CSL version
# ----------------------------------------------------------
echo ""
echo "========== 1. Julia & CSL Version =========="
echo "Julia versioninfo:"
./julia.bat -e 'using InteractiveUtils; versioninfo()' 2>/dev/null || \
./julia -e 'using InteractiveUtils; versioninfo()' 2>/dev/null || \
echo "(julia executable not found)"
echo ""
echo "CSL version (stdlib/CompilerSupportLibraries_jll/Project.toml):"
grep 'version\s*=' ../stdlib/CompilerSupportLibraries_jll/Project.toml 2>/dev/null || \
grep 'version\s*=' ../usr/share/julia/stdlib/*/CompilerSupportLibraries_jll/Project.toml 2>/dev/null || \
echo "(not found)"
# ----------------------------------------------------------
# 2. Compiler environment versions
# ----------------------------------------------------------
echo ""
echo "========== 2. Compiler Environment =========="
echo "GCC version:"
gcc --version | head -1
echo "GCC target triplet:"
gcc -dumpmachine
echo "GCC major version number:"
gcc -dumpversion
echo "ld version:"
ld --version | head -1
echo ""
echo "clang version:"
clang --version 2>/dev/null | head -1 || echo "(clang not available)"
echo "MSYSTEM:"
echo "${MSYSTEM:-<not set>}"
echo "uname -a:"
uname -a
echo ""
echo "Key make variables:"
make --no-print-directory print-CC print-CXX print-FC print-AR print-CROSS_COMPILE print-XC_HOST print-USE_BINARYBUILDER_CSL print-BUILD_OS print-OS print-ARCH 2>/dev/null
# ----------------------------------------------------------
# 3. System CRT library paths
# ----------------------------------------------------------
echo ""
echo "========== 3. System CRT Paths (GCC Resolution) =========="
echo "dllcrt2.o:"
gcc -print-file-name=dllcrt2.o
echo "crtbegin.o:"
gcc -print-file-name=crtbegin.o
echo "crtend.o:"
gcc -print-file-name=crtend.o
echo "libmsvcrt.a:"
gcc -print-file-name=libmsvcrt.a
echo "libmingw32.a:"
gcc -print-file-name=libmingw32.a
echo "libmingwex.a:"
gcc -print-file-name=libmingwex.a
echo "libmoldname.a:"
gcc -print-file-name=libmoldname.a
echo "libgcc.a:"
gcc -print-file-name=libgcc.a
echo "libgcc_s.a:"
gcc -print-file-name=libgcc_s.a
echo "libssp.dll.a:"
gcc -print-file-name=libssp.dll.a
# ----------------------------------------------------------
# 4. System dllcrt2.o & crtbegin.o undefined symbols
# ----------------------------------------------------------
echo ""
echo "========== 4. System Startup Objects — Undefined Symbols =========="
SYS_DLLCRT2=$(gcc -print-file-name=dllcrt2.o)
echo "--- dllcrt2.o (calls these): ---"
nm -u "$SYS_DLLCRT2" | sort
SYS_CRTBEGIN=$(gcc -print-file-name=crtbegin.o)
echo "--- crtbegin.o (calls these): ---"
nm -u "$SYS_CRTBEGIN" 2>/dev/null | sort
# ----------------------------------------------------------
# 5. System CRT import libraries — provided symbols
# ----------------------------------------------------------
echo ""
echo "========== 5. System CRT Import Libraries — Provided Symbols =========="
SYS_MSVCRT=$(gcc -print-file-name=libmsvcrt.a)
echo "--- libmsvcrt.a (initterm symbols): ---"
nm "$SYS_MSVCRT" 2>/dev/null | grep -i "initterm" || echo "(none)"
SYS_MINGW32=$(gcc -print-file-name=libmingw32.a)
echo "--- libmingw32.a (DllEntryPoint): ---"
nm "$SYS_MINGW32" 2>/dev/null | grep -i "DllEntry" || echo "(none)"
# ----------------------------------------------------------
# 6. CSL-bundled copy (build_private_libdir)
# ----------------------------------------------------------
echo ""
echo "========== 6. CSL-Bundled Copies in build_private_libdir =========="
BUILD_PRIVATE_LIBDIR="usr/lib/julia"
if [ -d "$BUILD_PRIVATE_LIBDIR" ]; then
echo "--- dllcrt2.o (calls these): ---"
nm -u "$BUILD_PRIVATE_LIBDIR/dllcrt2.o" 2>/dev/null | sort || echo "(file not found)"
echo "--- crtbegin.o (calls these): ---"
nm -u "$BUILD_PRIVATE_LIBDIR/crtbegin.o" 2>/dev/null | sort || echo "(file not found)"
echo "--- libmsvcrt.a (initterm symbols): ---"
nm "$BUILD_PRIVATE_LIBDIR/libmsvcrt.a" 2>/dev/null | grep -i "initterm" || echo "(none)"
echo "--- libmingw32.a (DllEntryPoint): ---"
nm "$BUILD_PRIVATE_LIBDIR/libmingw32.a" 2>/dev/null | grep -i "DllEntry" || echo "(none)"
else
echo "(build_private_libdir not found at $BUILD_PRIVATE_LIBDIR)"
echo "Run this script from the build directory, e.g. julia-w64/"
fi
# ----------------------------------------------------------
# 7. Cross-reference: initterm symbols on each side
# ----------------------------------------------------------
echo ""
echo "========== 7. Cross-Reference: initterm Symbol Match =========="
echo " System dllcrt2.o calls:"
nm -u "$SYS_DLLCRT2" | grep initterm || echo " (none)"
echo " System libmsvcrt.a provides:"
nm "$SYS_MSVCRT" 2>/dev/null | grep -E " T _+initterm" || echo " (none)"
if [ -d "$BUILD_PRIVATE_LIBDIR" ]; then
echo " CSL dllcrt2.o calls:"
nm -u "$BUILD_PRIVATE_LIBDIR/dllcrt2.o" 2>/dev/null | grep initterm || echo " (none)"
echo " CSL libmsvcrt.a provides:"
nm "$BUILD_PRIVATE_LIBDIR/libmsvcrt.a" 2>/dev/null | grep -E " T _+initterm" || echo " (none)"
fi
# ----------------------------------------------------------
# 8. sysimage.mk link command (current state)
# ----------------------------------------------------------
echo ""
echo "========== 8. sysimage.mk Link Command =========="
sed -n '/build_private_libdir.*SHLIB_EXT.*build_private_libdir.*%-o\.a/,/DSYMUTIL/p' ../sysimage.mk 2>/dev/null || \
echo "(check failed — run from build dir with source at ../)"
echo ""
echo "============================================================"
echo " Diagnosis complete."
echo " If 'System dllcrt2.o calls' includes _initterm_e but"
echo " 'CSL libmsvcrt.a provides' does NOT include _initterm_e,"
echo " then the CRT version mismatch is confirmed."
echo "============================================================"
============================================================
CRT Version Mismatch Diagnosis
Issue: https://github.com/JuliaLang/julia/issues/56840
============================================================
========== 1. Julia & CSL Version ==========
Julia versioninfo:
Julia Version 1.14.0-DEV.2368
Build Info:
Commit fbe7e5c474 (2026-06-15 10:18 UTC)
GC: Built with stock GC
Platform Info:
OS: Windows (i686-w64-windows-gnu-elf)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900HX (pentium4)
WORD_SIZE: 32
LLVM: libLLVM-21.1.8 (ORCJIT, pentium4)
Threads: 1 default, 1 interactive, 1 GC (on 32 virtual cores)
CSL version (stdlib/CompilerSupportLibraries_jll/Project.toml):
version = "1.5.2+0"
========== 2. Compiler Environment ==========
GCC version:
gcc.exe (Rev5, Built by MSYS2 project) 16.1.0
GCC target triplet:
i686-w64-mingw32
GCC major version number:
16.1.0
ld version:
GNU ld (GNU Binutils) 2.46
clang version:
(clang not available)
MSYSTEM:
MINGW32
uname -a:
MINGW32_NT-10.0-26200 A309-Y9000P 3.6.9-01d6c708.x86_64 2026-05-24 10:45 UTC x86_64 Msys
Key make variables:
CC=gcc -march=pentium4 -m32
CXX=g++ -march=pentium4 -m32
FC=gfortran -march=pentium4 -m32
AR=ar
CROSS_COMPILE=
XC_HOST=
USE_BINARYBUILDER_CSL=
BUILD_OS=WINNT
OS=WINNT
ARCH=i686
========== 3. System CRT Paths (GCC Resolution) ==========
dllcrt2.o:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/dllcrt2.o
crtbegin.o:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/crtbegin.o
crtend.o:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/crtend.o
libmsvcrt.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/libmsvcrt.a
libmingw32.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/libmingw32.a
libmingwex.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/libmingwex.a
libmoldname.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/libmoldname.a
libgcc.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/libgcc.a
libgcc_s.a:
D:/env/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/16.1.0/../../../../lib/libgcc_s.a
libssp.dll.a:
libssp.dll.a
========== 4. System Startup Objects — Undefined Symbols ==========
--- dllcrt2.o (calls these): ---
U ___dyn_tls_init_callback
U ___main
U ___mingw_app_type
U ___native_dllmain_reason
U ___native_startup_lock
U ___native_startup_state
U ___xc_a
U ___xc_z
U ___xi_a
U ___xi_z
U __amsg_exit
U __execute_onexit_table
U __imp__Sleep@4
U __initialize_onexit_table
U __initterm
U __initterm_e
U __pei386_runtime_relocator
U __register_onexit_function
U _DllMain@12
--- crtbegin.o (calls these): ---
U __imp__FreeLibrary@4
U __imp__GetModuleHandleA@4
U __imp__GetProcAddress@8
U __imp__LoadLibraryA@4
U _atexit
w ___deregister_frame_info
w ___register_frame_info
========== 5. System CRT Import Libraries — Provided Symbols ==========
--- libmsvcrt.a (initterm symbols): ---
lib32_libmsvcrt_extra_a-_initterm_e.o:
00000000 D __imp___initterm_e
00000000 T __initterm_e
00000000 I __imp___initterm
00000000 T __initterm
--- libmingw32.a (DllEntryPoint): ---
(none)
========== 6. CSL-Bundled Copies in build_private_libdir ==========
--- dllcrt2.o (calls these): ---
U ___dyn_tls_init_callback
U ___main
U ___mingw_app_type
U ___native_dllmain_reason
U ___native_startup_lock
U ___native_startup_state
U ___xc_a
U ___xc_z
U ___xi_a
U ___xi_z
U __amsg_exit
U __execute_onexit_table
U __imp__Sleep@4
U __initialize_onexit_table
U __initterm
U __pei386_runtime_relocator
U __register_onexit_function
U _DllEntryPoint@12
U _DllMain@12
--- crtbegin.o (calls these): ---
U _atexit
--- libmsvcrt.a (initterm symbols): ---
00000000 I __imp___initterm
00000000 T __initterm
--- libmingw32.a (DllEntryPoint): ---
(none)
========== 7. Cross-Reference: initterm Symbol Match ==========
System dllcrt2.o calls:
U __initterm
U __initterm_e
System libmsvcrt.a provides:
00000000 T __initterm_e
00000000 T __initterm
CSL dllcrt2.o calls:
U __initterm
CSL libmsvcrt.a provides:
00000000 T __initterm
========== 8. sysimage.mk Link Command ==========
$(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%-o.a
@$(call PRINT_LINK, $(CXX) $(LDFLAGS) -shared $(fPIC) -L$(build_libdir) -L$(build_shlibdir) -o $@ \
$(call whole_archive,$<) \
$(if $(findstring -debug,$(notdir $@)),-ljulia-internal-debug -ljulia-debug,-ljulia-internal -ljulia) \
$$([ $(OS) = WINNT ] && echo '' $(LIBM) -lssp -Wl,--disable-auto-import -Wl,--disable-runtime-pseudo-reloc))
@$(INSTALL_NAME_CMD)$(notdir $@) $@
@$(DSYMUTIL) $@
============================================================
Diagnosis complete.
If 'System dllcrt2.o calls' includes _initterm_e but
'CSL libmsvcrt.a provides' does NOT include _initterm_e,
then the CRT version mismatch is confirmed.
============================================================

Issue #56840 — CSL CRT Version Mismatch Root Cause Analysis

Issue: JuliaLang/julia#56840 Fix branch: cyhan/csl-sysimage (based on master)

1. Problem

When building Julia on Windows MSYS2 MINGW64, linking sys.dll (basecompiler.dll) fails:

ld.exe: dllcrt2.o: undefined reference to `_initterm_e'

2. Failure Localization

2.1 Files Participating in the Link

The sys.dll link command in sysimage.mk:22 (before the fix):

$(CXX) $(LDFLAGS) -shared $(fPIC) -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ ...

Files participating in the link fall into two injection paths:

Injection Path File Source Can -L override?
GCC spec hardcoded absolute path dllcrt2.o System compiler (/mingw64/.../lib/dllcrt2.o)
GCC spec hardcoded absolute path crtbegin.o System compiler (/mingw64/.../gcc/16.1.0/crtbegin.o)
GCC spec hardcoded absolute path crtend.o System compiler (/mingw64/.../gcc/16.1.0/crtend.o)
-L + implicit -l libmsvcrt.a build_private_libdir (CSL, GCC 15 CRT)
-L + implicit -l libmingw32.a build_private_libdir (CSL, GCC 15 CRT)
-L + explicit -lssp libssp.dll.a build_private_libdir (CSL)

2.2 Version Mismatch

The user's build machine uses GCC 16. Its mingw-w64 CRT's dllcrt2.o calls both _initterm and _initterm_e. CSL (CompilerSupportLibraries jll) ships GCC 15's mingw-w64 CRT, whose libmsvcrt.a provides only _initterm, not _initterm_e.

┌───────────────────────────────────────────────────────────┐
│ GCC spec injection (absolute path, -L cannot override)     │
│                                                             │
│  dllcrt2.o → System GCC 16 CRT                             │
│    U _initterm                                               │
│    U _initterm_e   ← needed                                 │
├───────────────────────────────────────────────────────────┤
│ -L$(build_private_libdir) is first in search order          │
│                                                             │
│  libmsvcrt.a → CSL (GCC 15 CRT)                             │
│    T _initterm      ← provided                               │
│    (no _initterm_e) ← missing ❌                              │
└───────────────────────────────────────────────────────────┘

3. Root Cause: A Historical Leftover Parameter

3.1 Origin of -L$(build_private_libdir)

The link command in sysimage.mk traces back to the 2013 Makefile:

2013-11-22  "static compiling prototype"
  Introduced sys.dll link command:
    -L$(BUILD)/$(JL_PRIVATE_LIBDIR) -L$(BUILD)/$(JL_LIBDIR) -o $@ $< \
      -lgrisu -lrandom -lgmp -lpcre -lmpfr $(LIBBLAS) $(LIBLAPACK) ...

  Purpose of -L$(build_private_libdir): find Julia's own build of
  third-party libraries

2013-11-29  "lookup all ccall/cglobal values at runtime"
  Transitioned to runtime loading; removed all explicit -l libraries
  (-lgrisu, -lgmp, etc.)
  Added: -lssp (Windows)
  But -L$(build_private_libdir) was forgotten, becoming a dead parameter

2014-03-29  "assume libssp-0.dll is needed. fix #6153"
  Changed -lssp to unconditional linking on Windows

2024+  CSL began placing mingw-w64 CRT import libraries in private_libdir
  The dead parameter suddenly had a side effect → #56840

3.2 Why It Was a Dead Parameter

After November 29, 2013, the sys.dll link command no longer needed any file from build_private_libdir:

  • -ljulia-internal / -ljulia: located in $(build_libdir), not $(build_private_libdir)
  • -lssp: present in GCC's default search paths (the system GCC ships libssp.dll.a)
  • Implicit -lmingw32 -lmsvcrt -lgcc -lgcc_s: resolved from GCC's default search paths
  • dllcrt2.o / crtbegin.o / crtend.o: injected by GCC spec via absolute paths, never affected by -L

This parameter had no function for 12 consecutive years.

4. Correct Role of CRT Files in CSL

4.1 Julia Has Two Independent Link Paths

sysimage.mk (GCC) linking.jl (LLD)
When Julia build time User runtime (pkgimage compilation)
Linker Build machine's GCC Julia's bundled LLD
CRT should come from System compiler (must match spec-injected dllcrt2.o) CSL fixed version (reproducible, CI-tested)
File retrieval GCC spec + -L search _find_static() + explicit -L

4.2 CSL Must Continue to Provide These Files

linking.jl (LLD, pkgimage linking):
  _find_static("dllcrt2.o")  → private_libdir/dllcrt2.o   ← CSL
  -lmsvcrt                   → private_libdir/libmsvcrt.a  ← CSL
  -lgcc_s                    → private_libdir/libgcc_s.a   ← CSL
  crtbegin.o                 → private_libdir/crtbegin.o   ← CSL

The LLD path does not go through GCC spec; all CRT objects are explicitly fetched from private_libdir. They must be version-consistent → all provided by CSL. This is the only valid reason CSL includes these files, and why they must remain.

4.3 sysimage.mk Should Not Use private_libdir

At build time, GCC already injects the system versions of dllcrt2.o, crtbegin.o, and crtend.o via its spec. If the implicit -l libraries (libmsvcrt, libgcc, etc.) are also resolved by the system GCC, they will be version-consistent with the injected startup objects. Any extra -L may introduce inconsistent versions.

5. Fix

sysimage.mk: Remove -L$(build_private_libdir) from the link command.

- -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir)
+ -L$(build_libdir) -L$(build_shlibdir)

5.1 Result

After the fix:

                    sysimage.mk (GCC)              linking.jl (LLD)
                    ─────────────────              ─────────────────
dllcrt2.o          System (spec-injected)          CSL (_find_static)
crtbegin/crtend    System (spec-injected)          CSL (_find_static)
libmsvcrt.a        System (GCC default paths)      CSL (-L private_libdir)
libmingw32.a       System (GCC default paths)      CSL (-L private_libdir)
libgcc.a           System (GCC default paths)      CSL (-L private_libdir)
libgcc_s.a         System (GCC default paths)      CSL (-L private_libdir)
libssp.dll.a       System (GCC default paths)      CSL (-L private_libdir)
libstdc++.dll      —                               CSL
                    ─────────────────              ─────────────────
                    All system → consistent ✅       All CSL → consistent ✅

5.2 Parts That Do Not Need Changes

  • deps/csl.mk: CSL continues to provide all CRT files to $(build_private_libdir) for use by linking.jl
  • base/linking.jl: LLD pkgimage link path is completely unaffected
  • Make.inc: No changes needed
  • Cross-compilation: Unaffected — when cross-compiling, the GCC spec injects dllcrt2.o from the cross-compiler's sysroot, and implicit -l libraries are resolved by the same cross-compiler, so versions are naturally consistent

6. Historical Change Summary

Date Commit Description
2013-11-22 0a0ec3147a Introduced sys.dll linking; -L$(build_private_libdir) used to find third-party libraries
2013-11-29 67a11cb760 Removed explicit -l library references; -L left behind
2014-03-29 a23effcd6b Made -lssp unconditional on Windows
2024–2025 multiple CSL began placing mingw-w64 CRT files in private_libdir
2026-06 d374574f Removed -L$(build_private_libdir), fixes #56840
============================================================
CRT Version Mismatch Diagnosis
Issue: https://github.com/JuliaLang/julia/issues/56840
============================================================
========== 1. Julia & CSL Version ==========
Julia versioninfo:
Julia Version 1.14.0-DEV.2368
Build Info:
Commit fbe7e5c474 (2026-06-15 10:18 UTC)
GC: Built with stock GC
Platform Info:
OS: Windows (x86_64-w64-windows-gnu-elf)
CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900HX (raptorlake)
WORD_SIZE: 64
LLVM: libLLVM-21.1.8 (ORCJIT, raptorlake)
Threads: 1 default, 1 interactive, 1 GC (on 32 virtual cores)
CSL version (stdlib/CompilerSupportLibraries_jll/Project.toml):
version = "1.5.2+0"
========== 2. Compiler Environment ==========
GCC version:
gcc.exe (Rev5, Built by MSYS2 project) 16.1.0
GCC target triplet:
x86_64-w64-mingw32
GCC major version number:
16.1.0
ld version:
GNU ld (GNU Binutils) 2.46
clang version:
clang version 22.1.7 (https://github.com/msys2/MINGW-packages b8f306ad57e0c8f3f15aed0dc809d7e3e8e2eee9)
MSYSTEM:
MINGW64
uname -a:
MINGW64_NT-10.0-26200 A309-Y9000P 3.6.9-01d6c708.x86_64 2026-05-24 10:45 UTC x86_64 Msys
Key make variables:
CC=gcc -march=native -mtune=native -m64
CXX=g++ -march=native -mtune=native -m64
FC=gfortran -march=native -mtune=native -m64
AR=ar
CROSS_COMPILE=
XC_HOST=
USE_BINARYBUILDER_CSL=
BUILD_OS=WINNT
OS=WINNT
ARCH=x86_64
========== 3. System CRT Paths (GCC Resolution) ==========
dllcrt2.o:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/dllcrt2.o
crtbegin.o:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/crtbegin.o
crtend.o:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/crtend.o
libmsvcrt.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/libmsvcrt.a
libmingw32.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/libmingw32.a
libmingwex.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/libmingwex.a
libmoldname.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/libmoldname.a
libgcc.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/libgcc.a
libgcc_s.a:
D:/env/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/16.1.0/../../../../lib/libgcc_s.a
libssp.dll.a:
libssp.dll.a
========== 4. System Startup Objects — Undefined Symbols ==========
--- dllcrt2.o (calls these): ---
U __dyn_tls_init_callback
U __imp_Sleep
U __main
U __mingw_app_type
U __native_dllmain_reason
U __native_startup_lock
U __native_startup_state
U __xc_a
U __xc_z
U __xi_a
U __xi_z
U _amsg_exit
U _execute_onexit_table
U _initialize_onexit_table
U _initterm
U _initterm_e
U _pei386_runtime_relocator
U _register_onexit_function
U DllMain
--- crtbegin.o (calls these): ---
U atexit
========== 5. System CRT Import Libraries — Provided Symbols ==========
--- libmsvcrt.a (initterm symbols): ---
lib64_libmsvcrt_extra_a-_initterm_e.o:
0000000000000000 D __imp__initterm_e
0000000000000000 T _initterm_e
0000000000000000 I __imp__initterm
0000000000000000 T _initterm
--- libmingw32.a (DllEntryPoint): ---
(none)
========== 6. CSL-Bundled Copies in build_private_libdir ==========
--- dllcrt2.o (calls these): ---
U __dyn_tls_init_callback
U __imp_Sleep
U __main
U __mingw_app_type
U __native_dllmain_reason
U __native_startup_lock
U __native_startup_state
U __xc_a
U __xc_z
U __xi_a
U __xi_z
U _amsg_exit
U _execute_onexit_table
U _initialize_onexit_table
U _initterm
U _pei386_runtime_relocator
U _register_onexit_function
U DllEntryPoint
U DllMain
--- crtbegin.o (calls these): ---
U atexit
--- libmsvcrt.a (initterm symbols): ---
0000000000000000 I __imp__initterm
0000000000000000 T _initterm
--- libmingw32.a (DllEntryPoint): ---
(none)
========== 7. Cross-Reference: initterm Symbol Match ==========
System dllcrt2.o calls:
U _initterm
U _initterm_e
System libmsvcrt.a provides:
0000000000000000 T _initterm_e
0000000000000000 T _initterm
CSL dllcrt2.o calls:
U _initterm
CSL libmsvcrt.a provides:
0000000000000000 T _initterm
========== 8. sysimage.mk Link Command ==========
$(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%-o.a
@$(call PRINT_LINK, $(CXX) $(LDFLAGS) -shared $(fPIC) -L$(build_libdir) -L$(build_shlibdir) -o $@ \
$(call whole_archive,$<) \
$(if $(findstring -debug,$(notdir $@)),-ljulia-internal-debug -ljulia-debug,-ljulia-internal -ljulia) \
$$([ $(OS) = WINNT ] && echo '' $(LIBM) -lssp -Wl,--disable-auto-import -Wl,--disable-runtime-pseudo-reloc))
@$(INSTALL_NAME_CMD)$(notdir $@) $@
@$(DSYMUTIL) $@
============================================================
Diagnosis complete.
If 'System dllcrt2.o calls' includes _initterm_e but
'CSL libmsvcrt.a provides' does NOT include _initterm_e,
then the CRT version mismatch is confirmed.
============================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment