[Pkg-rust-maintainers] Bug#839643: src:rustc: FTBFS on ppc64el

Erwan Prioul erwan at linux.vnet.ibm.com
Wed Feb 22 10:31:54 UTC 2017


Hi,

I've been able to build the rust package on ppc64el with the attached patch.
In the patch:
 * workaround to avoid issue with the tests smoke_dtor and test_typed_arena_drop_small_count: no optimization on ppc64el
 * add ignore flags to asm test files that have no meaning for ppc64el
 * add a reference to a library in a makefile

Thanks for considering the patch.
Erwan.
-------------- next part --------------
diff -Naur a/debian/patches/d-missing-ref-dlsym-ppc64el.patch b/debian/patches/d-missing-ref-dlsym-ppc64el.patch
--- a/debian/patches/d-missing-ref-dlsym-ppc64el.patch	1970-01-01 00:00:00.000000000 +0000
+++ b/debian/patches/d-missing-ref-dlsym-ppc64el.patch	2017-01-04 20:34:56.000000000 +0000
@@ -0,0 +1,15 @@
+diff -Naur a/src/test/run-make/issue-24445/Makefile b/src/test/run-make/issue-24445/Makefile
+--- a/src/test/run-make/issue-24445/Makefile	2017-02-17 10:21:17.092001151 +0000
++++ b/src/test/run-make/issue-24445/Makefile	2017-02-21 13:07:36.719995153 +0000
+@@ -3,9 +3,9 @@
+ ifeq ($(UNAME),Linux)
+ all:
+ 	$(RUSTC) foo.rs
+-	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -o $(TMPDIR)/foo
++	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -o $(TMPDIR)/foo
+ 	$(call RUN,foo)
+-	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -pie -fPIC -o $(TMPDIR)/foo
++	$(CC) foo.c -lfoo -L $(TMPDIR) -Wl,--gc-sections -lpthread -ldl -pie -fPIC -o $(TMPDIR)/foo
+ 	$(call RUN,foo)
+ else
+ all:
diff -Naur a/debian/patches/series b/debian/patches/series
--- a/debian/patches/series	2017-02-17 10:20:57.256001150 +0000
+++ b/debian/patches/series	2017-01-04 20:34:56.000000000 +0000
@@ -9,6 +9,7 @@
 u-ignoretest-arm64.patch
 u-ignoretest-jemalloc.patch
 u-detect-mips-cpu.patch
+u-ignoretest-powerpc.patch
 
 # Debian-specific patches, not suitable for upstream
 d-rust-gdb-paths
@@ -19,3 +20,4 @@
 d-dynamic-link-llvm.patch
 d-use-system-jquery.patch
 d-fill-in-mips-mk-rules.patch
+d-missing-ref-dlsym-ppc64el.patch
diff -Naur a/debian/patches/u-ignoretest-powerpc.patch b/debian/patches/u-ignoretest-powerpc.patch
--- a/debian/patches/u-ignoretest-powerpc.patch	1970-01-01 00:00:00.000000000 +0000
+++ b/debian/patches/u-ignoretest-powerpc.patch	2017-01-04 20:34:56.000000000 +0000
@@ -0,0 +1,66 @@
+diff -Naur a/src/test/compile-fail/asm-bad-clobber.rs b/src/test/compile-fail/asm-bad-clobber.rs
+--- a/src/test/compile-fail/asm-bad-clobber.rs	2017-02-17 10:21:15.192001150 +0000
++++ b/src/test/compile-fail/asm-bad-clobber.rs	2017-02-20 10:53:33.355996252 +0000
+@@ -12,6 +12,7 @@
+ // ignore-arm
+ // ignore-aarch64
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm, rustc_attrs)]
+ 
+diff -Naur a/src/test/compile-fail/asm-in-bad-modifier.rs b/src/test/compile-fail/asm-in-bad-modifier.rs
+--- a/src/test/compile-fail/asm-in-bad-modifier.rs	2017-02-17 10:21:15.040001150 +0000
++++ b/src/test/compile-fail/asm-in-bad-modifier.rs	2017-02-20 10:53:55.139999754 +0000
+@@ -9,6 +9,7 @@
+ // except according to those terms.
+ 
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm)]
+ 
+diff -Naur a/src/test/compile-fail/asm-misplaced-option.rs b/src/test/compile-fail/asm-misplaced-option.rs
+--- a/src/test/compile-fail/asm-misplaced-option.rs	2017-02-17 10:21:16.120001149 +0000
++++ b/src/test/compile-fail/asm-misplaced-option.rs	2017-02-20 10:54:33.619839143 +0000
+@@ -12,6 +12,7 @@
+ // ignore-arm
+ // ignore-aarch64
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm, rustc_attrs)]
+ 
+diff -Naur a/src/test/compile-fail/asm-out-assign-imm.rs b/src/test/compile-fail/asm-out-assign-imm.rs
+--- a/src/test/compile-fail/asm-out-assign-imm.rs	2017-02-17 10:21:14.804001149 +0000
++++ b/src/test/compile-fail/asm-out-assign-imm.rs	2017-02-20 10:55:26.796023677 +0000
+@@ -9,6 +9,7 @@
+ // except according to those terms.
+ 
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm)]
+ 
+diff -Naur a/src/test/compile-fail/asm-out-no-modifier.rs b/src/test/compile-fail/asm-out-no-modifier.rs
+--- a/src/test/compile-fail/asm-out-no-modifier.rs	2017-02-17 10:21:12.548001149 +0000
++++ b/src/test/compile-fail/asm-out-no-modifier.rs	2017-02-20 10:55:37.908025746 +0000
+@@ -9,6 +9,7 @@
+ // except according to those terms.
+ 
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm)]
+ 
+diff -Naur a/src/test/compile-fail/asm-out-read-uninit.rs b/src/test/compile-fail/asm-out-read-uninit.rs
+--- a/src/test/compile-fail/asm-out-read-uninit.rs	2017-02-17 10:21:12.968001149 +0000
++++ b/src/test/compile-fail/asm-out-read-uninit.rs	2017-02-20 10:55:49.260001428 +0000
+@@ -9,6 +9,7 @@
+ // except according to those terms.
+ 
+ // ignore-s390x
++// ignore-powerpc
+ 
+ #![feature(asm)]
+ 
diff -Naur a/debian/rules b/debian/rules
--- a/debian/rules	2017-02-17 10:20:57.256001150 +0000
+++ b/debian/rules	2017-01-04 20:34:56.000000000 +0000
@@ -106,6 +106,11 @@
   DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
 endif
 
+# Workaround for powerpc64le: no optimization
+ifneq (,$(findstring powerpc64le,$(DEB_TARGET_RUST_TYPE)))
+  DEB_CONFIGURE_FLAGS += --disable-optimize --disable-optimize-cxx --disable-optimize-llvm
+endif
+
 
 %:
 	dh $@ --parallel


More information about the Pkg-rust-maintainers mailing list