Source: torch3
Version: 3.1-2.1
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Dear Maintainer,

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

The attached patch fixes the order in which *.o files are merged. Once
applied, torch3 can be built reproducibly in our current experimental
framework.

Regards,
Alexis Bienvenüe.

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




--- Makefile.modules.orig
+++ Makefile.modules
@@ -14,9 +14,9 @@
 
 $(LIBTORCH): $(STATICOBJS)
 	@echo "Archiving..."
-	$(AR) $(LIBTORCH) $(STATICOBJSDIR)/*.o
+	$(AR) $(LIBTORCH) $(sort $(wildcard $(STATICOBJSDIR)/*.o))
 $(LIBSOTORCH): $(DYNAMICOBJS)
-	$(CC) -shared -Wl,-soname=libtorch.so.3 -o $(LIBSOTORCH) $(DYNAMICOBJSDIR)/*.o
+	$(CC) -shared -Wl,-soname=libtorch.so.3 -o $(LIBSOTORCH) $(sort $(wildcard $(DYNAMICOBJSDIR)/*.o))
 	
 
 $(OBJS_DIR)/static/%.o: %.cc
_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to