Problems building binutils cvs trunk on i686-pc-mingw32

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building binutils cvs trunk on i686-pc-mingw32

Christian Joensson-2
Hi guys..

for the fun of it, I try to build binutils cvs trunk, LAST_UPDATED:
Mon Jun 13 22:28:30 UTC 2005

however, I get into three (known to me) errors:

(1)

Making info in doc
make[2]: Entering directory
`/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd/doc'
restore=: && backupdir=".am$$" && \
am__cwd=`pwd` && cd ../../../src/bfd/doc && \
rm -rf $backupdir && mkdir $backupdir && \
for f in ../../../src/bfd/doc/bfd.info
../../../src/bfd/doc/bfd.info-[0-9]
../../../src/bfd/doc/bfd.info-[0-9][0-9]
../../../src/bfd/doc/bfd.i[0-9] ../../../src/bfd/doc/bfd.i[0-9][0-9];
do \
  if test -f $f; then mv $f $backupdir; restore=mv; else :; fi; \
done; \
cd "$am__cwd"; \
if makeinfo --split-size=5000000   -I ../../../src/bfd/doc \
 -o ../../../src/bfd/doc/bfd.info ../../../src/bfd/doc/bfd.texinfo; \
then \
  rc=0; \
  cd ../../../src/bfd/doc; \
else \
  rc=$?; \
  cd ../../../src/bfd/doc && \
  $restore $backupdir/* `echo "./../../../src/bfd/doc/bfd.info" | sed
's|[^/]*$||'`; \
fi; \
rm -rf $backupdir; exit $rc
 section mapping'.ss reference to nonexistent node `mmo
 a New Hash Table Type'.ference to nonexistent node `Deriving
makeinfo: Removing output file `../../../src/bfd/doc/bfd.info' due to
errors; use --force to preserve.
make[2]: *** [../../../src/bfd/doc/bfd.info] Error 2
make[2]: Leaving directory
`/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd/doc'
Making info in po
make[2]: Entering directory
`/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd/po'
make[2]: Nothing to be done for `info'.
make[2]: Leaving directory
`/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd/po'
make[2]: Entering directory `/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd'
make[2]: Nothing to be done for `info-am'.
make[2]: Leaving directory `/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd'
make[1]: *** [info-recursive] Error 1
make[1]: Leaving directory `/c/cygwin/usr/local/src/trunk/objdir-binutils/bfd'
make: *** [all-bfd] Error 2


(2)

make[2]: Entering directory
`/c/cygwin/usr/local/src/trunk/objdir-binutils/binutils'
gcc -DHAVE_CONFIG_H -I. -I../../src/binutils -I. -D_GNU_SOURCE -I.
-I../../src/binutils -I../bfd -I../../src/binutils/../bfd
-I../../src/binutils/../include -D__USE_MINGW_FSEEK
-I../../src/binutils/../intl -I../intl
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2  -c
../../src/binutils/rename.c
../../src/binutils/rename.c:143: warning: unused parameter 'preserve_dates'
../../src/binutils/rename.c:50: warning: 'simple_copy' defined but not used
make[2]: *** [rename.o] Error 1

(3)

gcc -DHAVE_CONFIG_H -I. -I../../src/binutils -I. -D_GNU_SOURCE -I.
-I../../src/binutils -I../bfd -I../../src/binutils/../bfd
-I../../src/binutils/../include -D__USE_MINGW_FSEEK
-I../../src/binutils/../intl -I../intl
-DLOCALEDIR="\"/usr/local/share/locale\""
-Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2  -c
../../src/binutils/resres.c
../../src/binutils/resres.c: In function `write_res_data':
../../src/binutils/resres.c:411: warning: comparison between signed and unsigned
make[2]: *** [resres.o] Error 1

Any comments on what I might be doing wrong or what might be currently
wrong in trunk?

BTW, 2.16.1 builds...

--
Cheers,

/ChJ
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Brian Dessent
Christian Joensson wrote:

>  section mapping'.ss reference to nonexistent node `mmo
>  a New Hash Table Type'.ference to nonexistent node `Deriving
> makeinfo: Removing output file `../../../src/bfd/doc/bfd.info' due to
> errors; use --force to preserve.

The nature of this error (the fact that it wraps like that) seems to
indicate that you have stray CRs (dos line endings) in your sources.
You should probably use a binary mount and/or make sure to use Cygwin's
tar (as opposed to something like winzip) so that you don't get CRLF
line endings.  I don't know about the other errors.

Brian
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Aaron W. LaFramboise
Brian Dessent wrote:

> Christian Joensson wrote:
>
>> section mapping'.ss reference to nonexistent node `mmo
>> a New Hash Table Type'.ference to nonexistent node `Deriving
>>makeinfo: Removing output file `../../../src/bfd/doc/bfd.info' due to
>>errors; use --force to preserve.
>
> The nature of this error (the fact that it wraps like that) seems to
> indicate that you have stray CRs (dos line endings) in your sources.
> You should probably use a binary mount and/or make sure to use Cygwin's
> tar (as opposed to something like winzip) so that you don't get CRLF
> line endings.  I don't know about the other errors.

Yes.  A makeinfo that is configured to use Unix-style LF line endings
rather than Windows-style CRLF line endings causes this problem.  You
need a i686-pc-mingw32 targetted texinfo/makeinfo for this to work
correctly.  If you're using a Cygwin one, you might be able to get it to
work by playing with it a little bit, as Brian describes.  To just make
it work for now, manually rebuild the file with --force and restart the
build.

The other errors appear to just be harmless rot.


Aaron W. LaFramboise

Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Christian Joensson-2
On 6/14/05, Aaron W. LaFramboise <[hidden email]> wrote:

> Brian Dessent wrote:
>
> > Christian Joensson wrote:
> >
> >> section mapping'.ss reference to nonexistent node `mmo
> >> a New Hash Table Type'.ference to nonexistent node `Deriving
> >>makeinfo: Removing output file `../../../src/bfd/doc/bfd.info' due to
> >>errors; use --force to preserve.
> >
> > The nature of this error (the fact that it wraps like that) seems to
> > indicate that you have stray CRs (dos line endings) in your sources.
> > You should probably use a binary mount and/or make sure to use Cygwin's
> > tar (as opposed to something like winzip) so that you don't get CRLF
> > line endings.  I don't know about the other errors.
>
> Yes.  A makeinfo that is configured to use Unix-style LF line endings
> rather than Windows-style CRLF line endings causes this problem.  You
> need a i686-pc-mingw32 targetted texinfo/makeinfo for this to work
> correctly.  If you're using a Cygwin one, you might be able to get it to
> work by playing with it a little bit, as Brian describes.  To just make
> it work for now, manually rebuild the file with --force and restart the
> build.

right... my fault for using a cvs tree from under cygwin...

> The other errors appear to just be harmless rot.

true, however, it'd be nice to have them clean up... :)
 
--
Cheers,

/ChJ
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Nick Clifton
In reply to this post by Christian Joensson-2
Hi Christian,

> ../../src/binutils/rename.c:143: warning: unused parameter 'preserve_dates'
> ../../src/binutils/rename.c:50: warning: 'simple_copy' defined but not used

> ../../src/binutils/resres.c:411: warning: comparison between signed and unsigned

Please could you try the attached patch and let me know if it resolves
these build failures.  If so I will check it in.

Cheers
   Nick

binutils/ChangeLog
2005-06-14  Nick Clifton  <[hidden email]>

        * rename.c (simple_copy): Only define if it is going to be used.
        (smart_rename): Mark the preserve_dates parameter as possibly
        being unused.

        * resres.c (write_res_data): Prevent a potential compile time
        warning by casting the return value from fwrite.

Index: binutils/rename.c
===================================================================
RCS file: /cvs/src/src/binutils/rename.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 rename.c
*** binutils/rename.c 8 May 2005 14:17:39 -0000 1.9
--- binutils/rename.c 14 Jun 2005 10:10:02 -0000
***************
*** 37,42 ****
--- 37,43 ----
  #define O_BINARY 0
  #endif
 
+ #if ! defined (_WIN32) || defined (__CYGWIN32__)
  static int simple_copy (const char *, const char *);
 
  /* The number of bytes to copy at once.  */
*************** simple_copy (const char *from, const cha
*** 88,93 ****
--- 89,95 ----
      }
    return 0;
  }
+ #endif /* __CYGWIN32__ or not _WIN32 */
 
  /* Set the times of the file DESTINATION to be the same as those in
     STATBUF.  */
*************** set_times (const char *destination, cons
*** 140,146 ****
     Return 0 if ok, -1 if error.  */
 
  int
! smart_rename (const char *from, const char *to, int preserve_dates)
  {
    bfd_boolean exists;
    struct stat s;
--- 142,148 ----
     Return 0 if ok, -1 if error.  */
 
  int
! smart_rename (const char *from, const char *to, int preserve_dates ATTRIBUTE_UNUSED)
  {
    bfd_boolean exists;
    struct stat s;
Index: binutils/resres.c
===================================================================
RCS file: /cvs/src/src/binutils/resres.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 resres.c
*** binutils/resres.c 8 May 2005 14:17:39 -0000 1.6
--- binutils/resres.c 14 Jun 2005 10:10:02 -0000
*************** write_res_data (data, size, count)
*** 408,414 ****
       size_t size;
       int count;
  {
!   if (fwrite (data, size, count, fres) != (size_t) count)
      fatal ("%s: could not write to file", filename);
  }
 
--- 408,414 ----
       size_t size;
       int count;
  {
!   if ((size_t) fwrite (data, size, count, fres) != (size_t) count)
      fatal ("%s: could not write to file", filename);
  }
 
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Christian Joensson-2
On 6/14/05, Nick Clifton <[hidden email]> wrote:

> Hi Christian,
>
> > ../../src/binutils/rename.c:143: warning: unused parameter 'preserve_dates'
> > ../../src/binutils/rename.c:50: warning: 'simple_copy' defined but not used
>
> > ../../src/binutils/resres.c:411: warning: comparison between signed and unsigned
>
> Please could you try the attached patch and let me know if it resolves
> these build failures.  If so I will check it in.
>
> Cheers
>   Nick
>
> binutils/ChangeLog
> 2005-06-14  Nick Clifton  <[hidden email]>
>
>        * rename.c (simple_copy): Only define if it is going to be used.
>        (smart_rename): Mark the preserve_dates parameter as possibly
>        being unused.
>
>        * resres.c (write_res_data): Prevent a potential compile time
>        warning by casting the return value from fwrite.
>

yeah, they work for me, tested on the daily snapshot, though, since
cvs trunk does not seem to work for me under mingw... makeinfo issue
perhaps...


--
Cheers,

/ChJ
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Nick Clifton
Hi Christian,

>>binutils/ChangeLog
>>2005-06-14  Nick Clifton  <[hidden email]>
>>
>>       * rename.c (simple_copy): Only define if it is going to be used.
>>       (smart_rename): Mark the preserve_dates parameter as possibly
>>       being unused.
>>
>>       * resres.c (write_res_data): Prevent a potential compile time
>>       warning by casting the return value from fwrite.
>>

> yeah, they work for me,

Great - I have checked the patch in.

Cheers
   Nick
Reply | Threaded
Open this post in threaded view
|

Re: Problems building binutils cvs trunk on i686-pc-mingw32

Christian Joensson-2
On 6/16/05, Nick Clifton <[hidden email]> wrote:

> Hi Christian,
>
> >>binutils/ChangeLog
> >>2005-06-14  Nick Clifton  <[hidden email]>
> >>
> >>       * rename.c (simple_copy): Only define if it is going to be used.
> >>       (smart_rename): Mark the preserve_dates parameter as possibly
> >>       being unused.
> >>
> >>       * resres.c (write_res_data): Prevent a potential compile time
> >>       warning by casting the return value from fwrite.
> >>
>
> > yeah, they work for me,
>
> Great - I have checked the patch in.

Thanks.
--
Cheers,

/ChJ