Mailinglist Archive: opensuse-buildservice (193 mails)

< Previous Next >
Re: [opensuse-buildservice] autoconf when cross compiling for mingw32

On Thursday 2014-01-09 18:03, Roger Oberholtzer wrote:
On Thursday, January 09, 2014 05:59:50 PM Jan Engelhardt wrote:
On Thursday 2014-01-09 17:52, Roger Oberholtzer wrote:
[ 81s] configure: error: cannot run test program while cross compiling
[ 81s] See `config.log' for more details
[ 81s] error: Bad exit status from /var/tmp/rpm-tmp.3JPOqP (%build)

Hmm. What to do?

What package are we talking about?

It is a Tcl/Tk extension called TkImg.

AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
AC_TRY_RUN([#include <unistd.h>
int main() {exit(!(sizeof(long long) > sizeof(long)));}
], tcl_cv_type_64bit="long long"))])

*sigh* someone (whoever wrote tcl.m4) did not knew autoconf well enough.

The AC_TRY_RUN call is, as you saw, an impediment to cross-compilation
and not really necessary. It should be replaceble by:

AC_CHECK_SIZEOF([long long])
AS_IF([test "$ac_cv_sizeof_long_long" -ne 0 &&
test "$ac_cv_sizeof_long" -ne 0 &&
test "$ac_cv_sizeof_long_long" -gt "$ac_cv_sizeof_long"],
[tcl_cv_type_64bit="long long"])

(And in the same go, for cosmetics, __int64 could also be AC_CHECK_SIZEOF'ed
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >