From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2264 invoked by alias); 12 Jun 2009 23:38:41 -0000 Received: (qmail 2256 invoked by uid 22791); 12 Jun 2009 23:38:40 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Jun 2009 23:38:33 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MFGKJ-0007hg-QZ for insight@sources.redhat.com; Fri, 12 Jun 2009 23:38:27 +0000 Received: from 75.139.7.185 ([75.139.7.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Jun 2009 23:38:27 +0000 Received: from gds by 75.139.7.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Jun 2009 23:38:27 +0000 To: insight@sources.redhat.com From: Gene Smith Subject: i686-pc-mingw cross build on linux Date: Sun, 14 Jun 2009 03:12:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2009-q2/txt/msg00076.txt.bz2 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