📝 checkpoint_2026-08-28_pytorch_rebuild_and_listatt_fixes.md

Checkpoint (2026-08-28) — PyTorch Final Rebuild Attempt + listatt/lmv Viewport Fixes + Orchestrator License

Status: listatt/lmv phone-viewport bug fixed and confirmed. PyTorch source build restarted clean on Clone (Claude driving per prior session's plan) — running well as of last check, deep into protobuf/gloo compilation. This is Andrew's stated final attempt before dropping PyTorch for ISEmedia.


Part 1 — listatt / lmv phone-only scroll window (DONE, confirmed working)

The bug

Andrew wanted a taller scroll window for markdown content viewed via [listatt] on his phone only, without affecting desktop.

First fix attempt (necessary but not sufficient)

Added a phone-only media query to LMVBBC.php's embedded CSS:

@media (max-width: 768px) {
.lmv-viewer-scroll {
max-height: 80vh !important;
}
}

Bumped LMVBBC.php to v3.3.1. This alone did NOT fix it.

Real root cause (found second)

view_attach.php (the script listatt's .md links route through) outputs a standalone HTML page with no <meta name="viewport"> tag. Without it, mobile browsers render the page at a virtual desktop width (~980px) and zoom-scale it down — so the max-width: 768px media query above never actually fired, because CSS saw a "wide" screen regardless of the real device.

Fix: added

<meta name="viewport" content="width=device-width, initial-scale=1">

to view_attach.php's output. Bumped to v1.6. Confirmed working by Andrew after this fix.

Follow-on incident: version-constant mismatch → live fatal error

While hand-editing ListAttBBC.php's version on the live server (bumping to 6.4.1), Andrew edited only the @version doc-block comment (line 6) and not the actual const VERSION the code/display-bar reads (line 172) — two separate, unlinked places holding the same number. This mismatch itself was cosmetic, but during the same live edit session listatt_parse_bbc() (the wrapper function Display.php is patched to call instead of core's own parse_bbc()) became undefined, taking listatt down in production. Andrew immediately uninstalled the mod. Root cause was never conclusively identified — the actual broken file that was live at the time was not preserved (only pre-edit or already-fixed copies were recoverable), so the working theory (a bad manual hand-edit introducing a real PHP syntax/definition error) could not be confirmed by diff.

Final delivered state: listatt_bbcode_v6.4.1_final.zipListAttBBC.php (v6.4.1, version constant fixed in both places) + view_attach.php (v1.6, viewport meta tag) + everything else unchanged from the working v6.4 (MMM/AttachMeta.php panel, CSS, register/unregister, SQL). Verified to parse as valid PHP. Ready for clean reinstall (prior install was fully uninstalled, so no upgrade-path conflicts expected).

Lesson flagged for future version bumps: doc-block @version and const VERSION are two separate strings with nothing enforcing they match — worth a standing habit of grepping both before calling a version bump "done."


Part 2 — Andrew.human & Claude.ai orchestrator.py — proprietary license header

Andrew requested a formal "All Rights Reserved" style license notice to place in orchestrator.py's doc-block header, reflecting its already-stated "NOT Open_Source" status. Delivered:

Copyright (c) 2026 Andrew Egerszegi. All Rights Reserved.

This software and associated documentation files (the "Software") are
proprietary and confidential. The Software is NOT licensed under any
open-source license (including but not limited to MIT, GPL, Apache,
or BSD).

No part of the Software may be copied, modified, merged, published,
distributed, sublicensed, or sold without the prior written permission
of the copyright holder.

Permission to use the Software is granted solely to the copyright
holder and any parties explicitly authorized in writing. Any other
use, reproduction, or distribution is strictly prohibited.

For licensing inquiries, contact: aegersz@gmail.com

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM,
DAMAGES, OR OTHER LIABILITY ARISING FROM THE SOFTWARE.

Caveat given directly: this is standard boilerplate, not legal advice — flagged especially given orchestrator.py's multi-agent authorship (Claude/ChatGPT/Gemini/Groq all contributed code), which sits in genuinely unsettled AI-authorship copyright territory. Worth a real IP lawyer's review if Andrew moves forward with the monetization idea a friend floated.


Part 3 — PyTorch source build on Clone — FINAL ATTEMPT (in progress)

Context and decision going in

Per the prior session's checkpoint, Andrew declared 2026-08-26's build session his last personal attempt at driving this build. Decision: any further attempt happens on a fresh Clone with Claude managing the compile itself, Andrew handling only the Clone/VMware environment side. If this attempt also fails, PyTorch is dropped from ISEmedia in favor of an alternative (lighter runtime, prebuilt wheel, or different embedding approach).

What killed the prior (2026-08-26) attempt

A genuine multiple definition of DispatchStub linker error — duplicated, mangled object-file rules for the same source files (filenames like Activation.cpp.DEFAULT.cpp.DEFAULT.cpp.DEFAULT.cpp.DEFAULT.cpp.o). Diagnosed as build-directory corruption from many restarts/reconfigures/cache edits (including a sed-patched CMakeCache.txt trick used earlier in that saga) stacking on top of each other — not a real source-code bug. No amount of targeted patching reliably fixes this; the generated Makefile dependency graph itself is corrupted.

This attempt's approach

Full wipe of ~/pytorch/build/, single clean cmake .. reconfigure folding in every flag learned across the entire saga at once (rather than accreting flags reactively across restarts):

cd ~/pytorch
rm -rf build
mkdir build
cd build

cmake .. \
-DCMAKE_C_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/gcc \
-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++ \
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.8 \
-DPYTHON_LIBRARY=/usr/local/lib/libpython3.8.so \
-DPYTHON_INCLUDE_DIR=/usr/local/include/python3.8 \
-DUSE_BREAKPAD=OFF \
-DBUILD_CAFFE2=0 \
-DUSE_NUMPY=ON \
-DUSE_QNNPACK=OFF \
-DUSE_PYTORCH_QNNPACK=OFF \
-DUSE_XNNPACK=OFF \
-DUSE_FBGEMM=OFF \
-DUSE_GLOW=OFF \
-DBUILD_TEST=OFF \
-DCMAKE_CXX_FLAGS="-w" \
-Dprotobuf_DISABLE_WARNINGS=ON

make -j3

Run inside a real devtoolset-7 shell (scl enable devtoolset-7 bash, confirmed gcc --version → 7.3.1) rather than relying solely on the CMake compiler-path flags, since some PyTorch build sub-scripts re-resolve gcc/g++/cc1plus by name and could silently fall back to the system default GCC 4.4.7 otherwise.

Real bug caught BEFORE this rebuild (would have been a silent, expensive failure)

First cmake configure attempt showed PythonInterp correctly found at 3.8.18, but PythonLibs resolved to 3.6.3 (/usr/local/include/python3.6m in the include path) — a stale system Python 3.6 install (multiple copies found under /usr/local, /usr/src, /python) that CMake's default library search silently preferred over the deliberately-built 3.8.18. This is a genuine ABI mismatch that would very likely have built "successfully" all the way through and then crashed or failed at import torch, wasting the entire multi-hour build.

Fixed by explicitly pinning -DPYTHON_LIBRARY and -DPYTHON_INCLUDE_DIR to the real 3.8 paths (found via find / -name "libpython3.8*"). Confirmed clean in the next cmake log: 3.8.18 consistent across interpreter, library, and includes; zero CMake Error lines.

Environment safety margin added

Confirmed 5.2GB RAM free out of 6GB total, no swap configured. Added a 2GB swapfile (/swapfile, mkswap + swapon) as a safety margin against a runaway/leaking compile process, rather than disabling the Linux OOM killer outright (which Andrew considered — talked through and decided against, since disabling it risks a full unrecoverable system hang on a genuine memory leak instead of a clean single-process kill with a dmesg record of what happened).

State as of last check

Build running clean: all 4 CPUs ~95-100% utilized, ~977MB/6026MB memory used (plenty of headroom), swap untouched (0/2047MB), no errors, top process is cc1plus under devtoolset-7 as expected. Progress was in third_party/protobuf and third_party/gloo compilation (~3%) at last check — very early, expect several more hours.

Not yet done

If this attempt also fails

Per the standing decision: PyTorch gets dropped from ISEmedia and an alternative approach gets scoped instead (e.g., a lighter/prebuilt inference path, or reconsidering the manylinux-wheel-on-older-PyTorch-version angle that was raised as an alternative strategy but not yet actually tried).


Other items raised this session, not yet started