public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* configure problem with insight.
@ 1999-08-11 11:34 Moses DeJong
  1999-08-11 11:51 ` James Ingham
  1999-08-11 11:59 ` Jason Molenda
  0 siblings, 2 replies; 6+ messages in thread
From: Moses DeJong @ 1999-08-11 11:34 UTC (permalink / raw)
  To: insight

Hi all.

I tried to configure insight in a a build directory and the configure
script bombed out on me.

cd insight-19990809
mkdir build52 ; cd build52
../configure --prefix=$HOME/project/insight52

...

creating Makefile
configuring in gdb.gdbtk
running /bin/sh ../../../../gdb/testsuite/gdb.gdbtk/configure
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
--prefix=/home/mo/project/insight52 --cache-file=../../../config.cache
--srcdir=../../../../gdb/testsuite/gdb.gdbtk
loading cache ../../../config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
creating ./config.status
creating Makefile
configuring in gdbserver
running /bin/sh /home/mo/project/insight-19990809/gdb/../configure
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
--prefix=/home/mo/project/insight52 --cache-file=../../config.cache
--srcdir=../../../gdb/gdbserver
*** Cannot configure here in
"/home/mo/project/insight-19990809/build52/gdb/gdbserver" when
"../../../gdb/gdbserver" is currently configured.
configure: error: /home/mo/project/insight-19990809/gdb/../configure
failed for
gdbserver
Configure in /home/mo/project/insight-19990809/build52/gdb failed,
exiting.


My System:
RedHat 5.2
kernel 2.2.9
glibc2.0
autoconf 2.12


Any ideas? Could I just remove the error from the configure script
or was it put in there for some reason?

Mo DeJong
dejong@cs.umn.edu

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

* configure problem with insight.
  1999-08-11 11:34 configure problem with insight Moses DeJong
@ 1999-08-11 11:51 ` James Ingham
  1999-08-11 11:59 ` Jason Molenda
  1 sibling, 0 replies; 6+ messages in thread
From: James Ingham @ 1999-08-11 11:51 UTC (permalink / raw)
  To: Moses DeJong; +Cc: insight

Moses,

You can probably just remove the error.  Here at Cygnus, we always
build in parallel trees.  As I understand it, this is largely to
encourage people to keep their sources on the machines that get backed 
up, and their build trees on the build machines that don't get backed
up.  When you are working on GNUPro, you often have a build tree
configured for many different targets/hosts etc, and this takes up
HUGE amounts of disk space.  Backing it all up would be runious...

Jim

 > Hi all.
 > 
 > I tried to configure insight in a a build directory and the configure
 > script bombed out on me.
 > 
 > cd insight-19990809
 > mkdir build52 ; cd build52
 > ../configure --prefix=$HOME/project/insight52
 > 
 > ...
 > 
 > creating Makefile
 > configuring in gdb.gdbtk
 > running /bin/sh ../../../../gdb/testsuite/gdb.gdbtk/configure
 > --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
 > --prefix=/home/mo/project/insight52 --cache-file=../../../config.cache
 > --srcdir=../../../../gdb/testsuite/gdb.gdbtk
 > loading cache ../../../config.cache
 > checking host system type... i686-pc-linux-gnu
 > checking target system type... i686-pc-linux-gnu
 > checking build system type... i686-pc-linux-gnu
 > creating ./config.status
 > creating Makefile
 > configuring in gdbserver
 > running /bin/sh /home/mo/project/insight-19990809/gdb/../configure
 > --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu
 > --prefix=/home/mo/project/insight52 --cache-file=../../config.cache
 > --srcdir=../../../gdb/gdbserver
 > *** Cannot configure here in
 > "/home/mo/project/insight-19990809/build52/gdb/gdbserver" when
 > "../../../gdb/gdbserver" is currently configured.
 > configure: error: /home/mo/project/insight-19990809/gdb/../configure
 > failed for
 > gdbserver
 > Configure in /home/mo/project/insight-19990809/build52/gdb failed,
 > exiting.
 > 
 > 
 > My System:
 > RedHat 5.2
 > kernel 2.2.9
 > glibc2.0
 > autoconf 2.12
 > 
 > 
 > Any ideas? Could I just remove the error from the configure script
 > or was it put in there for some reason?
 > 
 > Mo DeJong
 > dejong@cs.umn.edu
 > 
 > 

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

* Re: configure problem with insight.
  1999-08-11 11:34 configure problem with insight Moses DeJong
  1999-08-11 11:51 ` James Ingham
@ 1999-08-11 11:59 ` Jason Molenda
  1999-08-11 12:49   ` Moses DeJong
  1 sibling, 1 reply; 6+ messages in thread
From: Jason Molenda @ 1999-08-11 11:59 UTC (permalink / raw)
  To: Moses DeJong; +Cc: insight

On Wed, Aug 11, 1999 at 01:34:13PM -0500, Moses DeJong wrote:

> I tried to configure insight in a a build directory and the configure
> script bombed out on me.

> mkdir build52 ; cd build52
> ../configure --prefix=$HOME/project/insight52

As Jim wrote, this is the best way to configure and build Insight--with
the sources in one directory and the build tree in another.  You don't
change anything in the srcdir this way, and so it's easy to wipe the
slate clean and get back to a known state.


> configuring in gdbserver
> running /bin/sh /home/mo/project/insight-19990809/gdb/../configure
 [...]
> *** Cannot configure here in
> "/home/mo/project/insight-19990809/build52/gdb/gdbserver" when
> "../../../gdb/gdbserver" is currently configured.

The problem is that you ran a configure in your source tree at some
time in the past, and some remnants of this configure were left behind
in the insight-19990809/gdb/gdbserver directory.

You've got a few options.  You could just remove the source directory
altogether and untar the snapshot tarball again--that's the easiest.
You could cd into the insight-19990809/gdb/gdbserver directory and, if
there is a Makefile present, try doing a 'make distclean'.  If there
isn't a Makefile, you could try removing the config.status file in
that directory.

Hope that helps,

Jason

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

* Re: configure problem with insight.
  1999-08-11 11:59 ` Jason Molenda
@ 1999-08-11 12:49   ` Moses DeJong
  1999-08-11 14:10     ` Moses DeJong
  0 siblings, 1 reply; 6+ messages in thread
From: Moses DeJong @ 1999-08-11 12:49 UTC (permalink / raw)
  To: Jason Molenda; +Cc: insight

On Wed, 11 Aug 1999, Jason Molenda wrote:

> On Wed, Aug 11, 1999 at 01:34:13PM -0500, Moses DeJong wrote:
> 
> > I tried to configure insight in a a build directory and the configure
> > script bombed out on me.
> 
> > mkdir build52 ; cd build52
> > ../configure --prefix=$HOME/project/insight52
> 
> As Jim wrote, this is the best way to configure and build Insight--with
> the sources in one directory and the build tree in another.  You don't
> change anything in the srcdir this way, and so it's easy to wipe the
> slate clean and get back to a known state.
> 
> 
> > configuring in gdbserver
> > running /bin/sh /home/mo/project/insight-19990809/gdb/../configure
>  [...]
> > *** Cannot configure here in
> > "/home/mo/project/insight-19990809/build52/gdb/gdbserver" when
> > "../../../gdb/gdbserver" is currently configured.

Oh, now I see. The real problem is that the "make distclean" rule
has a bug that fails to remove an old configure. I will take a look
at the makefiles and see if I can figure out where it forgets to
remove the old file (it must be in gdb/gdbserver somewhere).

thanks
mo

> The problem is that you ran a configure in your source tree at some
> time in the past, and some remnants of this configure were left behind
> in the insight-19990809/gdb/gdbserver directory.
> 
> You've got a few options.  You could just remove the source directory
> altogether and untar the snapshot tarball again--that's the easiest.
> You could cd into the insight-19990809/gdb/gdbserver directory and, if
> there is a Makefile present, try doing a 'make distclean'.  If there
> isn't a Makefile, you could try removing the config.status file in
> that directory.
> 
> Hope that helps,
> 
> Jason
> 

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

