Package: src:libjpeg-turbo
Version: 1:1.3.1-4
Severity: normal
Tags: patch
Hi!
I'm afraid that libjpeg-turbo fails to build on x32. While x32 is not a
release architecture, it would still be nice to have a fix applied, because
of the huge number of packages that suddenly became unbuildable.
I have attached two patches:
* a working but lame one that builds with --without-simd.
* an unfinished patch that uses x86-64 assembly. It configures and
compiles, failing at link stage. Unfortunately, my knowledge of
finer details of interaction between nasm and the linker is rather
bad, I'm thus leaving to play with other toys.
Obviously, if you don't have a working x32 setup, you'll want the working
patch for now.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (600, 'unstable'), (500, 'experimental')
Architecture: x32 (x86_64)
Kernel: Linux 3.16.3-x32 (SMP w/6 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nurd libjpeg-turbo-1.3.1.orig/debian/rules libjpeg-turbo-1.3.1/debian/rules
--- libjpeg-turbo-1.3.1.orig/debian/rules 2014-09-30 11:36:07.000000000 +0200
+++ libjpeg-turbo-1.3.1/debian/rules 2014-10-06 02:58:37.404185759 +0200
@@ -33,6 +33,11 @@
%:
dh $@ --parallel --with autoreconf
+ifeq ($(DEB_HOST_GNU_TYPE),x86_64-linux-gnux32)
+override_dh_auto_configure:
+ dh_auto_configure -- --without-simd
+endif
+
override_dh_auto_build:
dh_auto_build -- V=1
$(MAKE) -C debian/extra CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" V=1
--- acinclude.m4.0 2014-10-06 02:14:07.286158316 +0200
+++ acinclude.m4 2014-10-06 02:26:37.441239349 +0200
@@ -31,12 +31,19 @@
objfmt='a.out'
;;
linux*)
- case "$host_cpu" in
- x86_64)
- objfmt='ELF64'
+ case "$host" in
+ *gnux32)
+ objfmt='ELFX32'
;;
*)
- objfmt='ELF'
+ case "$host_cpu" in
+ x86_64)
+ objfmt='ELF64'
+ ;;
+ *)
+ objfmt='ELF'
+ ;;
+ esac
;;
esac
;;
@@ -94,7 +101,7 @@
a.out) NAFLAGS='-faout -DAOUT';;
BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
ELF) NAFLAGS='-felf -DELF';;
- ELFX32) NAFLAGS='-felfx32 -DELFX32';;
+ ELFX32) NAFLAGS='-felfx32 -DELF -D__x86_64__';;
ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';;
RDF) NAFLAGS='-frdf -DRDF';;
Mach-O) NAFLAGS='-fmacho -DMACHO';;