public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* no insight executable built with target=arm-elf (mingw and ubuntu)
@ 2007-06-27 12:28 Brian Sidebotham
  2007-06-27 19:20 ` Keith Seitz
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Sidebotham @ 2007-06-27 12:28 UTC (permalink / raw)
  To: insight

Hi guys,

I am trying to build insight from cvs source for target=arm-elf. 
Everything builds, but no executable arm-elf-insight is created.

I have seen other posts about this in the archives, but nothing seems to 
offer a solution for me.

I am compiling under both mingw, and on ubuntu. Under mingw, I am 
compiling the insight cvs tree and everything is successfull apart from 
not getting a arm-elf-insight.exe executable.

Under ubuntu, I am compiling insight in a combined source tree with gcc 
and newlib. Again, everything is built and works correctly, except the 
arm-elf-insight executable isn't installed.

I have also tried executing arm-elf-gdb -w on the windows box, but it 
just starts a standard gdb session.

the configure line on the windows box is simply:
../src/configure --target=arm-elf --prefix=/mingw/src/insight/cvs/install

Can anyone shed some light as to where I'm going wrong, or anything I am 
not doing right?

Thanks,

Brian Sidebotham.

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

* Re: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-27 12:28 no insight executable built with target=arm-elf (mingw and ubuntu) Brian Sidebotham
@ 2007-06-27 19:20 ` Keith Seitz
  2007-06-28 13:43   ` Brian Sidebotham
  0 siblings, 1 reply; 9+ messages in thread
From: Keith Seitz @ 2007-06-27 19:20 UTC (permalink / raw)
  To: micros; +Cc: insight

Brian Sidebotham wrote:
> the configure line on the windows box is simply:
> ../src/configure --target=arm-elf --prefix=/mingw/src/insight/cvs/install

I just built arm-elf-insight on linux. It built the insight executable 
and installed arm-elf-insight.

> Can anyone shed some light as to where I'm going wrong, or anything I am 
> not doing right?

Something must be wrong with your build. Does 
$BUILDDIR/gdb/insight$(EXEEXT) not exist? Can you scan through the 
output of the configure/build to see if it was disabled or if some 
dependency missing?

Keith

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

* Re: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-27 19:20 ` Keith Seitz
@ 2007-06-28 13:43   ` Brian Sidebotham
  2007-06-28 22:14     ` Keith Seitz
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Sidebotham @ 2007-06-28 13:43 UTC (permalink / raw)
  To: insight

> Something must be wrong with your build. Does 
> $BUILDDIR/gdb/insight$(EXEEXT) not exist? Can you scan through the 
> output of the configure/build to see if it was disabled or if some 
> dependency missing?

Hi Keith,

$BUILDDIR/gdb/insight$(EXEEXT) doesn't exist after a build. However, 
there are a few clues on my windows box.

whilst configuring in gdb, tcl and x don't get detected:
checking for Tcl configuration... checking for X... no

