public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Gene Smith <gds@chartertn.net>
To: insight@sources.redhat.com
Subject: i686-pc-mingw cross build on linux
Date: Sun, 14 Jun 2009 03:12:00 -0000	[thread overview]
Message-ID: <h0uot5$seo$1@ger.gmane.org> (raw)

I have successfully built insight 6.8 on linux using installed mingw32 
tools and copied the insight.exe to windows and it runs OK. (I haven't 
tried copying over all the many other installed files to make sure they 
work, which I will do later.) However, the build process on linux has 
some glitches that I solved with some kludges.

The main problem was that during compile it was unable to find 
tk/xlib/X11/X.h. This was because TK_XINCLUDE was blank. This was 
because gdb/configure was finding the system tkConfig.sh file to use at 
/usr/local/lib/ instead of the one produced by insight build. The system 
file has the macro TK_XINCLUDES='' which prevents the include of X.h and 
kills the build. It is not clear to me how to control this. So I just 
changed two places in my insight_sources/gdb/configure file to hardcode 
the TKCONFIG and TCLCONFIG values to insight's tkConfig.sh and 
tclConfig.sh like this with absolute paths:

line 23293 (approx):
     no_tk=
     # gds (kluge)
  ac_cv_c_tkconfig="/home/gene/4.9.1-rtems/archive/insight_build/tk/win"
     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh

line 23177 (approx):
     no_tcl=
     # gds (kluge)
ac_cv_c_tclconfig="/home/gene/4.9.1-rtems/archive/insight_build/tcl/win"
     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh

There must be a way to correctly insure that insight's own 
tk/tclConfig.sh files are found at insight_build/tcl/win and 
insight_build/tk/win.

Also, during the build the "resource compiler" i686-pc-mingw32-windres 
was never assigned to the macro "RC" which resulted in cryptic errors 
saying "command o could not be found." The only way I could find to fix 
this was to
export RC="i686-pc-mingw32-windres"
before doing configure. I don't know why this macro remains blank if you 
don't do this. Other similar macros get filled in properly.

(This is not a problem doing a mingw build on windows/cygwin with 
-mno-cygwin gcc option. I assume this is because on my windows 
installation only Insight provides the tk/tclConfig.sh files.)

With these fixes, the make and install on linux (fedora 8) works OK and 
the exe runs on XP. I have not copied over the other installed files and 
tried them.

Also, have not tried the cvs HEAD version, only insight release 6.8.

-gene
P/S: My linux mingw32 is built with this script from mingw project (rpms 
not available for fedora8 afaik):
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=12644










             reply	other threads:[~2009-06-12 23:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-14  3:12 Gene Smith [this message]
2009-11-17  1:01 ` i686-pc-mingw cross build on linux [now fedora 11] Gene Smith

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='h0uot5$seo$1@ger.gmane.org' \
    --to=gds@chartertn.net \
    --cc=insight@sources.redhat.com \
    /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 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).