Source: openblas
Version: 0.2.18-1
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that 'openblas' could not be built reproducibly.

The attached patch fixes the order files are passed to `ar' and gcc.
Once applied, openblas can be built reproducibly in our current
experimental framework.

Regards,
Alexis Bienvenüe.

 [1]: https://wiki.debian.org/ReproducibleBuilds





Description: Order files
 Order the files when calling `ar' or $(CC), to make the build reproducible.
Author: Alexis Bienvenüe <p...@passoire.fr>

Index: openblas-0.2.18/Makefile
===================================================================
--- openblas-0.2.18.orig/Makefile
+++ openblas-0.2.18/Makefile
@@ -207,7 +207,7 @@ netlib :
 	mkdir lapack-netlib
 	cd lapack-netlib && ar -x /usr/lib/lapack/liblapack_pic.a
 	make -C interface delete-duplicate-lapack-objects
-	ar -ru $(LIBNAME) lapack-netlib/*
+	ar -ru $(LIBNAME) `LC_ALL=C ls lapack-netlib/*`
 
 clean::
 	rm -rf lapack-netlib
Index: openblas-0.2.18/interface/Makefile
===================================================================
--- openblas-0.2.18.orig/interface/Makefile
+++ openblas-0.2.18/interface/Makefile
@@ -2153,7 +2153,7 @@ libblas.so.3: $(SBLAS1OBJS) $(SBLAS2OBJS
 
 # The prerequisites must match the symbols deleted in target delete-duplicate-lapack-objects
 liblapack.so.3: $(SLAPACKOBJS) $(DLAPACKOBJS) $(CLAPACKOBJS) $(ZLAPACKOBJS) ../kernel/lsame.o ../driver/others/xerbla.o
-	$(CC) $(LDFLAGS) -shared -o $@ $^ ../lapack-netlib/* -Wl,-soname,liblapack.so.3 -L.. -lopenblas $(EXTRALIB)
+	$(CC) $(LDFLAGS) -shared -o $@ $^ `LC_ALL=C ls ../lapack-netlib/*` -Wl,-soname,liblapack.so.3 -L.. -lopenblas $(EXTRALIB)
 
 clean::
 	rm -f libblas.so.3 liblapack.so.3

Reply via email to