From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30925 invoked by alias); 2 Nov 2012 10:06:54 -0000 Received: (qmail 30917 invoked by uid 22791); 2 Nov 2012 10:06:53 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,TW_BJ X-Spam-Check-By: sourceware.org Received: from outdoor.onevision.de (HELO outdoor.onevision.de) (212.77.172.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Nov 2012 10:06:47 +0000 Received: from sanders.onevision.de (moonrace [212.77.172.62]) by outdoor.onevision.de (8.14.3/8.13.7/ROSCH/DDB) with ESMTP id qA2A6e0S022016; Fri, 2 Nov 2012 11:06:45 +0100 Received: from [192.168.5.32] ([192.168.5.32]) by sanders.onevision.de (Lotus Domino Release 8.5.3) with ESMTP id 2012110211063530-50117 ; Fri, 2 Nov 2012 11:06:35 +0100 Message-ID: <50939B2B.9090903@onevision.com> Date: Fri, 02 Nov 2012 10:06:00 -0000 From: Roland Schwingel User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: insight@sourceware.org, kobus@spamcop.net Subject: Re: Steps to build Insight for Windows Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-15; format=flowed 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: 2012-q4/txt/msg00010.txt.bz2 Hi Kobus, insight-owner@sourceware.org wrote on 01.11.2012 07:29:23: > From: Kobus Engelbrecht > Hi > > I have a clean Windows XP Pro SP3 32-bit vritual machine on which I > want to run the latest version of Insight. > > Can you please email me and also make a link under > "http://www.sourceware.org/insight/faq.php" that shows step by step > what software I must download, where I must download it from, which > versions it should be, how it should be setup/installed and the > commands I need to enter. > > I assume you need cygwin to do this. If so, please state which options > should be installed since the default settings doesn't seem enough. > > In short, a foolproof recipe nobody (including me) can get wrong. I do not have a real foolproof recipe but these are the major steps I do. It is not a really smooth procedure. Build environment: Mingw/msys with either the stock mingw gcc toolchain or the mingw-w64 toolchain. The benefit of the mingw-w64 toolchain is that you can build both 32bit and 64bit insight binaries. I still use gcc 4.6.2 toolchains. 64bit is still a bit more tricky but can be done by exchanging tcl/tk with 8.6 version. If you do it using cygwin you most likely end up with a cygwin binary which will need X11 for the gui. Maybe not what you want. At least I don't want this. The sourceware.org repos contains a tcl/tk 8.4 version which is quite old nowadays and it does not support 64bit windows. With some tweaking it compiles but I am using a (slightly handcrafted) 8.6b2 version. When 8.6 gets final I will try to make a patch replacing the old intree tcl/tk with 8.6. Here is my brief way to do it: (some of the steps are recapped from memory or some set aside notes, but most I do have performed just some days ago on windows 7 64bit to generate a 32bit stock insight binary). 1. Install mingw/msys with a gcc 4.6 toolchain. 2. Check out CVS source of insight from sourceware.org. You need the following folders: bfd,etc,expat,gdb,include,itcl,libdecnumber,libgui, libiberty,opcode,readline,tcl,tk plus *ALL* files in the toplevel hierarchy. I suggest to check them out eg in D:\compile\insight_src (you can check out the whole tree but than building will take way longer as of the fact libraries are buildt insight is not using). For CVS operations I use cygwin. I check out the whole tree and remove the folders I do not need. 3. Start a msys window and cd to /d/compile 4. mkdir insight_obj 5. cd insight_obj 6. ../insight_src/configure --prefix=/d/compile/insight_bin (This configures insight to build in insight_obj and install to insight_bin). 7. make (now it will start out to configure/build the individual components. It will fail compiling in tcl.) 8. Change the following lines in the following files: tcl/win/tclWinChan.c - lines 125/126 should be changed to: static void __attribute__ ((used)) *ESP; static void __attribute__ ((used)) *EBP; tcl/win/tclWinDde.c - line 1178: objv += (async + 3); tcl/win/tclWinReg.c - line 750: while (*(p)++ != 0) {} Some of these changes are a little rude but I don't matter here as insight does not really uses this. We just need to get it compiled! These changes are only neccessary for the old intree tcl to get it compiled with a decent gcc. (4.6.2 in my case). With 8.6 I do not have heavy changes. 9. make (it passes now tcl but fails later in configuring libgui because of not finding tcl/tk configs.) 10. cd tcl && make install && cd .. 11. cd tk && make install && cd .. 12. cd libgui 13. make "TK_INCLUDES=-I/d/compile/insight_src/tk/generic -I/d/compile/insight_src/tk/unix -I/d/compile/insight_src/tk/win" 14. cd .. 15. make (It should succeed now without any further errors) 16. make install (All binaries are now installed into D:\compile\insight_bin) 17. /d/compile/insight_bin/bin/insight.exe (insight should now startup ...) Roland