This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Steps to build Insight for Windows


Hi Kobus,

insight-owner@sourceware.org wrote on 01.11.2012 07:29:23:

> From: Kobus Engelbrecht <kobus@spamcop.net>
> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]