This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Compile error Solaris
- From: David Van Horn <dvanhorn at emba dot uvm dot edu>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 4 Feb 2003 11:28:24 -0500 (EST)
- Subject: Re: Compile error Solaris
Thanks Nick. I've inlined notes below.
On 4 Feb 2003, Nick Clifton wrote:
> Hi David,
>
> > I am having troubles building binutils on Sun Sparc Solaris 2.8. I've
> > configured with:
> >
> > ./configure --prefix=/home/cs/csugrads/dvanhorn/local
> >
> > But make errors out with this:
> >
> > gcc -c -g -O2 -I. -I./../include -DHAVE_SYSCONF ./dummy.c 2>/dev/null
> > *** Error code 1
> > make: Fatal error: Command failed for target `dummy.o'
>
> > Any ideas? In general, is there a way to get more information?
>
> Try adding -v to the command line. This should show you which program
> (ccp, cc1, as) is crashing.
gcc: 2: No such file or directory
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.2/specs
Configured with: ../configure --with-as=/usr/local/bin/as
--with-ld=/usr/local/bin/ld --enable-libgcj
Thread model: posix
gcc version 3.0.2
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.2/cc1 -lang-c -v
-I. -I./../include -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=2
-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__
-D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4
-D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D__GCC_NEW_VARARGS__ -Acpu=sparc
-Amachine=sparc -DHAVE_SYSCONF ./dummy.c -quiet -dumpbase dummy.c -g -O2
-version -o /var/tmp/ccV64bZY.s
GNU CPP version 3.0.2 (cpplib) (sparc)
GNU C version 3.0.2 (sparc-sun-solaris2.8)
compiled by GNU C version 3.0.2.
#include "..." search starts here:
#include <...> search starts here:
.
../include
/usr/local/include
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.0.2/include
/usr/include
End of search list.
In file included from dummy.c:46:
functions.def: In function `main':
functions.def:38: too few arguments to function `strstr'
>From functions.def:
DEF(strstr, char*, (), NOTHING)
So it appears that my system does not have strstr and we are using the
included implemementation; however the above prototype is incorrect, and
should be replaced by:
DEF(strstr, char*, (s1, s2), char *s1 AND char *s2)
Which now builds correctly. However...
> Check which version of gcc you are using - maybe it is an old one and
> you can upgrade. Also check which version of the sources you are
> compiling. If they are not the latest you may encounter (already
> solved) problems.
Good advice. I thought I got the latest by skipping down to the
bottom of the ftp listing; turns out I got 2.9 and not 2.13. D'oh!
With the new sources the above bug does not occur.
Thanks,
David