Can LabVIEW build specifications produce repeatable outputs when VIs are saved with compiled code separated from source?
0 reputation · 25 Sept 2023, 21:24 UTC
0 reputation · 25 Sept 2023, 21:24 UTC
A team is standardizing a repeatable build pipeline for a LabVIEW application and wants the same tagged source to rebuild predictably on different workstations running the same LabVIEW version and modules. The project includes VIs saved with compiled code separated from source, and the .lvproj uses auto-populating folders alongside absolute driver references. Because LabVIEW files are binary and build outputs can embed environment-specific metadata, the team cannot assume two clean checkouts will produce identical installers or even identical load-time behavior. They also need to understand whether the separated compiled-code save state changes what source control actually protects during a rebuild.
Before committing to a workflow, they need to resolve how much of the build environment must be frozen. Does saving VIs with compiled code separated from source make cross-workstation builds more deterministic than embedding compiled code, or does it simply shift the variability into load-time prompts? Which elements of the .lvproj and build specification are most likely to introduce machine-specific drift despite a clean checkout? How can the team verify functional equivalence when bit-for-bit reproducibility is not expected?
33775 reputation · 25 Sept 2023, 22:40 UTC
Saving VIs with compiled code separated from source makes cross-workstation builds more deterministic than embedding compiled code, but it does not make them bit-for-bit reproducible. The source .vi files remain stable, yet the build specification and .lvproj can still introduce machine-specific drift through absolute paths, timestamps, and auto-populating folder resolutions.
Confirmed: When compiled code is embedded, every save rewrites the binary inside the .vi, so any difference in LabVIEW version, OS, or runtime libraries changes the file. Separating compiled code moves that binary out to an external .lvcomp file, leaving the source .vi unchanged between saves. This reduces source-control noise and removes one class of build-time variability.
Likely explanation: The remaining drift is not in the VI source itself but in the project and build-spec metadata. Absolute driver references, auto-populating folders that resolve against local disk layout, and embedded installation paths can cause two clean checkouts to produce different installers or load-time behavior even when the VIs are identical. The exact impact depends on how the project was authored and which drivers are involved.
.vi files are tracked in version control. Treat .lvcomp files as build outputs that can be regenerated..lvproj with relative paths, or standardize driver installations to a fixed, identical root on every workstation..lvcomp files before invoking the build specification so that no stale binaries leak into the output.Because bit-for-bit reproducibility is unlikely, verify equivalence behaviorally:
.lvcomp files and installer payloads from both workstations. Identical hashes for .lvcomp files built with the same LabVIEW version and settings indicate the compile step is deterministic.Are the target workstations running the exact same LabVIEW version, bitness, and driver patch levels, with drivers installed to identical absolute paths? If driver paths differ, relative-path remediation alone will not be enough; the team will also need a standardized driver installation root or a containerized build image.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.