From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Should repeated builds of a Packed Project Library (*.lvlibp) be identical binaries?

Starting with my lvlib inside a lvproj, I created a Packed Library build spec and generated a lvlibp.  Great!

Now, I copy the resulting .lvlibp elsewhere and re build the Packed Libary.  The two files are completely different when you compare the resulting binaries (source code control).  Why is this?  I've got the Auto-Increment Version number setting turned off, so the version is not changing.

 

Ideally, I would like the same inputs to produce the same output when re-built, for change tracking, etc.

 

See attached for an overly simplistic example that demonstrates the behavior.

0 Kudos
Message 1 of 2
(2,219 Views)

This is expected behavior.

First of, it is possible (i dont know for sure) that the build date/time is included in the built file (in your case lvlibp) which will also alter e.g. MD5 hashes and other stuff.

 

As second point, i want to point out that LV does a lot of optimizations during the build process which is done in a two-layered transformation process. NI does not guarantee that each execution of the application builder will result in the binary identical optimized code. That being said, i would expect other development environments to behave similar (See here).

 

I know that there are C/C++ compiler which grant you guarantee for binary identical files if the sources dont change. But afaik this is some effort for the developers of that compiler as it must not optimize differently each run. Which means that it has to serialize all optimization (over the complete code) which results in a single-threaded compilation process. This will take a lot of time for large applications, as it is common for instance for FPGA targets.....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 2
(2,188 Views)