* Re: configure problem with insight.
  1999-08-11 12:49   ` Moses DeJong
@ 1999-08-11 14:10     ` Moses DeJong
  1999-08-11 16:21       ` Moses DeJong
  0 siblings, 1 reply; 6+ messages in thread
From: Moses DeJong @ 1999-08-11 14:10 UTC (permalink / raw)
  To: insight

Here is a quick little patch that fixes the "make distclean" problem
with insight.


1999-08-11  Mo DeJong <dejong@cs.umn.edu>

        * gdb/Makefile.in
	  gdb/tui/Makefile.in : patch to fix "make distclean" rule.


diff -r -u insight-19990809/gdb/Makefile.in
../insight-19990809/gdb/Makefile.in
--- insight-19990809/gdb/Makefile.in    Mon Aug  9 21:45:50 1999
+++ ../insight-19990809/gdb/Makefile.in Wed Aug 11 15:31:41 1999
@@ -573,6 +573,8 @@
 NTSSTART = kdb-start.o

 SUBDIRS = doc \
+       gdbserver \
+       tui \
        testsuite \
        nlm

diff -r -u insight-19990809/gdb/tui/Makefile.in
../insight-19990809/gdb/tui/Makefile.in
--- insight-19990809/gdb/tui/Makefile.in        Thu Dec 31 17:46:27 1998
+++ ../insight-19990809/gdb/tui/Makefile.in     Wed Aug 11 15:31:39 1999
@@ -166,3 +166,8 @@

 clean:
        rm -f *.o *.a
+
+distclean: clean
+       rm -f nm.h tm.h xm.h config.status config.h stamp-h .gdbinit
+       rm -f config.log config.cache
+       rm -f Makefile




Mo DeJong
dejong@cs.umn.edu

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

* Re: configure problem with insight.
  1999-08-11 14:10     ` Moses DeJong
@ 1999-08-11 16:21       ` Moses DeJong
  0 siblings, 0 replies; 6+ messages in thread
From: Moses DeJong @ 1999-08-11 16:21 UTC (permalink / raw)
  To: insight

Ok, we all know it is bad to reply to your own post but here goes.

After applying the patch I just sent to the list to my insight
source tree, I find that the insight no longer compiles as
it now tries to build in gdb/gdbserver which does not
seem to work yet. I tried to make some progress getting
gdbserver to compile but I ran into an issue that I need some
help on.



When building I got this error.


make[3]: Entering directory `/usr/local/project/insight-19990809/build52/gdb/gdbserver'
gcc -c -g -O2 -W -Wall    -I../../bfd -I../../../gdb/gdbserver/../../bfd -I. -I../../../gdb/gdbserver -I../../../gdb/gdbserver/.. -I../../../gdb/gdbserver/../config -I../../../gdb/gdbserver/../../include ../../../gdb/gdbserver/utils.c
../../../gdb/gdbserver/utils.c: In function `perror_with_name':
../../../gdb/gdbserver/utils.c:36: conflicting types for `sys_errlist'
/usr/include/stdio.h:221: previous declaration of `sys_errlist'
make[3]: *** [utils.o] Error 1
make[3]: Leaving directory `/usr/local/project/insight-19990809/build52/gdb/gdbserver'
make[2]: *** [subdir_do] Error 1
make[2]: Leaving directory `/usr/local/project/insight-19990809/build52/gdb'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/project/insight-19990809/build52/gdb'
make: *** [all-gdb] Error 2




In file : gdb/gdbserver/utils.c

void
perror_with_name (string)
     char *string;
{
  extern int sys_nerr;
  extern char *sys_errlist[];    (! this is the line with the error!)
  extern int errno;



In file : /usr/include/stdio.h

#ifdef  __USE_BSD
extern int sys_nerr;
extern const char *const sys_errlist[];       (! This is line 221!)
#endif
#ifdef  __USE_GNU
extern int _sys_nerr;
extern const char *const _sys_errlist[];
#endif



Here is a patch that fixes this problem.


diff -u insight-19990809/gdb/gdbserver/utils.c ../insight-19990809/gdb/gdbserver/utils.c
--- insight-19990809/gdb/gdbserver/utils.c      Wed Jul  7 23:52:45 1999
+++ ../insight-19990809/gdb/gdbserver/utils.c   Wed Aug 11 17:17:27 1999
@@ -33,7 +33,7 @@
      char *string;
 {
   extern int sys_nerr;
-  extern char *sys_errlist[];
+  extern const char *const sys_errlist[];
   extern int errno;
   char *err;
   char *combined;






The compiler used in the gdb/gdbserver Makefile is cc not gcc.
This patch fixes that problem.



diff -u gdb/gdbserver/Makefile.in ../../insight-19990809/gdb/gdbserver/Makefile.in
--- gdb/gdbserver/Makefile.in   Fri Jun 25 00:15:55 1999
+++ ../../insight-19990809/gdb/gdbserver/Makefile.in    Wed Aug 11 17:29:35 1999
@@ -57,7 +57,7 @@
 # distribution will fix your include files up.
 #CC=cc
 #CC=gcc -traditional
-GCC=gcc
+CC=gcc
 
 # Directory containing source files.  Don't clean up the spacing,
 # this exact string is matched for by the "configure" script.









I then got a couple of errors in gdb/gdbserver/low-linux.c

...

../../../gdb/gdbserver/low-linux.c: At top level:
../../../gdb/gdbserver/low-linux.c:175: `EAX' undeclared here (not in a function)
../../../gdb/gdbserver/low-linux.c:175: initializer element for `regmap[0]' is not constant
../../../gdb/gdbserver/low-linux.c:175: `ECX' undeclared here (not in a function)
../../../gdb/gdbserver/low-linux.c:175: initializer element for `regmap[1]' is not constant
../../../gdb/gdbserver/low-linux.c:175: `EDX' undeclared here (not in a function)
../../../gdb/gdbserver/low-linux.c:175: initializer element for `regmap[2]' is not constant


../../../gdb/gdbserver/low-linux.c:275: `PTRACE_PEEKUSR' undeclared (first use this function)
../../../gdb/gdbserver/low-linux.c:275: (Each undeclared identifier is reported only once
../../../gdb/gdbserver/low-linux.c:275: for each function it appears in.)
../../../gdb/gdbserver/low-linux.c: In function `store_inferior_registers':
../../../gdb/gdbserver/low-linux.c:344: `PTRACE_POKEUSR' undeclared (first use this function)





