From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30211 invoked by alias); 17 Nov 2009 01:01:57 -0000 Received: (qmail 29413 invoked by uid 22791); 17 Nov 2009 01:01:55 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 17 Nov 2009 01:01:04 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NACRJ-000061-It for insight@sources.redhat.com; Tue, 17 Nov 2009 02:01:01 +0100 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 ; Tue, 17 Nov 2009 02:01:01 +0100 Received: from gds by 75.139.7.185 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 17 Nov 2009 02:01:01 +0100 To: insight@sources.redhat.com From: Gene Smith Subject: Re: i686-pc-mingw cross build on linux [now fedora 11] Date: Tue, 17 Nov 2009 01:01:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Thunderbird/3.0b4 In-Reply-To: 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-q4/txt/msg00038.txt.bz2 Gene Smith wrote, On 06/12/2009 07:38 PM: > 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 > I revisited this with fedora 11 using the mingw32 yum package for f11. To build on f11 you have to kluge a few more thing (maybe for f8 too, not sure): insight file tclWinDde.c: Comment out the line 1178 that says: ((Tcl_Obj **) objv) += (async + 3); The mingw32 compiler chokes on this. This is for DDE which probably not even called in insight and someone else thought it was ok to just comment this out rather than try to correct the syntax. insight file tclWinReg.c: Comment out line 750 that says: while (*((Tcl_UniChar *)p)++ != 0) {} for same reason that insight probably doesn't use the registry ?? insight file tclWinChan.c: static vars get optimized out. Someone (David Korn of cygwin) patched this as follows using the "used" attribute at about line 124: #ifdef HAVE_NO_SEH static void *ESP __attribute__ ((used)); static void *EBP __attribute__ ((used)); #endif /* HAVE_NO_SEH */ Also, when run on windows, insight.exe complains about needing a couple of dlls that are present on f11 mingw32 /usr area. It needs libexpat-1.dll and libconv-2.dll. Then it runs OK once these are copied to windows. Have not tried latest cvs (or new release?) of insight so this might be a moot point with it and it builds with f11 mingw32 ok as-is. This just applies to release 6.8. For some reason, the f11 mingw exe is about 16M compared to the f8 mingw insight.exe which was 4M. Don't know if possibly debug info needs stripped out. -gene