public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Luke <hazelnusse@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: binutils@sourceware.org
Subject: Re: TARGET undefined in bucomm.c
Date: Wed, 08 Jun 2011 00:41:00 -0000	[thread overview]
Message-ID: <BANLkTik1HKdr+mLV5+XQ3g892vjgY=x3pw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTim_ydhaewK4Ap3z0_ssN7JzrLgK9w@mail.gmail.com>

I tried three approaches, all which led to the same error:

First, a build folder outside of the source tree:
$ tar xvf binutils-2.21.tar.bz2
$ mkdir build
$ cd build
$ ../binutils-2.21/configure
$ make

and I get:
make[4]: Entering directory
`/home/luke/repos/summon-arm-toolchain/build/binutils'
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.21/binutils  -I.
-I../../binutils-2.21/binutils -I../bfd
-I../../binutils-2.21/binutils/../bfd
-I../../binutils-2.21/binutils/../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT bucomm.o
-MD -MP -MF .deps/bucomm.Tpo -c -o bucomm.o
../../binutils-2.21/binutils/bucomm.c
../../binutils-2.21/binutils/bucomm.c: In function ‘set_default_bfd_target’:
../../binutils-2.21/binutils/bucomm.c:160:24: error: ‘TARGET’
undeclared (first use in this function)
../../binutils-2.21/binutils/bucomm.c:160:24: note: each undeclared
identifier is reported only once for each function it appears in
make[4]: *** [bucomm.o] Error 1


Second, I tried a build in the source tree:
$ tar xvf binutils-2.21.tar.bz2
$ cd binutils-2.21
$ ./configure
$ make

and I get:
make[4]: Entering directory
`/home/luke/repos/summon-arm-toolchain/binutils-2.21/binutils'
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT size.o
-MD -MP -MF .deps/size.Tpo -c -o size.o size.c
mv -f .deps/size.Tpo .deps/size.Po
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Wshadow -g -O2 -MT bucomm.o
-MD -MP -MF .deps/bucomm.Tpo -c -o bucomm.o bucomm.c
bucomm.c: In function ‘set_default_bfd_target’:
bucomm.c:160:24: error: ‘TARGET’ undeclared (first use in this function)
bucomm.c:160:24: note: each undeclared identifier is reported only
once for each function it appears in
make[4]: *** [bucomm.o] Error 1

Finally, if I make a build folder inside of the source tree, I get the
same exact result, which is what I reported previously.

So this doesn't seem to be the source of the problem.


~Luke


On Tue, Jun 7, 2011 at 11:58 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Jun 7, 2011 at 11:26 AM, Luke <hazelnusse@gmail.com> wrote:
>> Here are the first lines of bucomm.i:
>>
>> # 1 "../../binutils/bucomm.c"
>> # 1 "/home/luke/repos/summon-arm-toolchain/binutils-2.21/build/binutils//"
>> # 1 "<built-in>"
>> # 1 "<command-line>"
>> # 1 "../../binutils/bucomm.c"
>> # 26 "../../binutils/bucomm.c"
>> # 1 "../../binutils/sysdep.h" 1
>> # 25 "../../binutils/sysdep.h"
>> # 1 "../../binutils/../include/alloca-conf.h" 1
>> # 1 "../bfd/config.h" 1
>> # 2 "../../binutils/../include/alloca-conf.h" 2
>>
>>
>> # 1 "/usr/include/alloca.h" 1 3 4
>> # 22 "/usr/include/alloca.h" 3 4
>> # 1 "/usr/include/features.h" 1 3 4
>>
>> So, for some reason, it is finding config.h in the bfd folder.
>>
>> What should I do to fix this?
>>
>
> Don't put build directory inside binutils source tree.
>
>
> H.J.
>



-- 
"Those who would give up essential liberty to purchase a little
temporary safety deserve neither liberty nor safety."

-- Benjamin Franklin, Historical Review of Pennsylvania, 1759

  reply	other threads:[~2011-06-08  0:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 17:46 Luke
2011-06-06 17:58 ` H.J. Lu
2011-06-06 18:19   ` Luke
2011-06-06 19:32     ` Luke
2011-06-06 20:04       ` Ian Lance Taylor
2011-06-07  3:14         ` Luke
2011-06-07 12:11           ` Ian Lance Taylor
2011-06-07 12:24             ` Andreas Schwab
2011-06-07 18:27             ` Luke
2011-06-07 18:58               ` H.J. Lu
2011-06-08  0:41                 ` Luke [this message]
2011-06-08  8:03                   ` Andreas Schwab
2011-06-08  8:28                     ` Luke
2011-06-08  9:20                       ` Alan Modra
2011-06-08 10:08                         ` Luke
2011-06-08 11:07                           ` Andreas Schwab
2011-06-08 16:28                             ` Luke
2011-06-08 13:26                           ` Ian Lance Taylor
2011-06-08 16:55                             ` Luke
2011-06-08 18:02                               ` Ian Lance Taylor
2011-06-08 21:59                                 ` Luke
2011-06-08  8:49                     ` Luke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTik1HKdr+mLV5+XQ3g892vjgY=x3pw@mail.gmail.com' \
    --to=hazelnusse@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).