public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* strange compile problem
@ 1999-09-13  6:54 John Barry
  1999-09-13  9:12 ` Ian Lance Taylor
  0 siblings, 1 reply; 9+ messages in thread
From: John Barry @ 1999-09-13  6:54 UTC (permalink / raw)
  To: binutils

Hi,

I'm getting this error when I try to build binutils-2.9.5.0.12 with gcc-2.95.1
(compiled for/on a native utrasparc running Solaris 2.6)

SunOS xxx 5.6 Generic_105181-05 sun4u sparc

gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.9.5.0.12/gprof -I. -D_GNU_SOURCE -DDEBUG -I../bfd -I../../binutils-2.9.5.0.12/gprof/../include -I../../binutils-2.9.5.0.12/gprof/../bfd -I../../binutils-2.9.5.0.12/gprof/../intl -I../intl -DLOCALEDIR="\"/apps/gnu2/share/locale\""  -I/usr/openwin/include -I/usr/dt/include -I/apps/include -I/apps/gnu/include -I/apps/X11R6/include -I/apps/gnome/include -I/apps/kde/include -I/apps/ImageMagick/include  -O3 -funroll-loops -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -c ../../binutils-2.9.5.0.12/gprof/hist.c
/var/tmp/ccUupNBD.s: Assembler messages:
/var/tmp/ccUupNBD.s:1963: Error: Illegal operands
/var/tmp/ccUupNBD.s:1986: Error: Illegal operands
/var/tmp/ccUupNBD.s:2008: Error: Illegal operands
/var/tmp/ccUupNBD.s:2100: Error: Illegal operands
*** Error code 1
make: Fatal error: Command failed for target `hist.o'
Current working directory /apps/jbarry/gnu/gcc/bin-build/gprof

This error goes away if I remove the optimisation flag  completeley, (even
with -O it still give me assembler errors) but I have my doubts about the 
correctness of the code produced in this manner.

This error is reproducable on my system with both a full build:

#!/bin/sh
# This file was generated automatically by configure.  Do not edit.
# This directory was configured as follows:
../binutils-2.9.5.0.12/configure --host=sparc-sun-solaris2.6 --prefix=/apps/gnu2
 --enable-shared --enable-static --enable-bfd-assembler --enable-commonbfdlib --
enable-64-bit-bfd --with-included-gettext --enable-targets=all --enable-multilib
 --enable-threads=posix --with-cpu=ultrasparc --norecursion 
# using "mh-frag" and "mt-frag"

and with a seperate config in the gprof dir thus:

# configure  --prefix=/apps/gnu2 --enable-shared --enable-static --with-included
-gettext --with-x --x-includes=/usr/openwin/include --x-libraries=/usr/openwin/l
ib

I'm including the compile flags -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64
as recommended by Sun to ensure the apps are compliant with 2.6's 64 file
system, it make no difference if I take them out or not, the only thing that
affects it is -O (or not...)

as and ld are gnu-as & gnu-ld from binutils-2.9.1, but I've been getting screwy
errors out the compiler for a few days so I decided to see if upgrading
binutils would help...

I didn't have these problems with the egcs-1.1.2 release, any ideas?

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: strange compile problem
@ 1999-09-13 10:14 John Barry
  1999-09-13 11:23 ` Ian Lance Taylor
  0 siblings, 1 reply; 9+ messages in thread
From: John Barry @ 1999-09-13 10:14 UTC (permalink / raw)
  To: ian; +Cc: binutils

Hi,

> This sounds more like a compiler problem than a binutils problem.  On

I read a little more of the list after I'd sent my mail, and found someone
who, while reporting a different problem stated the following:

  You can't use 2.9.1 in combination with gcc 2.95.1's option -mcpu=ultrasparc

and since I'd built my gcc-2.95.1 with exactly that I think that what I need to 
do is fall back to egcs 1.1.2 and rebuild gcc (again :( Ah well [sniff]

> the other hand, since you are using an UltraSPARC, it is quite
> possible that you need some UltraSPARC support added since the 2.9.1
> release.

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 *));

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

> To check that, run the above command with the --save-temps option, and
> take a look at the resulting assembler file.  Send it in here if you
> want to, or better yet just send the lines that the assembler is
> complaining about.

Here you go :)

-c --save-temps ../../binutils-2.9.5.0.12/gprof/hist.c

hist.s:1963: Error: Illegal operands [fbule,a,pn %fcc3, .LL310]
hist.s:1986: Error: Illegal operands [fbule,a,pn %fcc3, .LL256]
hist.s:2008: Error: Illegal operands [fbule,a,pn %fcc3, .LL311]
hist.s:2100: Error: Illegal operands [fbule,a,pn %fcc3, .LL316]

> Even though you are compiling the binutils code itself, it's much
> easier for you to send a test case than it is for us to try to
> duplicate your compiler.

Duly noted, cheers for the reply, much appreciated.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: strange compile problem
@ 1999-09-13 11:50 John Barry
  1999-09-13 11:58 ` Ian Lance Taylor
  0 siblings, 1 reply; 9+ messages in thread
From: John Barry @ 1999-09-13 11:50 UTC (permalink / raw)
  To: ian; +Cc: binutils

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

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

end of thread, other threads:[~1999-09-13 13:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-13  6:54 strange compile problem John Barry
1999-09-13  9:12 ` Ian Lance Taylor
1999-09-13 10:14 John Barry
1999-09-13 11:23 ` Ian Lance Taylor
1999-09-13 11:50 John Barry
1999-09-13 11:58 ` Ian Lance Taylor
1999-09-13 12:39   ` Roland McGrath
1999-09-13 12:53     ` Roland McGrath
1999-09-13 13:13     ` John Barry

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