Skip to content

Build is not reproducible: linking order #111

@df7cb

Description

@df7cb

Rebuilding pgbouncer will not always produce the same executable, as the linking order depends on the filesystem order of the object files:

@@ -563,9 +577,9 @@
      CC       lib/usual/safeio.c
      CC       lib/usual/signal.c
      CC       lib/usual/slab.c
-     CC       lib/usual/socket_ntop.c
-     CC       lib/usual/socket_pton.c
      CC       lib/usual/socket.c
+     CC       lib/usual/socket_pton.c
+     CC       lib/usual/socket_ntop.c
      CC       lib/usual/string.c
      CC       lib/usual/strpool.c
      CC       lib/usual/time.c

... which also affects CCLD, but is not visible with V=0. See https://tests.reproducible-builds.org/logdiffs/unstable/armhf/pgbouncer_1.7.1-1.diff.gz for the full build log diff.

Reproducible builds are Debian release goal: https://wiki.debian.org/ReproducibleBuilds

I've been staring at lib/mk/antimake.mk to locate the missing $(sort) which would fix this issue, but the complexity of that file is beyond me. We'd be happy if someone could find a fix for this issue. Thanks!

(There is a second source of unreproducibility which I will report separately.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions