public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Can't get binutils to build on Cygwin
@ 2006-07-30 20:45 malanda
  2006-07-30 20:54 ` Eric Christopher
  0 siblings, 1 reply; 15+ messages in thread
From: malanda @ 2006-07-30 20:45 UTC (permalink / raw)
  To: binutils

Hi,

I'm new here, so be nice  :o)

I need a sparc-elf C compiler to run under Cygwin.  No problem I thought,
just download gcc and binutils, then run configure & make.  10 minute job!

Well it wasn't that easy.  Make doesn't want to do anything...

$ make
make[1]: Entering directory `/c/binutils/binutils-2.17-sparc-elf'
make[1]: Nothing to be done for `all-host'.
make[1]: Nothing to be done for `all-target'.
make[1]: Leaving directory `/c/binutils/binutils-2.17-sparc-elf'
$

I can't say I fully understand the Makefile, but it seems to set up a
variable called SUBDIRS which lists all the tools, but then not use it.

What am I doing wrong?  I'm sure there must be a simple solution, but it's
got me baffled.  I also get the same problem if I try to build native
Cygwin binutils

Thanks!

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


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

* Re: Can't get binutils to build on Cygwin
  2006-07-30 20:45 Can't get binutils to build on Cygwin malanda
@ 2006-07-30 20:54 ` Eric Christopher
  0 siblings, 0 replies; 15+ messages in thread
From: Eric Christopher @ 2006-07-30 20:54 UTC (permalink / raw)
  To: malanda; +Cc: binutils

malanda@freeuk.com wrote:
> Hi,
> 
> I'm new here, so be nice  :o)
> 
> I need a sparc-elf C compiler to run under Cygwin.  No problem I thought,
> just download gcc and binutils, then run configure & make.  10 minute job!
> 

Need more of a log on how you configured...

-eric

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

* Re: Can't get binutils to build on Cygwin
@ 2006-08-03 12:40 malanda
  0 siblings, 0 replies; 15+ messages in thread
From: malanda @ 2006-08-03 12:40 UTC (permalink / raw)
  To: binutils; +Cc: bonzini

Dave Korn wrote:
>
>  [ ...snip... ]
>   Isn't the underlying problem that the input /should not have/ CR/LF line
> ends at all in the first place?
>  Given that binutils source files don't come with CRLF line endings, the
real
> solution could well be:-
>
>   "Use cygwin tar to unpack the binutils tarball, because using winzip
mangles
> the line ends."
>
>   Malanda?  Did you use any kind of GUI tool to unpack the tarball?  Or
did
> you unpack it on a textmode mountpoint?

Yes, I'm afraid winzip did the damage.  Using Cygwin tar fixes it.  Lesson
learned!

Thanks for your help.

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


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

* RE: Can't get binutils to build on Cygwin
  2006-08-02 10:29 ` Nick Clifton
  2006-08-02 11:21   ` Andreas Schwab
@ 2006-08-02 19:21   ` Dave Korn
  1 sibling, 0 replies; 15+ messages in thread
From: Dave Korn @ 2006-08-02 19:21 UTC (permalink / raw)
  To: 'Nick Clifton', malanda; +Cc: binutils

On 02 August 2006 11:29, Nick Clifton wrote:

>> Thanks for the help and suggestions so far.  I've tracked down the problem
>> to being an incompatibility between 'configure' in binutils 2.17, and sed
>> 4.1.5, which Cygwin is currently distributing.  If I regress to sed 4.1.4,
>> it works ok.
> 
>> The question is: sed bug or configure bug?
> 
> Neither, it is a filesystem problem.  I asked a Cygwin expert with
> familiarity with SED about the problem and she said:
> 
>> This is a line-ending problem.  The older SED binary does automatic
>> conversion from CR/LF to LF lineendings, thus breaking binary input.

 [ ...snip... ]

>> The newer SED does not do this automatic conversion and treats the
>> input as binary input.  CR/LF lineendings on input are thus treated
>> as lines with LF lineendings and having a CR as last character on the
>> line, same as on other POSIX systems.  The problem here is apparently
>> that the input is in DOS CR/LF format.  It should be converted to LF
>> lineendings before using it.

  Isn't the underlying problem that the input /should not have/ CR/LF line
ends at all in the first place?

> So either you can stick with the older version of SED, (after all if it
> works for you then why change ?), or else you can use the newer version
> of SED and the "tr" command or your favorite editor to fix up the input
> files that are causing the problems and replace CR/LF with LF.

  Given that binutils source files don't come with CRLF line endings, the real
solution could well be:-

  "Use cygwin tar to unpack the binutils tarball, because using winzip mangles
the line ends."

  Malanda?  Did you use any kind of GUI tool to unpack the tarball?  Or did
you unpack it on a textmode mountpoint?

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

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

* Re: Can't get binutils to build on Cygwin
  2006-08-02 13:38     ` Corinna Vinschen
@ 2006-08-02 13:57       ` Andreas Schwab
  0 siblings, 0 replies; 15+ messages in thread
From: Andreas Schwab @ 2006-08-02 13:57 UTC (permalink / raw)
  To: binutils

Corinna Vinschen <vinschen@redhat.com> writes:

> That might be the case, but it doesn't change the fact that users
> out there are using sed to massage binary files.  Usually this just
> isn't a problem since POSIX systems don't make a difference between
> binary and text files.

It's a problem even on POSIX hosts, since many implementations of sed have
limits on the line length.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Can't get binutils to build on Cygwin
  2006-08-02 11:21   ` Andreas Schwab
@ 2006-08-02 13:38     ` Corinna Vinschen
  2006-08-02 13:57       ` Andreas Schwab
  0 siblings, 1 reply; 15+ messages in thread
From: Corinna Vinschen @ 2006-08-02 13:38 UTC (permalink / raw)
  To: binutils

Andreas Schwab writes:
> Nick Clifton <nickc@redhat.com> writes:
> 
>> [Note - SED *is* used for editing binary files, hence it is necessary that
>> it does not break binary input].
> 
> Trying to use sed on a binary file is a mistake.  It is a pure text tool,
> being line oriented.
> 
> Andreas.

That might be the case, but it doesn't change the fact that users
out there are using sed to massage binary files.  Usually this just
isn't a problem since POSIX systems don't make a difference between
binary and text files.  Not so on DOS/Windows systems.

There's also the problem that CR can be the first character of a DOS
lineending, or it can *deliberately* be the last character on an input
text line in a file with Unix LF lineendings.  Sed is not capable of
differing these two cases.

I took the opportunity to create a patch to sed, which reverts to
treat CRLF as lineending again, and to add a -b/--binary option so
that the above mentioned cases can be handled at least with an option.

See http://cygwin.com/ml/cygwin-announce/2006-08/msg00001.html


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

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

* Re: Can't get binutils to build on Cygwin
  2006-08-02 10:29 ` Nick Clifton
@ 2006-08-02 11:21   ` Andreas Schwab
  2006-08-02 13:38     ` Corinna Vinschen
  2006-08-02 19:21   ` Dave Korn
  1 sibling, 1 reply; 15+ messages in thread
From: Andreas Schwab @ 2006-08-02 11:21 UTC (permalink / raw)
  To: Nick Clifton; +Cc: malanda, binutils

Nick Clifton <nickc@redhat.com> writes:

> [Note - SED *is* used for editing binary files, hence it is necessary that
> it does not break binary input].

Trying to use sed on a binary file is a mistake.  It is a pure text tool,
being line oriented.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Can't get binutils to build on Cygwin
  2006-07-31 21:44 malanda
  2006-07-31 22:23 ` Andreas Schwab
  2006-07-31 22:53 ` Pedro Alves
@ 2006-08-02 10:29 ` Nick Clifton
  2006-08-02 11:21   ` Andreas Schwab
  2006-08-02 19:21   ` Dave Korn
  2 siblings, 2 replies; 15+ messages in thread
From: Nick Clifton @ 2006-08-02 10:29 UTC (permalink / raw)
  To: malanda; +Cc: binutils

Hi,

> Thanks for the help and suggestions so far.  I've tracked down the problem
> to being an incompatibility between 'configure' in binutils 2.17, and sed
> 4.1.5, which Cygwin is currently distributing.  If I regress to sed 4.1.4,
> it works ok.

> The question is: sed bug or configure bug?

Neither, it is a filesystem problem.  I asked a Cygwin expert with 
familiarity with SED about the problem and she said:

: This is a line-ending problem.  The older SED binary does automatic
: conversion from CR/LF to LF lineendings, thus breaking binary input.

[Note - SED *is* used for editing binary files, hence it is necessary 
that it does not break binary input].

: The newer SED does not do this automatic conversion and treats the
: input as binary input.  CR/LF lineendings on input are thus treated
: as lines with LF lineendings and having a CR as last character on the
: line, same as on other POSIX systems.  The problem here is apparently
: that the input is in DOS CR/LF format.  It should be converted to LF
: lineendings before using it.

So either you can stick with the older version of SED, (after all if it
works for you then why change ?), or else you can use the newer version
of SED and the "tr" command or your favorite editor to fix up the input 
files that are causing the problems and replace CR/LF with LF.

Cheers
   Nick

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

* Re: Can't get binutils to build on Cygwin
  2006-07-31 21:44 malanda
  2006-07-31 22:23 ` Andreas Schwab
@ 2006-07-31 22:53 ` Pedro Alves
  2006-08-02 10:29 ` Nick Clifton
  2 siblings, 0 replies; 15+ messages in thread
From: Pedro Alves @ 2006-07-31 22:53 UTC (permalink / raw)
  To: malanda; +Cc: binutils

malanda@freeuk.com wrote:
> Hi,
> 
> Thanks for the help and suggestions so far.  I've tracked down the problem
> to being an incompatibility between 'configure' in binutils 2.17, and sed
> 4.1.5, which Cygwin is currently distributing.  If I regress to sed 4.1.4,
> it works ok.
> 
> The question is: sed bug or configure bug?
> 
> I've narrowed it down to this test case:
> 
> # Here's my test data file
> $ cat testdata
> @if build-libiberty
> maybe-configure-build-libiberty: configure-build-libiberty
> @endif build-libiberty
> 
> # Here are my sed commands
> $ cat edit
> /^@if build-libiberty$/d
> /^@endif build-libiberty$/d
> /^@if /,/^@endif /d
> 
> # Running sed 4.1.4
> $ ./sed -f edit < testdata
> maybe-configure-build-libiberty: configure-build-libiberty
> $
> 
> # Running sed 4.1.5
> $ sed -f edit < testdata
> $
> 
> 
> I'm suspecting sed, but I'd like a second opinion.
> Thanks!
> 


Could this by any chance be related to "\r\n" ?

I've had problems with sed 4.1.5 on cygwin before:
http://sources.redhat.com/ml/binutils/2006-04/msg00023.html

Cheers,
Pedro Alves

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

* Re: Can't get binutils to build on Cygwin
  2006-07-31 21:44 malanda
@ 2006-07-31 22:23 ` Andreas Schwab
  2006-07-31 22:53 ` Pedro Alves
  2006-08-02 10:29 ` Nick Clifton
  2 siblings, 0 replies; 15+ messages in thread
From: Andreas Schwab @ 2006-07-31 22:23 UTC (permalink / raw)
  To: malanda; +Cc: binutils

"malanda@freeuk.com" <malanda@freeuk.com> writes:

> The question is: sed bug or configure bug?

Looks like a bug in the Cygwin port.  I can't reproduce that on ia64-linux
nor ppc-linux.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Can't get binutils to build on Cygwin
@ 2006-07-31 21:44 malanda
  2006-07-31 22:23 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: malanda @ 2006-07-31 21:44 UTC (permalink / raw)
  To: binutils

Hi,

Thanks for the help and suggestions so far.  I've tracked down the problem
to being an incompatibility between 'configure' in binutils 2.17, and sed
4.1.5, which Cygwin is currently distributing.  If I regress to sed 4.1.4,
it works ok.

The question is: sed bug or configure bug?

I've narrowed it down to this test case:

# Here's my test data file
$ cat testdata
@if build-libiberty
maybe-configure-build-libiberty: configure-build-libiberty
@endif build-libiberty

# Here are my sed commands
$ cat edit
/^@if build-libiberty$/d
/^@endif build-libiberty$/d
/^@if /,/^@endif /d

# Running sed 4.1.4
$ ./sed -f edit < testdata
maybe-configure-build-libiberty: configure-build-libiberty
$

# Running sed 4.1.5
$ sed -f edit < testdata
$


I'm suspecting sed, but I'd like a second opinion.
Thanks!


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


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

* Re: Can't get binutils to build on Cygwin
  2006-07-31  8:23 ` Pedro Alves
@ 2006-07-31 17:58   ` Eric Christopher
  0 siblings, 0 replies; 15+ messages in thread
From: Eric Christopher @ 2006-07-31 17:58 UTC (permalink / raw)
  To: Pedro Alves; +Cc: malanda, binutils


>> checking for correct version of gmp.h... no
>> checking for bison... no
>> checking for byacc... no
>> checking for yacc... no
>> checking for bison... no
>> checking for gm4... no
>> checking for gnum4... no
>> checking for m4... no
>> checking for flex... no
>> checking for lex... no
>> checking for flex... no
>> checking for makeinfo... makeinfo
>> checking for expect... no
>> checking for runtest... no
> 
> Aren't some of these required?
> 

Not for a release build, no.

-eric

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

* Re: Can't get binutils to build on Cygwin
  2006-07-30 21:09 malanda
  2006-07-30 21:38 ` Eric Christopher
@ 2006-07-31  8:23 ` Pedro Alves
  2006-07-31 17:58   ` Eric Christopher
  1 sibling, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2006-07-31  8:23 UTC (permalink / raw)
  To: malanda; +Cc: binutils

malanda@freeuk.com wrote:
> Eric Christopher wrote:
>> Need more of a log on how you configured...
>>
>> -eric
>>
> 
> Like this...
> 

