Help needed in making a package reproducible - delly

Chris Lamb chris at reproducible-builds.org
Wed Aug 10 18:49:53 BST 2022


Hey,

> I would like to make delly[1] builds reproducible but I'm stuck with no 
> idea what the diffoscope log[2] means. I have little to no experience 
> with making packages reproducible but like to try my hand at it.

Sure thing. So, one telltale sign in the diffoscope output is the
following hunk:

│ │ │ │ ├── strings --all --bytes=8 {}
│ │ │ │ │ @@ -402,15 +402,15 @@
│ │ │ │ │  GLIBCXX_3.4.29
│ │ │ │ │  CXXABI_1.3
│ │ │ │ │  GLIBCXX_3.4
│ │ │ │ │ -/build/1st/delly-1.0.3/src/htslib/
│ │ │ │ │ +/build/2/delly-1.0.3/2nd/src/htslib/
│ │ │ │ │  AWAVAUATUSH
│ │ │ │ │  []A\A]A^A_

In other words, your /usr/bin/delly binary is embedding the build
path.

Often this is because a package is not obeying CFLAGS/CXXFLAGS etc
from dpkg-buildflags (which contains the magic -ffile-prefix-map=
argument), but looking at the build log I think your package is always
calling g++ in a way that respects this... even when calling Make
recursively here:

    .htslib: $(HTSLIBSOURCES)
              if [ -r src/htslib/Makefile ]; then cd src/htslib &&
                autoheader && autoconf && ./configure --disable-s3
                --disable-gcs --disable-libcurl --disable-plugins &&
                $(MAKE) && $(MAKE) lib-static && cd ../../ && touch
                .htslib; fi

But a quick glance at your package's Makefile suggests that the path
is coming from:

    # Submodules
    PWD = $(shell pwd)
    EBROOTHTSLIB ?= ${PWD}/src/htslib/

... and may very well be related to how the "static-lib" target is
compiled:

    # Flags for static compile
    ifeq (${STATIC}, 1)
      LDFLAGS += -static -static-libgcc -pthread -lhts -lz -llzma -lbz2
    else
      LDFLAGS += -lhts -lz -llzma -lbz2 -Wl,-rpath,${EBROOTHTSLIB}
    endif
                                            ^^^^^^^^^^^^^^^^^^^^^^


As package maintainer though, you will probably have more insight into
this; it seems like your package is doing rather interesting things with
this htslib directory. :)

Hope this quick message helps put you on the right path...


Best wishes,

-- 
      o
    ⬋   ⬊      Chris Lamb
   o     o     reproducible-builds.org 💠
    ⬊   ⬋
      o



More information about the Reproducible-builds mailing list