Source: openblas
Version: 0.2.18-1
Severity: wishlist
Tags: patch upstream
Usertags: fileordering

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.

Alexis Bienvenüe.


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

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/*`
 	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 @@ $(SBLAS1OBJS) $(SBLAS2OBJS
 # The prerequisites must match the symbols deleted in target delete-duplicate-lapack-objects $(SLAPACKOBJS) $(DLAPACKOBJS) $(CLAPACKOBJS) $(ZLAPACKOBJS) ../kernel/lsame.o ../driver/others/xerbla.o
-	$(CC) $(LDFLAGS) -shared -o $@ $^ ../lapack-netlib/* -Wl,-soname, -L.. -lopenblas $(EXTRALIB)
+	$(CC) $(LDFLAGS) -shared -o $@ $^ `LC_ALL=C ls ../lapack-netlib/*` -Wl,-soname, -L.. -lopenblas $(EXTRALIB)
 	rm -f
Reproducible-builds mailing list

Reply via email to