> checking for correct version of gmp.h... no
> checking for bison... no
> checking for byacc... no
> checking for yacc... no
> checking for bison... no
> checking for gm4... no
> checking for gnum4... no
> checking for m4... no
> checking for flex... no
> checking for lex... no
> checking for flex... no
> checking for makeinfo... makeinfo
> checking for expect... no
> checking for runtest... no

Aren't some of these required?

Cheers,
Pedro Alves

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

* Re: Can't get binutils to build on Cygwin
  2006-07-30 21:09 malanda
@ 2006-07-30 21:38 ` Eric Christopher
  2006-07-31  8:23 ` Pedro Alves
  1 sibling, 0 replies; 15+ messages in thread
From: Eric Christopher @ 2006-07-30 21:38 UTC (permalink / raw)
  To: malanda; +Cc: binutils

malanda@freeuk.com wrote:
> Eric Christopher wrote:
>> Need more of a log on how you configured...
>>
>> -eric
>>
> 
> Hi Eric,
> 
> Like this...
> 
> $ mkdir binutils-2.17-sparc-elf
> $ cd binutils-2.17-sparc-elf
> $ ../binutils-2.17/configure --target=sparc-elf
>

Looks like it probably should work. I just tried that with the release 
and mainline and it worked just fine for me.

-eric

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

* Re: Can't get binutils to build on Cygwin
@ 2006-07-30 21:09 malanda
  2006-07-30 21:38 ` Eric Christopher
  2006-07-31  8:23 ` Pedro Alves
  0 siblings, 2 replies; 15+ messages in thread
From: malanda @ 2006-07-30 21:09 UTC (permalink / raw)
  To: binutils

Eric Christopher wrote:
> Need more of a log on how you configured...
>
> -eric
>

Hi Eric,

Like this...

$ mkdir binutils-2.17-sparc-elf
$ cd binutils-2.17-sparc-elf
$ ../binutils-2.17/configure --target=sparc-elf
creating cache ./config.cache
checking host system type... i686-pc-cygwin
checking target system type... sparc-unknown-elf
checking build system type... i686-pc-cygwin
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16
$$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for bison... no
checking for gm4... no
checking for gnum4... no
checking for m4... no
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for i686-pc-cygwin-ar... no
checking for ar... ar
checking for i686-pc-cygwin-as... no
checking for as... as
checking for i686-pc-cygwin-dlltool... no
checking for dlltool... dlltool
checking for i686-pc-cygwin-ld...
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld.exe
checking for i686-pc-cygwin-lipo... no
checking for lipo... no
checking for i686-pc-cygwin-nm... no
checking for nm... nm
checking for i686-pc-cygwin-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-cygwin-strip... no
checking for strip... strip
checking for i686-pc-cygwin-windres... no
checking for windres... windres
checking for i686-pc-cygwin-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-cygwin-objdump... no
checking for objdump... objdump
checking for sparc-elf-cc... no
checking for sparc-elf-gcc... no
checking for sparc-elf-c++... no
checking for sparc-elf-g++... no
checking for sparc-elf-cxx... no
checking for sparc-elf-gxx... no
checking for sparc-elf-gcc... no
checking for sparc-elf-gcj... no
checking for sparc-elf-gfortran... no
checking for ar... no
checking for sparc-elf-ar... no
checking for as... no
checking for sparc-elf-as... no
checking for dlltool... no
checking for sparc-elf-dlltool... no
checking for ld... no
checking for sparc-elf-ld... no
checking for lipo... no
checking for sparc-elf-lipo... no
checking for nm... no
checking for sparc-elf-nm... no
checking for objdump... no
checking for sparc-elf-objdump... no
checking for ranlib... no
checking for sparc-elf-ranlib... no
checking for strip... no
checking for sparc-elf-strip... no
checking for windres... no
checking for sparc-elf-windres... no
checking where to find the target ar... just compiled
checking where to find the target as... just compiled
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... just compiled
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... just compiled
checking where to find the target lipo... pre-installed
checking where to find the target nm... just compiled
checking where to find the target objdump... just compiled
checking where to find the target ranlib... just compiled
checking where to find the target strip... just compiled
checking where to find the target windres... just compiled
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile

$


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .


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

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

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-30 20:45 Can't get binutils to build on Cygwin malanda
2006-07-30 20:54 ` Eric Christopher
2006-07-30 21:09 malanda
2006-07-30 21:38 ` Eric Christopher
2006-07-31  8:23 ` Pedro Alves
2006-07-31 17:58   ` Eric Christopher
2006-07-31 21:44 malanda
2006-07-31 22:23 ` Andreas Schwab
2006-07-31 22:53 ` Pedro Alves
2006-08-02 10:29 ` Nick Clifton
2006-08-02 11:21   ` Andreas Schwab
2006-08-02 13:38     ` Corinna Vinschen
2006-08-02 13:57       ` Andreas Schwab
2006-08-02 19:21   ` Dave Korn
2006-08-03 12:40 malanda

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