Bug#902768: timidity FTCBFS: Exec format error while running calcnewt
Source: timidity
Version: 2.14.0-8
Tags: patch upstream
User: helmutg@debian.org
Usertags: rebootstrap
timidity fails to cross build from source, because it fails running a
tool "calcnewt" with an Exec format error. As a build tool, it should be
compiled with the build architecture compiler, but timidity uses the
host architecture compiler. The attached patch fixes that by using a
macro from autoconf-archive. Please consider applying it.
timidity still fails to cross build from source, because
DEB_BUILD_OPTIONS=nocheck is broken (see my other bug report). Please
close this bug anyway when fixing the calcnewt issue.
Helmut
--- timidity-2.14.0.orig/configure.in
+++ timidity-2.14.0/configure.in
@@ -165,6 +165,7 @@
AM_PATH_LISPDIR
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
+AX_PROG_CC_FOR_BUILD
AC_PROG_INSTALL
AC_PROG_AWK
AC_PROG_RANLIB
--- timidity-2.14.0.orig/timidity/Makefile.am
+++ timidity-2.14.0/timidity/Makefile.am
@@ -164,6 +164,8 @@
w32_libOggFLAC_dll_i.h
calcnewt_SOURCES = calcnewt.c
+calcnewt$(BUILD_EXEEXT): calcnewt.c
+ $(CC_FOR_BUILD) -o $@ $< -lm
if BORLANDC
Reply to: