* Compilation Problem
@ 2006-06-05 2:37 Jason Morris
2006-06-05 6:00 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Jason Morris @ 2006-06-05 2:37 UTC (permalink / raw)
To: binutils
Hi All,
I've tried to compile and install both released and
snapshot versions of binutils on MinGW and OpenSUSE
10, but I keep getting the following error(s):
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H
-I. -I../../binutils-060604/bfd -I. -DTRAD_CORE -I.
-I../../binutils-060604/bfd
-I../../binutils-060604/bfd/../include -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g
-O2 -c -o elf.lo ../../binutils-060604/bfd/elf.c
gcc -DHAVE_CONFIG_H -I. -I../../binutils-060604/bfd
-I. -DTRAD_CORE -I. -I../../binutils-060604/bfd
-I../../binutils-060604/bfd/../include -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g
-O2 -c ../../binutils-060604/bfd/elf.c -o elf.o
../../binutils-060604/bfd/elf.c:7938: error: syntax
error before 'pid_t'
cc1: warnings being treated as errors
../../binutils-060604/bfd/elf.c:7939: warning:
function declaration isn't a prototype
../../binutils-060604/bfd/elf.c: In function
'elfcore_grok_nto_status':
../../binutils-060604/bfd/elf.c:7940: error: 'note'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c:7940: error: (Each
undeclared identifier is reported only once
../../binutils-060604/bfd/elf.c:7940: error: for each
function it appears in.)
../../binutils-060604/bfd/elf.c:7948: error: 'abfd'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c:7951: error: 'tid'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c: At top level:
../../binutils-060604/bfd/elf.c:7991: error: syntax
error before 'pid_t'
../../binutils-060604/bfd/elf.c:7993: warning:
function declaration isn't a prototype
../../binutils-060604/bfd/elf.c: In function
'elfcore_grok_nto_regs':
../../binutils-060604/bfd/elf.c:7999: error: 'base'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c:7999: error: 'tid'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c:8001: error: 'abfd'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c:8010: error: 'note'
undeclared (first use in this function)
../../binutils-060604/bfd/elf.c: In function
'elfcore_grok_nto_note':
../../binutils-060604/bfd/elf.c:8032: error: syntax
error before 'tid'
../../binutils-060604/bfd/elf.c:8039: error: 'tid'
undeclared (first use in this function)
make[4]: *** [elf.lo] Error 1
make[4]: Leaving directory
`/mnt/LFS/sources/binutils-build/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/mnt/LFS/sources/binutils-build/bfd'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/mnt/LFS/sources/binutils-build/bfd'
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory
`/mnt/LFS/sources/binutils-build'
make: *** [all] Error 2
Any help is appreciated.
Jason
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Compilation Problem
2006-06-05 2:37 Compilation Problem Jason Morris
@ 2006-06-05 6:00 ` Alan Modra
2006-06-06 3:04 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2006-06-05 6:00 UTC (permalink / raw)
To: Jason Morris; +Cc: binutils
On Sun, Jun 04, 2006 at 07:42:03AM -0700, Jason Morris wrote:
> ../../binutils-060604/bfd/elf.c:7938: error: syntax
> error before 'pid_t'
Presumably this is because you are missing a "pid_t" type. Please try
the following patch.
* elf.c (elfcore_grok_nto_status): Use long instead of pid_t.
(elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.341
diff -u -p -r1.341 elf.c
--- bfd/elf.c 1 Jun 2006 03:45:58 -0000 1.341
+++ bfd/elf.c 5 Jun 2006 03:07:07 -0000
@@ -7935,7 +7931,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf
}
static bfd_boolean
-elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
+elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid)
{
void *ddata = note->descdata;
char buf[100];
@@ -7967,7 +7963,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_
elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
- sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
+ sprintf (buf, ".qnx_core_status/%ld", *tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -7988,7 +7984,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_
static bfd_boolean
elfcore_grok_nto_regs (bfd *abfd,
Elf_Internal_Note *note,
- pid_t tid,
+ long tid,
char *base)
{
char buf[100];
@@ -7996,7 +7992,7 @@ elfcore_grok_nto_regs (bfd *abfd,
asection *sect;
/* Make a "(base)/%d" section. */
- sprintf (buf, "%s/%ld", base, (long) tid);
+ sprintf (buf, "%s/%ld", base, tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -8029,7 +8025,7 @@ elfcore_grok_nto_note (bfd *abfd, Elf_In
/* Every GREG section has a STATUS section before it. Store the
tid from the previous call to pass down to the next gregs
function. */
- static pid_t tid = 1;
+ static long tid = 1;
switch (note->type)
{
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Compilation Problem
2006-06-05 6:00 ` Alan Modra
@ 2006-06-06 3:04 ` Alan Modra
0 siblings, 0 replies; 3+ messages in thread
From: Alan Modra @ 2006-06-06 3:04 UTC (permalink / raw)
To: Jason Morris, binutils
On Mon, Jun 05, 2006 at 12:59:24PM +0930, Alan Modra wrote:
> * elf.c (elfcore_grok_nto_status): Use long instead of pid_t.
> (elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
I think I may as well commit this, even though I haven't heard back from
Jason.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-06 2:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-05 2:37 Compilation Problem Jason Morris
2006-06-05 6:00 ` Alan Modra
2006-06-06 3:04 ` Alan Modra
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).