This patch fixes these two errors. It changes the include of ptrace.h
and includes sys/reg.h when using glibc 2.0 and 2.1.



diff -u gdb/gdbserver/low-linux.c  ../../insight-19990809/gdb/gdbserver/low-linux.c
--- gdb/gdbserver/low-linux.c   Wed Jul  7 23:52:44 1999
+++ ../../insight-19990809/gdb/gdbserver/low-linux.c    Wed Aug 11 17:48:30 1999
@@ -45,9 +45,13 @@
 char buf2[MAX_REGISTER_RAW_SIZE];
 /***************End MY defs*********************/
 
-#include <sys/ptrace.h>
+#if defined (__linux__)
+  #include <linux/ptrace.h>
+#else
+  #include <sys/ptrace.h>
+#endif
 
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 0)
 #include <sys/reg.h>
 #endif
 




But now I have run into an error that I am not sure how to fix.

% make
gcc -c -g -O2 -W -Wall    -I../../bfd -I../../../gdb/gdbserver/../../bfd -I. -I../../../gdb/gdbserver -I../../../gdb/gdbserver/.. -I../../../gdb/gdbserver/../config -I../../../gdb/gdbserver/../../include ../../../gdb/gdbserver/low-linux.c
../../../gdb/gdbserver/low-linux.c:39: conflicting types for `registers'
../../../gdb/gdbserver/../inferior.h:114: previous declaration of `registers'




From gdb/inferior.h


/* Character array containing an image of the inferior programs'
   registers. */

extern char *registers;



From gdb/gdbserver/low-linux.c


/***************Begin MY defs*********************/
int quit_flag = 0;
char registers[REGISTER_BYTES];




Does anyone know if these are intended to be the same memory.
Should the char registers[REGISTER_BYTES] be declared extern?


Any ideas?

Mo DeJong
dejong@cs.umn.edu

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

end of thread, other threads:[~1999-08-11 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-11 11:34 configure problem with insight Moses DeJong
1999-08-11 11:51 ` James Ingham
1999-08-11 11:59 ` Jason Molenda
1999-08-11 12:49   ` Moses DeJong
1999-08-11 14:10     ` Moses DeJong
1999-08-11 16:21       ` Moses DeJong

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