[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed to cross-build gcl27



On 2025-08-03 10:14 +0530, Nilesh Patra wrote:
Hi,

gcl27 hard-codes CC as gcc so the first bit was quite easy to get through (patch so far pasted
at the end of the mail).

The next failure is:

| checking for setjmp.h... yes
| checking sizeof jmp_buf... configure: error: in '/build/reproducible-path/gcl27-2.7.1':
| configure: error: cannot run test program while cross compiling
| See 'config.log' for more details
| make: *** [debian/rules:65: configure-stamp] Error 1

The configure script runs several tiny test programs to get info in bits and pieces. The above
is to get sizeof jmp. And the configure script has a hard fail if its cross building.

This is a pattern that I've seen in a few other packages as well that I looked at in the
past days. Is there a way around it?

It depends what is being tested but in the debian context we often know
the answers to these sorts of (sizeof foo) build-time tests and can hard-code them or look them up on a per-arch basis, when cross-building.

A build-time tests that run programs on the build arch whislt expecting
to find out onfo on the host arch are never going to work (short of
involing qemu, which we should not depend on).

Wookey
--
Principal hats:  Debian, Wookware
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: