Skip to content

Mingw-w64 runtime failure #3

@oyamad

Description

@oyamad
Mingw-w64 runtime failure:
32 bit pseudo relocation at 0000000061B4213F out of range, targeting 00007FFE2871AC80, yielding the value 00007FFDC6BD8B3D

ChatGPT suggests we set -DCMAKE_SHARED_LINKER_FLAGS=-static-libstdc++ in build_tarballs.jl:

diff --git a/G/gametracer/build_tarballs.jl b/G/gametracer/build_tarballs.jl
@@
 script = raw"""
 cd "${WORKSPACE}/srcdir/gametracer"

+extra_cmake_flags=()
+if [[ "${target}" == *-mingw* ]]; then
+    # Avoid depending on the shared libstdc++ DLL on Windows.
+    extra_cmake_flags+=(-DCMAKE_SHARED_LINKER_FLAGS=-static-libstdc++)
+fi
+
 cmake -S c_api -B build \
  -DCMAKE_TOOLCHAIN_FILE="${CMAKE_TARGET_TOOLCHAIN}" \
  -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX="${prefix}"
+ -DCMAKE_INSTALL_PREFIX="${prefix}" \
+ "${extra_cmake_flags[@]}"

 cmake --build build --parallel "${nproc}"
 cmake --install build
 """

(or in c_api/CMakeLists.txt).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions