Source: postgresql-9.4 Version: 9.4~beta2-1 Severity: wishlist Tags: patch User: debian-al...@lists.debian.org Usertags: alpha
postgresql-9.4 FTBFS on alpha. From the build log [1]: cc -g -O2 -Wformat -Werror=format-security -I/usr/include/mit-krb5 -fPIC -pie -DLINUX_OOM_SCORE_ADJ=0 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -I../../../src/include -I/«PKGBUILDDIR»/build/../src/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/tcl8.6 -c -o bgworker.o /«PKGBUILDDIR»/build/../src/backend/postmaster/bgworker.c /tmp/ccNKo8Fb.s: Assembler messages: /tmp/ccNKo8Fb.s:764: Error: unknown opcode `rmb' as: BFD (GNU Binutils for Debian) 2.24.51.20140709 internal error, aborting at ../../gas/write.c line 603 in size_seg This occurs because in src/include/storage/barrier.h the definition of pg_read_barrier() for Alpha maps to the CPU instruction "rmb" but there is no such CPU instruction on Alpha! I attach a patch that fixes the pg_read_barrier() definition to use the correct CPU instruction for a read memory barrier on Alpha. With that postgresql-9.4 builds to completion on Alpha. Cheers Michael. [1] http://buildd.debian-ports.org/status/fetch.php?pkg=postgresql-9.4&arch=alpha&ver=9.4~beta2-1&stamp=1406489832
Index: postgresql-9.4-9.4~beta2/src/include/storage/barrier.h =================================================================== --- postgresql-9.4-9.4~beta2.orig/src/include/storage/barrier.h +++ postgresql-9.4-9.4~beta2/src/include/storage/barrier.h @@ -117,7 +117,7 @@ extern slock_t dummy_spinlock; * read barrier to cover that case. We might need to add that later. */ #define pg_memory_barrier() __asm__ __volatile__ ("mb" : : : "memory") -#define pg_read_barrier() __asm__ __volatile__ ("rmb" : : : "memory") +#define pg_read_barrier() __asm__ __volatile__ ("mb" : : : "memory") #define pg_write_barrier() __asm__ __volatile__ ("wmb" : : : "memory") #elif defined(__hppa) || defined(__hppa__) /* HP PA-RISC */