This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: strange compile problem


Hi,

>    I was trying to compile binutils-2.9.5.0.12, which I found on va-research's 
>    ftp site, it gives me the same kind of problems with the latest snap from
>    cygnus too. Though while I'm on the subject I get a problem building 
>    bfd/libbfd.c it always fails with this error:
> 
>    ../../binutils-2.9.5.0.12/bfd/libbfd.c: In function `bfd_stat':
>    ../../binutils-2.9.5.0.12/bfd/libbfd.c:638: argument `statbuf' doesn't match prototype
>    ../../binutils-2.9.5.0.12/bfd/bfd.h:482: prototype declaration
> 
>    extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
> 
> I don't see that with the current development sources.  Do you see it
> with the snapshot from the Cygnus site, or just with 2.9.5.0.12 (which
> is a GNU/Linux specific release)?

I've been getting this with every version of binutils I've built up since I
started using -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64, this includes
2.9.1 and every snapshop I've downloaded from cygnus. It's a Solaris only
issue, didn't happen when I built it on a hppa2.0 Visualise C 3000

According to Sun -D_LARGEFILE64_SOURCE=1 give the program a second set of 64
bit registers in addition to the 32bit ones, while the -D_FILE_OFFSET_BITS=64
actually converts the registers to 64 bit on the fly. Check this:

  QUESTION: How do I enable large file support? 
  Nicolai: You have two choices in your application. For transparent conversion of off_t to
  64-bits, you can use _FILE_OFFSET_BITS=64 compile flag. Or you can have Solaris
  give you a second set of 64-bit interfaces alongside the existing 32-bit interfaces. This is
  done by the _LARGEFILE64_SOURCE=1 compile time flag. Don't use "Strinct ANSI"
  mode for the compiler. 

From: http://suncom.bilkent.edu.tr/developers/solaris2.6.html

>    Which I figure is because 2.9.1, et all aren't fully 64bit file system 
>    compliant, (or Solaris 2.6 isn't :) I get around it by removing 
>    -D_FILE_OFFSET_BITS=64 from the compile flags, and leaving -D_LARGEFILE64_SOURCE=1
>    in, seems to work, though a patch would be very welcome :)
> 
> I don't know what has to change in the binutils for them to become
> 64bit file compliant.  I don't really know why anything has to
> change.

Like I said, technically speaking it doesn't, because I can get around it, and I
don't imagine that that many people will take the time and trouble to rebuild
all thier apps for 64 bit compliance. But since we were upgrading the way apps
were distributed, and the bulk of our boxes are now Ultras I figured I'd go the
whole hog and upgrade the lot, stop the users from bitching. :)

later
jb
----
John Barry
Unix Network Administrator
European Southern Observatory
Karl-Schwarzschild-Strasse 2
D-85748 Garching b. Munchen
Germany

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]