public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wilson at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcj/28009] libjava cannot be cross-built; X_CFLAGS includes /usr/include Date: Fri, 01 Feb 2008 23:39:00 -0000 [thread overview] Message-ID: <20080201233904.13348.qmail@sourceware.org> (raw) In-Reply-To: <bug-28009-12387@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from wilson at gcc dot gnu dot org 2008-02-01 23:39 ------- Configuring --without-x is a possible workaround. I haven't tried it. I also haven't tried to reproduce the problem. The problem comes from the AC_PATH_XTRA call in libjava/configure.ac. This is a documented autoconf feature to get info about X header files and libraries. So now we have to look in the autoconf sources. AC_PATH_XTRA calls AC_PATH_X. If X is enabled, and x_includes/x_libraries have not already been specified, then _AC_PATH_X is called. _AC_PATH_X then calls _AC_PATH_X_XMKMF. _AC_PATH_X_XMKMF then does something clever. It creates an Imakefile that just echos the value of some Imakefile variables, it runs xmkmf to convert the Imakefile into an X makefile, then it runs make to echo out the expanded values of the X Imakefile variable values, and uses them to set x_includes and x_libraries. The problem here of course is that xmkmf is a host tool, which is being run directly (i.e. no macro to override), and will always return paths valid on the host. Which is wrong for a cross compiler. Though I suppose we could try overriding the _AC_PATH_X_XMKMF function itself. I only took a quick look at this, so I don't know why this is breaking for some and working for others. Perhaps it matters whether you have X headers and libraries in your sysroot. Perhaps it matters whether you use a sysroot. It clearly does matter whether you have xmkmf installed on your host machine. If you don't have xmkmf installed (which is part of the imake package), then you presumably won't have this problem. -- wilson at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wilson at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28009
prev parent reply other threads:[~2008-02-01 23:39 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-06-13 7:13 [Bug libgcj/28009] New: " tbm at cyrius dot com 2006-06-13 7:17 ` [Bug libgcj/28009] " tbm at cyrius dot com 2006-06-13 7:22 ` tbm at cyrius dot com 2006-09-03 7:23 ` pinskia at gcc dot gnu dot org 2006-09-04 10:11 ` tbm at cyrius dot com 2008-02-01 16:44 ` jwlemke at specifix dot com 2008-02-01 23:39 ` wilson at gcc dot gnu dot org [this message]
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=20080201233904.13348.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).