I can now get the build to start building gdbtk, but it gives errors :(

My prefix line is now:
../src/configure --target=arm-elf --prefix=${INSTALLDIR} 
--with-tclconfig=${BUILDDIR}/tcl/win --with-tkconfig=%{BUILDDIR}/tk/win

the build fails when compiling ${SRCDIR}/gdb/gdbtk/generic/gdbtk.c 
because it's trying to include <sys/ioctl.h> but mingw doesn't have a 
sys/ioctl.h include. Excluding this include in the source code fails on 
the errors - sigaction structure not defined.

The ${BUILDDIR}/gdb/config.h file has HAVE_SYS_IOCTL_H commented out, 
but then the gdbtk.c file includes it without checking the define anyway.

I still haven't tried the linux box yet as it's at home. Any further 
clues greatly appreciated!

Best Regards,

Brian Sidebotham.

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

* Re: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-28 13:43   ` Brian Sidebotham
@ 2007-06-28 22:14     ` Keith Seitz
  2007-06-28 22:38       ` Eric Weddington
  2007-06-29 18:17       ` Brian Sidebotham
  0 siblings, 2 replies; 9+ messages in thread
From: Keith Seitz @ 2007-06-28 22:14 UTC (permalink / raw)
  To: micros; +Cc: insight

Brian Sidebotham wrote:
> My prefix line is now:
> ../src/configure --target=arm-elf --prefix=${INSTALLDIR} 
> --with-tclconfig=${BUILDDIR}/tcl/win --with-tkconfig=%{BUILDDIR}/tk/win
> 
> the build fails when compiling ${SRCDIR}/gdb/gdbtk/generic/gdbtk.c 
> because it's trying to include <sys/ioctl.h> but mingw doesn't have a 
> sys/ioctl.h include. Excluding this include in the source code fails on 
> the errors - sigaction structure not defined.

Are you using mingw or Cygwin? You cannot build/run Insight or gdb on 
mingw (at least that was true the last time I looked at it). Officially, 
mingw is not a supported platform (although I have heard of people 
making having various degrees of success making it work).

> The ${BUILDDIR}/gdb/config.h file has HAVE_SYS_IOCTL_H commented out, 
> but then the gdbtk.c file includes it without checking the define anyway.

I'll fix that.

  > I still haven't tried the linux box yet as it's at home. Any further
> clues greatly appreciated!

I seldom use Windows any more since my box is about eight years old, but 
I've dusted it off to give it a try. No problems. For linux, make sure 
you have the x-devel packages installed. On Fedora, that's 
xorg-X11-proto-devel.

Keith

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

* RE: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-28 22:14     ` Keith Seitz
@ 2007-06-28 22:38       ` Eric Weddington
  2007-06-29  4:07         ` Dave Murphy
  2007-06-29 18:17       ` Brian Sidebotham
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Weddington @ 2007-06-28 22:38 UTC (permalink / raw)
  To: 'Keith Seitz', micros; +Cc: insight, 'Dave Murphy'



> -----Original Message-----
> From: insight-owner@sourceware.org
> [mailto:insight-owner@sourceware.org] On Behalf Of Keith Seitz
> Sent: Thursday, June 28, 2007 4:15 PM
> To: micros@valvers.com
> Cc: insight@sourceware.org
> Subject: Re: no insight executable built with target=arm-elf
> (mingw and ubuntu)
>
> Brian Sidebotham wrote:
> > My prefix line is now:
> > ../src/configure --target=arm-elf --prefix=${INSTALLDIR}
> > --with-tclconfig=${BUILDDIR}/tcl/win
> --with-tkconfig=%{BUILDDIR}/tk/win
> >
> > the build fails when compiling ${SRCDIR}/gdb/gdbtk/generic/gdbtk.c
> > because it's trying to include <sys/ioctl.h> but mingw
> doesn't have a
> > sys/ioctl.h include. Excluding this include in the source
> code fails on
> > the errors - sigaction structure not defined.
>
> Are you using mingw or Cygwin? You cannot build/run Insight or gdb on
> mingw (at least that was true the last time I looked at it).
> Officially,
> mingw is not a supported platform (although I have heard of people
> making having various degrees of success making it work).

That's not exactly true, Keith.

I can build GDB host=mingw target=avr for 6.5. I assume 6.6 works, though I
haven't tried it yet. AFAIK, support for host=mingw was put into the GDB
repo in 6.5.

Insight also builds (same configuration), though I also ran into the issue
that it didn't produce an avr-insight executable. Dave Murphy (CCed) gave me
a patch that fixed it up, though the patch has a bunch of other stuff too.
This discussion is in the insight archives in the April 2007 time frame.

Eric Weddington


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

* Re: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-28 22:38       ` Eric Weddington
@ 2007-06-29  4:07         ` Dave Murphy
  2007-06-29 12:33           ` Christopher Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: Dave Murphy @ 2007-06-29  4:07 UTC (permalink / raw)
  To: Eric Weddington, insight; +Cc: 'Keith Seitz', micros

[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]

Eric Weddington wrote:
>> Are you using mingw or Cygwin? You cannot build/run Insight or gdb on
>> mingw (at least that was true the last time I looked at it).
>> Officially,
>> mingw is not a supported platform (although I have heard of people
>> making having various degrees of success making it work).
>>     
>
> That's not exactly true, Keith.
>
> I can build GDB host=mingw target=avr for 6.5. I assume 6.6 works, though I
> haven't tried it yet. AFAIK, support for host=mingw was put into the GDB
> repo in 6.5.
>
> Insight also builds (same configuration), though I also ran into the issue
> that it didn't produce an avr-insight executable. Dave Murphy (CCed) gave me
> a patch that fixed it up, though the patch has a bunch of other stuff too.
> This discussion is in the insight archives in the April 2007 time frame.
>   

I have Insight 6.6. building with MinGW now for several targets 
including native. I'd like to submit the patches once they're cleaned up 
a bit - right now my patchset includes pieces for gdb as well as Insight.

Recently I had the opportunity to test debugging over a serial port for 
an arm-eabi target and found that the Insight GUI failed for this 
option. It turns out that the code which fills the drop down with 
available ports uses /dev/com<x> format which works in cygwin but not 
when compiled with MinGW where COM<x> is required instead.

Is it reasonable to replace the /dev/com parts with COM or should I 
check for cygwin and retain /dev/com there?

I've attached this part of my local patch so you can see what I mean.

Dave Murphy

[-- Attachment #2: insight-6.6-COM.patch --]
[-- Type: text/x-patch, Size: 6083 bytes --]

diff -Nbaur insight-6.6/gdb/gdbtk/library/targetselection.itb insight-6.6-mingw/gdb/gdbtk/library/targetselection.itb
--- insight-6.6/gdb/gdbtk/library/targetselection.itb	Fri Dec  8 04:16:39 2006
+++ insight-6.6-mingw/gdb/gdbtk/library/targetselection.itb	Fri Jun  8 03:06:28 2007
@@ -76,7 +76,7 @@
   set gdb_target(sds,pretty-name) "SDS"
   set gdb_target(sds,defbaud) "38400"
   set gdb_target(sds,baud-rates) {9600 38400}
-  set gdb_target(sds,cmd) "sds com1"
+  set gdb_target(sds,cmd) "sds COM1"
   set gdb_target(sds,runlist) {1 1 0 1}
   set gdb_target(sds,after_attaching) {}
 
@@ -93,7 +93,7 @@
   set gdb_target(remote,pretty-name) "Remote/Serial"
   set gdb_target(remote,defbaud) "9600"
   set gdb_target(remote,baud-rates) {9600 19200 38400 57600 115200}
-  set gdb_target(remote,cmd) "remote com1"
+  set gdb_target(remote,cmd) "remote COM1"
   set gdb_target(remote,runlist) {1 1 0 1}
   set gdb_target(remote,after_attaching) {}
   set gdb_target(remotetcp,pretty-name) "Remote/TCP"
@@ -107,7 +107,7 @@
   set gdb_target(rdi,pretty-name) "ARM Angel/Serial"
   set gdb_target(rdi,defbaud) "9600"
   set gdb_target(rdi,baud-rates) {9600 19200 38400 57600 115200}
-  set gdb_target(rdi,cmd) "rdi com1"
+  set gdb_target(rdi,cmd) "rdi COM1"
   set gdb_target(rdi,runlist) {1 1 0 1}
   set gdb_target(rdi,after_attaching) {}
 
@@ -123,7 +123,7 @@
   set gdb_target(rdp,pretty-name) "ARM Remote/Serial"
   set gdb_target(rdp,defbaud) "9600"
   set gdb_target(rdp,baud-rates) {9600}
-  set gdb_target(rdp,cmd) "rdp com1"
+  set gdb_target(rdp,cmd) "rdp COM1"
   set gdb_target(rdp,runlist) {1 1 0 1}
   set gdb_target(rdp,after_attaching) {}
   set gdb_target(rdptcp,pretty-name) "ARM Remote/TCP"
@@ -137,7 +137,7 @@
   set gdb_target(m32r,pretty-name) "M32R/Serial"
   set gdb_target(m32r,defbaud) "9600"
   set gdb_target(m32r,baud-rates) {9600}
-  set gdb_target(m32r,cmd) "m32r com1"
+  set gdb_target(m32r,cmd) "m32r COM1"
   set gdb_target(m32r,runlist) {1 1 0 1}
   set gdb_target(m32r,after_attaching) {}
   set gdb_target(m32rtcp,pretty-name) "M32R/TCP"
@@ -151,7 +151,7 @@
   set gdb_target(mon2000,pretty-name) "MON2000/Serial"
   set gdb_target(mon2000,defbaud) "9600"
   set gdb_target(mon2000,baud-rates) {9600}
-  set gdb_target(mon2000,cmd) "mon2000 com1"
+  set gdb_target(mon2000,cmd) "mon2000 COM1"
   set gdb_target(mon2000,runlist) {1 1 0 1}
   set gdb_target(mon2000,after_attaching) {}
   set gdb_target(mon2000tcp,pretty-name) "MON2000/TCP"
@@ -165,7 +165,7 @@
   set gdb_target(sparclite,pretty-name) "SPARClite/Serial"
   set gdb_target(sparclite,defbaud) "9600"
   set gdb_target(sparclite,baud-rates) {9600}
-  set gdb_target(sparclite,cmd) "sparclite com1"
+  set gdb_target(sparclite,cmd) "sparclite COM1"
   set gdb_target(sparclite,runlist) {1 1 0 1}
   set gdb_target(sparclite,after_attaching) {}
   set gdb_target(sparclitetcp,pretty-name) "SPARClite/TCP"
@@ -187,7 +187,7 @@
   set gdb_target(mips,pretty-name) "MIPS/Serial"
   set gdb_target(mips,defbaud) "9600"
   set gdb_target(mips,baud-rates) {9600}
-  set gdb_target(mips,cmd) "mips com1"
+  set gdb_target(mips,cmd) "mips COM1"
   set gdb_target(mips,runlist) {1 1 0 1}
   set gdb_target(mips,after_attaching) {}
   set gdb_target(mipstcp,pretty-name) "MIPS/TCP"
@@ -201,7 +201,7 @@
   set gdb_target(pmon,pretty-name) "PMON/Serial"
   set gdb_target(pmon,defbaud) "9600"
   set gdb_target(pmon,baud-rates) {9600 19200 38400}
-  set gdb_target(pmon,cmd) "pmon com1"
+  set gdb_target(pmon,cmd) "pmon COM1"
   set gdb_target(pmon,runlist) {1 1 0 1}
   set gdb_target(pmon,after_attaching) {}
   set gdb_target(pmontcp,pretty-name) "PMON/TCP"
@@ -215,7 +215,7 @@
   set gdb_target(ddb,pretty-name) "DDB/Serial"
   set gdb_target(ddb,defbaud) "19200"
   set gdb_target(ddb,baud-rates) {9600 19200 38400}
-  set gdb_target(ddb,cmd) "ddb com1"
+  set gdb_target(ddb,cmd) "ddb COM1"
   set gdb_target(ddb,runlist) {1 1 0 1}
   set gdb_target(ddb,after_attaching) {}
   set gdb_target(ddbtcp,pretty-name) "DDB/TCP"
@@ -229,7 +229,7 @@
   set gdb_target(picobug,pretty-name) "Picobug/Serial"
   set gdb_target(picobug,defbaud) "19200"
   set gdb_target(picobug,baud-rates) {19200}
-  set gdb_target(picobug,cmd) "picobug com1"
+  set gdb_target(picobug,cmd) "picobug COM1"
   set gdb_target(picobug,runlist) {1 1 0 1}
   set gdb_target(picobug,after_attaching) {}
   set gdb_target(picobugtcp,pretty-name) "Picobug/TCP"
@@ -243,7 +243,7 @@
   set gdb_target(cisco,pretty-name) "Cisco/Serial"
   set gdb_target(cisco,defbaud) "38400"
   set gdb_target(cisco,baud-rates) {9600 19200 38400 56000}
-  set gdb_target(cisco,cmd) "cisco com1"
+  set gdb_target(cisco,cmd) "cisco COM1"
   set gdb_target(cisco,runlist) {1 0 0 0}
   set gdb_target(cisco,after_attaching) "set os cisco"
   set gdb_target(ciscotcp,pretty-name) "Cisco/TCP"
@@ -266,7 +266,7 @@
   set gdb_target(gdbserver,pretty-name) "GDBserver/Serial"
   set gdb_target(gdbserver,defbaud) "9600"
   set gdb_target(gdbserver,baud-rates) {9600 19200 38400 57600 115200}
-  set gdb_target(gdbserver,cmd) "remote com1"
+  set gdb_target(gdbserver,cmd) "remote COM1"
   set gdb_target(gdbserver,runlist) {1 0 0 1}
   set gdb_target(gdbserver,after_attaching) {}
   set gdb_target(gdbservertcp,pretty-name) "GDBserver/TCP"
@@ -280,7 +280,7 @@
 itcl::body TargetSelection::default_port {} {
   global tcl_platform
   switch -regexp $tcl_platform(os) {
-    Windows { set port com1 }
+    Windows { set port COM1 }
     Linux   { set port /dev/ttyS0 }
     SunOS   { set port /dev/ttya }
     AIX     { set port /dev/foo1 }
@@ -885,7 +885,7 @@
       # Failed.  Find out why.
       if {[string first "permission denied" $msg] != -1} {
 	# Port is there, but busy right now. That's OK.
-	lappend plist /dev/com$i
+	lappend plist COM$i
       } elseif {$i > 4} {
 	# if we've scanned the first 4 ports, then quit when we find no more 
 	set quit 1
@@ -893,7 +893,7 @@
     } else {
       # We got it.  Now close it and add to list.
       close $fd
-      lappend plist /dev/com$i
+      lappend plist COM$i
     }
   }
   return $plist

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

* Re: no insight executable built with target=arm-elf (mingw and  ubuntu)
  2007-06-29  4:07         ` Dave Murphy
@ 2007-06-29 12:33           ` Christopher Faylor
  0 siblings, 0 replies; 9+ messages in thread
From: Christopher Faylor @ 2007-06-29 12:33 UTC (permalink / raw)
  To: Dave Murphy, 'Keith Seitz', Eric Weddington, micros, insight

On Fri, Jun 29, 2007 at 05:07:37AM +0100, Dave Murphy wrote:
> Is it reasonable to replace the /dev/com parts with COM or should I check 
> for cygwin and retain /dev/com there?

Cygwin does not consider raw 'comN' strings to be serial ports.  That's
why the /dev form is used.

cgf

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

* Re: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-28 22:14     ` Keith Seitz
  2007-06-28 22:38       ` Eric Weddington
@ 2007-06-29 18:17       ` Brian Sidebotham
  2007-06-29 21:14         ` Eric Weddington
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Sidebotham @ 2007-06-29 18:17 UTC (permalink / raw)
  To: insight


Keith Seitz wrote:
> Brian Sidebotham wrote:
>> My prefix line is now:
>> ../src/configure --target=arm-elf --prefix=${INSTALLDIR} 
>> --with-tclconfig=${BUILDDIR}/tcl/win --with-tkconfig=%{BUILDDIR}/tk/win
>>
>> the build fails when compiling ${SRCDIR}/gdb/gdbtk/generic/gdbtk.c 
>> because it's trying to include <sys/ioctl.h> but mingw doesn't have a 
>> sys/ioctl.h include. Excluding this include in the source code fails 
>> on the errors - sigaction structure not defined.
> 
> Are you using mingw or Cygwin? You cannot build/run Insight or gdb on 
> mingw (at least that was true the last time I looked at it). Officially, 
> mingw is not a supported platform (although I have heard of people 
> making having various degrees of success making it work).
> 
>> The ${BUILDDIR}/gdb/config.h file has HAVE_SYS_IOCTL_H commented out, 
>> but then the gdbtk.c file includes it without checking the define anyway.
> 
> I'll fix that.

For fullness, the current files which include sys/ioctl.h without 
checking are:

/src/gdb/gdbtk/generic/gdbtk.c
/src/gdb/gdbtk/generic/gdbtk_cmds.c
/src/gdb/gdbtk/generic/gdbtk_hooks.c

Let me know if you want me to send a patch for exclusion of 
<sys/ioctl.h> if it doesn't exist.

> I seldom use Windows any more since my box is about eight years old, but 
> I've dusted it off to give it a try. No problems. For linux, make sure 
> you have the x-devel packages installed. On Fedora, that's 
> xorg-X11-proto-devel.
> 
> Keith

You should be able to get the mingw compiler setup on your linux box, 
but if it is an unsupported target I guess it's not a priority.

Dave Murphy forwarded me a patch (thank you very much for that Dave!) 
and with that I was successful in building a working 6.6 
arm-elf-insight.exe under mingw.

Eric, target=avr also built correctly for 6.6 (as does cvs with a few 
changes to Dave's patch)

Hopefully Dave will be able to make his patches available soon (If you 
need any help with those Dave, please shout) and cvs will be buildable 
on mingw out-of-the-box.

Thanks for everyone's help.

Best Regards,

Brian Sidebotham.

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

* RE: no insight executable built with target=arm-elf (mingw and ubuntu)
  2007-06-29 18:17       ` Brian Sidebotham
@ 2007-06-29 21:14         ` Eric Weddington
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Weddington @ 2007-06-29 21:14 UTC (permalink / raw)
  To: micros, insight; +Cc: 'Dave Murphy'



> -----Original Message-----
> From: insight-owner@sourceware.org
> [mailto:insight-owner@sourceware.org] On Behalf Of Brian Sidebotham
> Sent: Friday, June 29, 2007 12:18 PM
> To: insight@sourceware.org
> Subject: Re: no insight executable built with target=arm-elf
> (mingw and ubuntu)
>
> Eric, target=avr also built correctly for 6.6 (as does cvs with a few
> changes to Dave's patch)
>

I've now verified that it builds for 6.6 for the avr.

Thanks,
Eric


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

end of thread, other threads:[~2007-06-29 21:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-27 12:28 no insight executable built with target=arm-elf (mingw and ubuntu) Brian Sidebotham
2007-06-27 19:20 ` Keith Seitz
2007-06-28 13:43   ` Brian Sidebotham
2007-06-28 22:14     ` Keith Seitz
2007-06-28 22:38       ` Eric Weddington
2007-06-29  4:07         ` Dave Murphy
2007-06-29 12:33           ` Christopher Faylor
2007-06-29 18:17       ` Brian Sidebotham
2007-06-29 21:14         ` Eric Weddington

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