kde/H-Qt: wrappers zig al árbol de fuente ($PWD/.zwrap), no /tmp
4to ciclo: /tmp/zw/cxx 'not found' (status 127) en compile — /tmp se vacía entre fase configure y compile; sólo el árbol de fuente persiste. Muevo los wrappers a $PWD/.zwrap (junto a build/). CMake cachea el path absoluto y sigue válido en compile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -36,15 +36,16 @@ configure = '''
|
||||
# al binario real /opt/zig/zig, perdiendo el basename 'cc' ⇒ al invocar el compilador directo (ASM,
|
||||
# custom commands de Qt) corre `/opt/zig/zig -std=… archivo` y zig lee -std como subcomando → falla.
|
||||
# Fix (patrón AR-wrapper): scripts reales que fuerzan `zig cc`/`zig c++`; un script no se canonicaliza.
|
||||
# Se replica -mcpu=baseline del wrapper del lab (coherencia con las deps ya selladas).
|
||||
mkdir -p /tmp/zw
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > /tmp/zw/cc
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > /tmp/zw/cxx
|
||||
chmod +x /tmp/zw/cc /tmp/zw/cxx
|
||||
# Se replica -mcpu=baseline del wrapper del lab (coherencia con las deps ya selladas). Los wrappers
|
||||
# van al ÁRBOL DE FUENTE ($PWD/.zwrap, persiste entre fases) — /tmp se vacía entre configure y compile.
|
||||
ZW="$PWD/.zwrap"; mkdir -p "$ZW"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig cc -mcpu=baseline "$@"\n' > "$ZW/cc"
|
||||
printf '#!/bin/sh\nexec /opt/zig/zig c++ -mcpu=baseline "$@"\n' > "$ZW/cxx"
|
||||
chmod +x "$ZW/cc" "$ZW/cxx"
|
||||
cmake -B build -G Ninja -Wno-dev \
|
||||
-DCMAKE_C_COMPILER=/tmp/zw/cc \
|
||||
-DCMAKE_CXX_COMPILER=/tmp/zw/cxx \
|
||||
-DCMAKE_ASM_COMPILER=/tmp/zw/cc \
|
||||
-DCMAKE_C_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_CXX_COMPILER="$ZW/cxx" \
|
||||
-DCMAKE_ASM_COMPILER="$ZW/cc" \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \
|
||||
|
||||
Reference in New Issue
Block a user