Skip to content

Commit a3be1f4

Browse files
committed
fix build
1 parent 42145b0 commit a3be1f4

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

backends/qualcomm/scripts/download_qnn_sdk.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _extract_tar(archive_path: pathlib.Path, prefix: str, target_dir: pathlib.Pa
247247
# libc management
248248
####################
249249

250-
GLIBC_ROOT = pathlib.Path("/tmp/glibc-2.34")
250+
GLIBC_ROOT = pathlib.Path("/tmp/glibc-2.36")
251251
GLIBC_LOADER = GLIBC_ROOT / "lib" / "ld-linux-x86-64.so.2"
252252
GLIBC_LIBDIR = GLIBC_ROOT / "lib"
253253
GLIBC_REEXEC_GUARD = "QNN_GLIBC_REEXEC"
@@ -274,16 +274,17 @@ def _detect_glibc_version() -> Optional[Tuple[int, int]]:
274274

275275

276276
def _install_glibc_234():
277-
"""Download and build glibc 2.34 into /tmp/glibc-2.34 if missing."""
277+
"""Download and build glibc 2.36 into /tmp/glibc-2.36 if missing."""
278278
if GLIBC_LOADER.exists():
279279
logger.info("[glibc] Already installed at %s", GLIBC_ROOT)
280280
return
281281

282-
logger.info("[glibc] Installing glibc 2.34 into %s ...", GLIBC_ROOT)
283-
url = "https://ftp.gnu.org/gnu/libc/glibc-2.34.tar.xz"
282+
logger.info("[glibc] Installing glibc 2.36 into %s ...", GLIBC_ROOT)
283+
# url = "https://ftp.gnu.org/gnu/libc/glibc-2.34.tar.xz"
284+
url = "https://ftp.gnu.org/gnu/libc/glibc-2.36.tar.xz"
284285

285286
with tempfile.TemporaryDirectory() as tmpdir:
286-
tarball = pathlib.Path(tmpdir) / "glibc-2.34.tar.xz"
287+
tarball = pathlib.Path(tmpdir) / "glibc-2.36.tar.xz"
287288
logger.info("[glibc] Downloading %s", url)
288289
urllib.request.urlretrieve(url, tarball)
289290
logger.info("[glibc] Downloaded %s", tarball)
@@ -300,10 +301,12 @@ def _install_glibc_234():
300301
# Remove LD_LIBRARY_PATH to satisfy configure checks
301302
env.pop("LD_LIBRARY_PATH", None)
302303
# allow warnings
303-
env["CFLAGS"] = "-O2 -Wno-error"
304+
# env["CFLAGS"] = "-O2 -Wno-error"
305+
env["CFLAGS"] = "-O2 -Wno-error" # prevent warnings-as-errors
306+
env["CC"] = "gcc" # explicit, avoids surprises
304307

305308
# Configure
306-
cmd = ["../glibc-2.34/configure", f"--prefix={GLIBC_ROOT}"]
309+
cmd = ["../glibc-2.36/configure", f"--prefix={GLIBC_ROOT}"]
307310
logger.info("[glibc] Running: %s", " ".join(cmd))
308311
subprocess.check_call(cmd, cwd=build_dir, env=env)
309312

@@ -318,7 +321,7 @@ def _install_glibc_234():
318321
subprocess.check_call(cmd, cwd=build_dir, env=env)
319322

320323
if GLIBC_LOADER.exists():
321-
logger.info("[glibc] Successfully installed glibc 2.34 at %s", GLIBC_ROOT)
324+
logger.info("[glibc] Successfully installed glibc 2.36 at %s", GLIBC_ROOT)
322325
else:
323326
logger.error(
324327
"[glibc] Install finished but loader not found at %s", GLIBC_LOADER
@@ -558,7 +561,7 @@ def install_qnn_sdk() -> bool:
558561
True if both steps succeeded (or were already satisfied), else False.
559562
"""
560563
logger.info("[QNN] Starting SDK installation")
561-
# Re-exec with glibc 2.34 if needed.
564+
# Re-exec with glibc 2.36 if needed.
562565
_reexec_with_new_glibc_if_needed()
563566

564567
if _ensure_libcxx_stack():

0 commit comments

Comments
 (0)