Re: How to "bake in" configure args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Mar 2021, Dan Mahoney (Gushi) wrote:

On Tue, 23 Mar 2021, Bob Friesenhahn wrote:

On Tue, 23 Mar 2021, Dan Mahoney (Gushi) wrote:

Is there a "standard" way to do this?  Google kind of fails for this.

I see that Gavin Smith already answered the question you asked, but GraphicsMagick took a different tact.

I didn't find that to be an "answer" so much as a request for more clarification.

In that case, the "answer" is that there is no "standard" way to to this. It will require some added code in configure.ac to store the values in a header file, and also in the application to store and print them out. As Richard Purdie points out, adding text strings which are dependent on the build environment (including the configure options) may cause the binaries to not be reproducible. In other words, the results may then vary depending on who/where the build is performed.

The configure script could also perform substitutions on a template text file which is delivered with the application as a record for how it was built (rather than baking strings in the binaries).

I'm nominally not a C coder, I'm just the guy who gets to answer support tickets and triage bug reports and get users to figure out if they installed their OS package, how that was set up and compiled.

Certainly, knowing the actual values which were used in the build are useful. The values used in the build may not be the same as in the run-time environment since the ABI "contract" provided by a library might still be honored even though the library used while building depends on different libraries than in a particular run-time environment.

Bob
--
Bob Friesenhahn
bfriesen@xxxxxxxxxxxxxxxxxxx, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux