public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RE: Problems linking PSIM programs
@ 2006-08-16  1:10 Wealand, Barry
  0 siblings, 0 replies; 6+ messages in thread
From: Wealand, Barry @ 2006-08-16  1:10 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Joel Sherrill, H. J. Lu, binutils


Nick -

I retried the build this morning, and this time it seems to be working.
The difference, as far as I can tell, was my search path setting.  For
the build that failed, I had pared my search path down to the bare
minimum - perhaps a little too bare.  This morning, I merely removed any
links to other installed GNU cross compilers.  Then I cleared the build
directory, reconfigured, and remaked.  The build / install just
completed successfully.

Concerning the original problem with gcc-2.95.3, and the failed link for
the PowerPC simulator, I get the impression that this compiler just has
the link command scripted incorrectly.  If I "re-script" the link
command (using an appropriate powerpc-eabi-ld command in a Makefile),
the link completes correctly, and I can run the executable using
powerpc-eabi-run just fine.  I'll be happy to share further details with
anyone who cares to know, but I imagine this might not be of much
general interest (given the old versions involved).

Thanks again to all for your assistance.

Barry Wealand


-----Original Message-----
From: Nick Clifton [mailto:nickc@redhat.com] 
Sent: Tuesday, August 15, 2006 4:49 AM
To: Wealand, Barry
Cc: Joel Sherrill; H. J. Lu; binutils@sourceware.org
Subject: Re: Problems linking PSIM programs


Hi Barry,

> For sake of completeness, I've attempted to build binutils 2.17 as 
> suggested, also for a Linux host and powerpc-eabi target.  This does 
> not build (using native gcc 3.3.4 on the Linux machine).

Well this definitely should work.  I have a built powerpc-eabi toolchain

on my machine using the 2.17 sources and it completed OK.

> A whole slew of
> errors are reported when building bfd, compiling module elf32-ppc.c. 
> The errors seem to occur in an include file, elf32-target.h, the first

> from line 468:
> 
> elf32-target.h:468: error: `false' undeclared (not in a function)

This presumably indicates that the definition of 
"elf_backend_can_make_lsda_relative_eh_frame" is "false" instead of 
"bfd_false".

> Have I missed any new required steps for configuring and building 
> binutils-2.17?  (2.12 configures and builds on this machine just 
> fine.)

Yes.  But it is hard to say exactly what has gone wrong.  It looks like 
you are getting hold of some old header of configuration files 
somewhere.  (The "false" type was removed from the binutils sources a 
while ago now).

Did you build in an entirely clean environment ?  (If not, please try 
this).  Otherwise, please could you show us the other error messages you

are getting, and also the command lines you are using to configure and 
build the binutils ?

Cheers
   Nick

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

* Re: Problems linking PSIM programs
  2006-08-12 23:03 Wealand, Barry
@ 2006-08-15 12:15 ` Nick Clifton
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Clifton @ 2006-08-15 12:15 UTC (permalink / raw)
  To: Wealand, Barry; +Cc: Joel Sherrill, H. J. Lu, binutils

Hi Barry,

> For sake of completeness, I've attempted to build binutils 2.17 as
> suggested, also for a Linux host and powerpc-eabi target.  This does not
> build (using native gcc 3.3.4 on the Linux machine).

Well this definitely should work.  I have a built powerpc-eabi toolchain 
on my machine using the 2.17 sources and it completed OK.

> A whole slew of
> errors are reported when building bfd, compiling module elf32-ppc.c.
> The errors seem to occur in an include file, elf32-target.h, the first
> from line 468:
> 
> elf32-target.h:468: error: `false' undeclared (not in a function)

This presumably indicates that the definition of 
"elf_backend_can_make_lsda_relative_eh_frame" is "false" instead of 
"bfd_false".

> Have I missed any new required steps for configuring and building
> binutils-2.17?  (2.12 configures and builds on this machine just fine.)

Yes.  But it is hard to say exactly what has gone wrong.  It looks like 
you are getting hold of some old header of configuration files 
somewhere.  (The "false" type was removed from the binutils sources a 
while ago now).

Did you build in an entirely clean environment ?  (If not, please try 
this).  Otherwise, please could you show us the other error messages you 
are getting, and also the command lines you are using to configure and 
build the binutils ?

Cheers
   Nick

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

* RE: Problems linking PSIM programs
@ 2006-08-12 23:03 Wealand, Barry
  2006-08-15 12:15 ` Nick Clifton
  0 siblings, 1 reply; 6+ messages in thread
From: Wealand, Barry @ 2006-08-12 23:03 UTC (permalink / raw)
  To: Joel Sherrill, H. J. Lu; +Cc: binutils


Thanks, folks.  I've had better luck with later versions of the compiler
too, as I mentioned (gcc 3.4.4 with binutils 2.14 works fine).  There
just seems to be something about gcc 2.95.3 that somehow leads to this.
I've even moved everything to a Linux host platform - this produces the
same results.

For sake of completeness, I've attempted to build binutils 2.17 as
suggested, also for a Linux host and powerpc-eabi target.  This does not
build (using native gcc 3.3.4 on the Linux machine).  A whole slew of
errors are reported when building bfd, compiling module elf32-ppc.c.
The errors seem to occur in an include file, elf32-target.h, the first
from line 468:

elf32-target.h:468: error: `false' undeclared (not in a function)

Have I missed any new required steps for configuring and building
binutils-2.17?  (2.12 configures and builds on this machine just fine.)

I failed to mention that the interest in the older compiler comes from a
desire for (as near as possible) code generation that's similar to a
WindRiver GNU compiler we're using (they call it 2.96, apparently based
on 2.95.3).  That's where all the older version numbers come from.

Thanks again!


-----Original Message-----
From: Joel Sherrill [mailto:joel.sherrill@oarcorp.com] 
Sent: Friday, August 11, 2006 12:41 PM
To: H. J. Lu
Cc: Wealand, Barry; binutils@sourceware.org
Subject: Re: Problems linking PSIM programs


H. J. Lu wrote:
> On Fri, Aug 11, 2006 at 11:44:24AM -0700, Wealand, Barry wrote:
>   
>> Hello -
>>
>> I'm trying to use gcc 2.95.3 with binutils 2.14 and newlib 1.9.0 to 
>> build a simple hello.c for use with the PowerPC simulator.  Compiler,

>> binutils, and newlib were all configured with --target=powerpc-eabi 
>> for a sparc-sun-solaris2.8 host.  I attempt to compile hello.c with:
>>
>> powerpc-eabi-gcc -msim -o hello hello.c
>>
>> The response is:
>>
>> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-
>> eab
>> i/bin/ld: hello: Not enough room for program headers (allocated 2,
need
>> 3)
>>
/u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
>> i/bin/ld: final link failed: Bad value
>>
>> In the bug-binutils archive, I notice that this problem has appeared 
>> in a number of different situations.  One recommended solution has 
>> been to use later versions of binutils.  I have tried 3 separate 
>> versions: 2.11.2, 2.12, and 2.14.  All produce the same result.
>>
>>     
>
> You tried 3 very OLD binutils. The current one is 2.17.
>   

psim is one of the platforms we regularly test RTEMS on.  But we use
much more recent tools than that.  gcc 2.95.3 is quote old also.

gcc 4.1.1 + binutils 2.17 works great.

--joel sherrill
>
> H.J.
>   

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

* Re: Problems linking PSIM programs
  2006-08-11 19:39 ` H. J. Lu
@ 2006-08-12  1:28   ` Joel Sherrill
  0 siblings, 0 replies; 6+ messages in thread
From: Joel Sherrill @ 2006-08-12  1:28 UTC (permalink / raw)
  To: H. J. Lu; +Cc: Wealand, Barry, binutils

H. J. Lu wrote:
> On Fri, Aug 11, 2006 at 11:44:24AM -0700, Wealand, Barry wrote:
>   
>> Hello -
>>
>> I'm trying to use gcc 2.95.3 with binutils 2.14 and newlib 1.9.0 to
>> build a simple hello.c for use with the PowerPC simulator.  Compiler,
>> binutils, and newlib were all configured with --target=powerpc-eabi for
>> a sparc-sun-solaris2.8 host.  I attempt to compile hello.c with:
>>
>> powerpc-eabi-gcc -msim -o hello hello.c
>>
>> The response is:
>>
>> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
>> i/bin/ld: hello: Not enough room for program headers (allocated 2, need
>> 3)
>> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
>> i/bin/ld: final link failed: Bad value
>>
>> In the bug-binutils archive, I notice that this problem has appeared in
>> a number of different situations.  One recommended solution has been to
>> use later versions of binutils.  I have tried 3 separate versions:
>> 2.11.2, 2.12, and 2.14.  All produce the same result.
>>
>>     
>
> You tried 3 very OLD binutils. The current one is 2.17.
>   

psim is one of the platforms we regularly test RTEMS on.  But we use
much more recent tools than that.  gcc 2.95.3 is quote old also.

gcc 4.1.1 + binutils 2.17 works great.

--joel sherrill
>
> H.J.
>   

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

* Re: Problems linking PSIM programs
  2006-08-11 18:51 Wealand, Barry
@ 2006-08-11 19:39 ` H. J. Lu
  2006-08-12  1:28   ` Joel Sherrill
  0 siblings, 1 reply; 6+ messages in thread
From: H. J. Lu @ 2006-08-11 19:39 UTC (permalink / raw)
  To: Wealand, Barry; +Cc: binutils

On Fri, Aug 11, 2006 at 11:44:24AM -0700, Wealand, Barry wrote:
> 
> Hello -
> 
> I'm trying to use gcc 2.95.3 with binutils 2.14 and newlib 1.9.0 to
> build a simple hello.c for use with the PowerPC simulator.  Compiler,
> binutils, and newlib were all configured with --target=powerpc-eabi for
> a sparc-sun-solaris2.8 host.  I attempt to compile hello.c with:
> 
> powerpc-eabi-gcc -msim -o hello hello.c
> 
> The response is:
> 
> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
> i/bin/ld: hello: Not enough room for program headers (allocated 2, need
> 3)
> /u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
> i/bin/ld: final link failed: Bad value
> 
> In the bug-binutils archive, I notice that this problem has appeared in
> a number of different situations.  One recommended solution has been to
> use later versions of binutils.  I have tried 3 separate versions:
> 2.11.2, 2.12, and 2.14.  All produce the same result.
> 

You tried 3 very OLD binutils. The current one is 2.17.


H.J.

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

* Problems linking PSIM programs
@ 2006-08-11 18:51 Wealand, Barry
  2006-08-11 19:39 ` H. J. Lu
  0 siblings, 1 reply; 6+ messages in thread
From: Wealand, Barry @ 2006-08-11 18:51 UTC (permalink / raw)
  To: binutils


Hello -

I'm trying to use gcc 2.95.3 with binutils 2.14 and newlib 1.9.0 to
build a simple hello.c for use with the PowerPC simulator.  Compiler,
binutils, and newlib were all configured with --target=powerpc-eabi for
a sparc-sun-solaris2.8 host.  I attempt to compile hello.c with:

powerpc-eabi-gcc -msim -o hello hello.c

The response is:

/u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
i/bin/ld: hello: Not enough room for program headers (allocated 2, need
3)
/u00/users/bwealand/GCC/tools/v2.95.3/H-sparc-sun-solaris2.8/powerpc-eab
i/bin/ld: final link failed: Bad value

In the bug-binutils archive, I notice that this problem has appeared in
a number of different situations.  One recommended solution has been to
use later versions of binutils.  I have tried 3 separate versions:
2.11.2, 2.12, and 2.14.  All produce the same result.

From previous experience, using gcc 3.4.4 with binutils 2.14 and newlib
1.14.0, I can build hello.c as described above just fine.

I'd appreciate some guidance.  What else should I try / look for?

Thanks in advance!

Barry Wealand
Lockheed Martin
barry.wealand@lmco.com

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

end of thread, other threads:[~2006-08-15 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16  1:10 Problems linking PSIM programs Wealand, Barry
  -- strict thread matches above, loose matches on Subject: below --
2006-08-12 23:03 Wealand, Barry
2006-08-15 12:15 ` Nick Clifton
2006-08-11 18:51 Wealand, Barry
2006-08-11 19:39 ` H. J. Lu
2006-08-12  1:28   ` Joel Sherrill

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