public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: Steps to build Insight for Windows
@ 2012-11-02 10:06 Roland Schwingel
  0 siblings, 0 replies; 4+ messages in thread
From: Roland Schwingel @ 2012-11-02 10:06 UTC (permalink / raw)
  To: insight, kobus

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Steps to build Insight for Windows
  2013-01-10 20:46 ` Hugh Sparks
@ 2013-01-10 22:47   ` Keith Seitz
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Seitz @ 2013-01-10 22:47 UTC (permalink / raw)
  To: Hugh Sparks; +Cc: insight

On 01/10/2013 12:46 PM, Hugh Sparks wrote:

> The CVS browser does work and I could see an expat directory. Evidently
> the archives I tried are too old? Is there somewhere I can download the
> appropriate sources? Any insight into why source code doesn't
> appear in the debugger would be appreciated.

Yes, the tarballs you downloaded are quite old, indeed. I keep meaning 
to make an official release, but life has really gotten in the way. My bad.

The easiest thing to do is checkout the latest sources from CVS HEAD. If 
you can't do that, let me know, and I'll tar up a copy and either send 
it to you or put it somewhere you can get at it.

As for the source files not being found, I would first try opening a 
console window and typing "list" or "list <SOMEF UNCTION>". If that 
doesn't get you source, either, then you will need to modify the source 
search path using gdb's "dir" command (type "help dir" into the console 
for help on that).

The other thing to check is that you really do have debug info. For a 
function defined in the source file you cannot list, type "info func 
<FUNCNAME>". Gdb will tell you whether it has any debuginfo for that 
function. If it only gives "Non-debugging symbols", then your CU was not 
actually built with debuginfo (or it was stripped, damaged, etc).

Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Steps to build Insight for Windows
       [not found] <1357848662.20894.ezmlm@sourceware.org>
@ 2013-01-10 20:46 ` Hugh Sparks
  2013-01-10 22:47   ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Hugh Sparks @ 2013-01-10 20:46 UTC (permalink / raw)
  To: insight

Thanks Roland Schwingel for the detailed instructions!
I was able to build and run Insight for mingw.

There is, however, a problem: When I load a program into the debugger 
(compiled with -O0 -g), I can only see assembly language. The window 
simply "blinks" when I try to select source mode. When I try to run the 
program, I get the message:

"Can not parse XML target description; XML support was disabled at 
compile time"

I noticed when following the instructions the list of required 
directories included 'expat'. But there was no expat directory in the 
archive I downloaded. The CVS was not working so I tried both of these 
with similar results:

      insight-6.8-1a.tar.bz2
      insight-weekly-7.0.50-20091130.tar.bz2

The CVS browser does work and I could see an expat directory. Evidently 
the archives I tried are too old? Is there somewhere I can download the 
appropriate sources? Any insight into why source code doesn't
appear in the debugger would be appreciated.

Thanks

-Hugh Sparks


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Steps to build Insight for Windows
@ 2012-11-01  6:29 Kobus Engelbrecht
  0 siblings, 0 replies; 4+ messages in thread
From: Kobus Engelbrecht @ 2012-11-01  6:29 UTC (permalink / raw)
  To: insight

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.

Thank you
Kobus

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-10 22:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02 10:06 Steps to build Insight for Windows Roland Schwingel
     [not found] <1357848662.20894.ezmlm@sourceware.org>
2013-01-10 20:46 ` Hugh Sparks
2013-01-10 22:47   ` Keith Seitz
  -- strict thread matches above, loose matches on Subject: below --
2012-11-01  6:29 Kobus Engelbrecht

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).