All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julius Naperkowski <j.nap@gmx.de>
To: git@vger.kernel.org
Subject: autoconf: C99 format check
Date: Thu, 15 Jan 2009 13:22:54 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090115T123123-915@post.gmane.org> (raw)

I am trying to cross-compile git for mips on a x86 host. But it seems that it is
impossible to pass the C99 Format check in the configure script when
cross_compile mode is activated because the script quits even before it starts
the testprogramm. Is this behavior intentional?

configure: CHECKS for programs
checking for mips-linux-cc... ccache mips-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether ccache mips-linux-uclibc-gcc accepts -g... yes
checking for ccache mips-linux-uclibc-gcc option to accept ISO C89... none needed
checking if linker supports -R... no
checking if linker supports -Wl,-rpath,... yes
checking for mips-linux-gar... mips-linux-uclibc-ar
checking for gtar... /bin/tar
checking for asciidoc... no
configure: CHECKS for libraries
checking for SHA1_Init in -lcrypto... no
checking for SHA1_Init in -lssl... no
checking for curl_global_init in -lcurl... no
checking for XML_ParserCreate in -lexpat... no
checking for iconv in -lc... no
checking for iconv in -liconv... no
checking for deflateBound in -lz... no
checking for socket in -lc... yes
configure: CHECKS for header files
checking how to run the C preprocessor... ccache mips-linux-uclibc-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for old iconv()... yes
configure: CHECKS for typedefs, structures, and compiler characteristics
checking for struct dirent.d_ino... yes
checking for struct dirent.d_type... yes
checking for struct sockaddr_storage... yes
checking for struct addrinfo... yes
checking for getaddrinfo... (cached) yes
checking for library containing getaddrinfo... none required
checking whether formatted IO functions support C99 size specifiers...
configure: error: cannot run test program while cross compiling
See `config.log' for more details.


A snippet of the configure script:

...
4928: # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
4929: # do not support the 'size specifiers' introduced by C99, namely ll, hh,
4930: # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
4931: # some C compilers supported these specifiers prior to C99 as an extension.
4932: { echo "$as_me:$LINENO: checking whether formatted IO functions support
C99 size specifiers" >&5
4933: echo $ECHO_N "checking whether formatted IO functions support C99 size
specifiers... $ECHO_C" >&6; }
4934: if test "${ac_cv_c_c99_format+set}" = set; then
4935:   echo $ECHO_N "(cached) $ECHO_C" >&6
4936: else
4937:   # Actually git uses only %z (%zu) in alloc.c, and %t (%td) in mktag.c
4938: if test "$cross_compiling" = yes; then
4939:   { { echo "$as_me:$LINENO: error: cannot run test program while cross
compiling
4940: See \`config.log' for more details." >&5
4941: echo "$as_me: error: cannot run test program while cross compiling
4942: See \`config.log' for more details." >&2;}
4943:    { (exit 1); exit 1; }; }
4944: else
4945:   cat >conftest.$ac_ext <<_ACEOF
4946: /* confdefs.h.  */
4947: _ACEOF
4948: cat confdefs.h >>conftest.$ac_ext
4949: cat >>conftest.$ac_ext <<_ACEOF
...


--
Julius

             reply	other threads:[~2009-01-15 13:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-15 13:22 Julius Naperkowski [this message]
2009-01-16  9:41 ` autoconf: C99 format check Ralf Wildenhues
2009-01-19 20:34   ` [PATCH] Provide pessimistic defaults for cross compilation tests Ralf Wildenhues
2009-01-19 23:39     ` Johannes Schindelin
2009-01-20  2:49       ` Junio C Hamano
2009-01-20  6:59         ` Ralf Wildenhues
2009-01-20  6:50     ` Junio C Hamano
2009-01-20  7:04       ` Ralf Wildenhues

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20090115T123123-915@post.gmane.org \
    --to=j.nap@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.