Opened 13 months ago

Last modified 11 months ago

#27309 new defect

Deterministic builds / ar warns about u modifier

Reported by: traumschule Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Building Tor from source brings up this warning several times:

"ar: u' modifier ignored since D' is the default (see `U')" a lot.

The fix is to change the according line in Makefile.in to ARFLAGS=crD.

(easy to find with grep -n "ARFLAGS =" Makefile.in)

Since Makefile.in is created by the ./configure script, the default flags need to be changed:

"ARFLAGS will default to cru; you can override this variable by setting it in your Makefile.am or by AC_SUBSTing it from your configure.ac."

Before distributing Tor with it, we need to check if any platform build breaks. For example versions before binutils v2.24-20 / GNU Make 4 (2013-10-09). I did not check for OSX and BSD yet.

The options -D / -U were introduced in January 2013. For debian see Bug 798913 (and the Debian changelog):

binutils upstream provides a configure option '--enable-deterministic-archives', which makes this behaviour the default, though it can still be disabled at runtime via the 'u' switch, in case someone wants to use ar to pack non-library files in an archive and cares about the metadata.

References

Child Tickets

Change History (3)

comment:1 Changed 13 months ago by nickm

Milestone: Tor: unspecified

comment:2 Changed 11 months ago by arma

I'm now seeing this complaint when building on Debian stable.

I see it on every single AR line during make, which is many of them now that we've started breaking things up into ar files.

comment:3 Changed 11 months ago by traumschule

IIRC to adopt new flags they need to be tested with all compilers in use.

<+nickm> I'd mostly think about non-gmake systems. right now we work on OSX and most BSDs. So that would be good to keep.

Note: See TracTickets for help on using tickets.