public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gen-classlist.sh problem while building gcc 4.2.4
@ 2008-08-01 14:38 David Eisner
  2008-08-02 12:30 ` Ralf Wildenhues
  0 siblings, 1 reply; 5+ messages in thread
From: David Eisner @ 2008-08-01 14:38 UTC (permalink / raw)
  To: gcc-help

Still trying to build gcc-4.2.4 on a Solaris 9 box.  During stage 3, I
run into this problem:

cannes [lib]$ make
true
top_builddir=..
top_srcdir=../../../../../../gcc-4.2.4/libjava/classpath /bin/sh
./gen-classlist.sh standard
Adding java source files from srcdir
'../../../../../../gcc-4.2.4/libjava/classpath'.
Adding java source files from VM directory
/export/data/software/cradle/build/gcc/gcc-4.2.4/libjava
Adding java source files from VM directory
/export/data/software/cradle/build/gcc/objdir/sparc-sun-solaris2.9/sparcv9/libjava
./gen-classlist.sh: test: unknown operator -ef
make: *** [genclasses] Error 1

The problem appears to be that the built-in 'test'  operator in the
/bin/sh Bourne shell that ships with Solaris 9 doesn't understand the
-ef operator, though bash does:

cannes [lib]$ /bin/sh -c 'test foo -ef bar && echo same'
/bin/sh: test: unknown operator -ef
cannes [lib]$ /usr/bin/bash -c 'test foo -ef bar && echo same'
cannes [lib]$

I couldn't find this in the bug database.  Should I report it?

Workaround: in gen-classlist.sh, change
   if test ! "${top_builddir}" -ef
"../../../../../../gcc-4.2.4/libjava/classpath"; then
to
   if /usr/bin/test ! "${top_builddir}" -ef
"../../../../../../gcc-4.2.4/libjava/classpath"; then

By the way, I'm not sure why it's even building java.  I didn't
include java in the enabled languages when I ran configure.  I guess
it knows best.

-David


-- 
David Eisner http://cradle.brokenglass.com

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

* Re: gen-classlist.sh problem while building gcc 4.2.4
  2008-08-01 14:38 gen-classlist.sh problem while building gcc 4.2.4 David Eisner
@ 2008-08-02 12:30 ` Ralf Wildenhues
  2008-08-06 16:52   ` David Eisner
  0 siblings, 1 reply; 5+ messages in thread
From: Ralf Wildenhues @ 2008-08-02 12:30 UTC (permalink / raw)
  To: gcc-help

David Eisner <deisner <at> gmail.com> writes:
> Still trying to build gcc-4.2.4 on a Solaris 9 box.  During stage 3, I
> run into this problem:

> ./gen-classlist.sh: test: unknown operator -ef
> make: *** [genclasses] Error 1

> I couldn't find this in the bug database.  Should I report it?

This is <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25557>.
If this isn't a regression (which I'm not sure of), then I guess this
bug won't be fixed in the branch.

The relevant diff between branch-4_2 and branch-4_3 is this (which looks
a bit different from the patch proposed in that PR):

--- gen-classlist.sh.in       2008-02-13 20:44:41.000000000 +0100
+++ gen-classlist.sh.in       2008-02-19 21:08:25.000000000 +0100
@@ -55,7 +62,9 @@
 done

 # Only include generated files once.
-if test ! "${top_builddir}" -ef "@top_srcdir@"; then
+abs_top_builddir=`cd "${top_builddir}"; pwd`
+abs_top_srcdir=`cd "@top_srcdir@"; pwd`
+if test "$abs_top_builddir" != "$abs_top_srcdir"; then
   echo "Adding generated files in builddir '${top_builddir}'."
   # Currently the only generated files are in gnu.*.
   (cd ${top_builddir}; @FIND@ gnu -follow -name '*.java' -print) |
@@ -95,7 +104,7 @@
 rm tmp.omit

 new=
-if test -e ${top_builddir}/lib/classes.2; then
+if test -f ${top_builddir}/lib/classes.2; then
   p=`diff ${top_builddir}/lib/classes.2 ${top_builddir}/lib/classes.1`
   if test "$p" != ""; then
     new="true"


> By the way, I'm not sure why it's even building java.  I didn't
> include java in the enabled languages when I ran configure.  I guess
> it knows best.

Try passing --enable-languages explicitly.

Cheers,
Ralf


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

* Re: gen-classlist.sh problem while building gcc 4.2.4
  2008-08-02 12:30 ` Ralf Wildenhues
@ 2008-08-06 16:52   ` David Eisner
  2008-08-06 17:34     ` David Eisner
  2008-08-07  3:15     ` David Eisner
  0 siblings, 2 replies; 5+ messages in thread
From: David Eisner @ 2008-08-06 16:52 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-help

On Sat, Aug 2, 2008 at 8:29 AM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> This is <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25557>.
> If this isn't a regression (which I'm not sure of), then I guess this
> bug won't be fixed in the branch.

Thanks for finding that.  I had created a new bug
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37000), and I've now
marked it a duplicate.

It was recommended that I set CONFIG_SHELL to /bin/ksh, as recommended
in the build notes for Solaris, and that did the trick for me:

  http://gcc.gnu.org/install/specific.html#x-x-solaris2

I should have noticed that before.

>> By the way, I'm not sure why it's even building java.  I didn't
>> include java in the enabled languages when I ran configure.  I guess
>> it knows best.
>
> Try passing --enable-languages explicitly.

I did.  Here's how i called configure:

CC="cc -xarch=v9 -xildoff" ../gcc-4.2.4/configure \
          --prefix=/data/software/devtools/gcc-4.3.1-sparc-sun-solaris2.9 \
          --enable-langues=c,c++,objc \
          --with-gmp=/data/software/devtools/gmp-4.2.1-sparc-sun-solaris2.9 \
          --with-mpfr=/data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9

Strangely, though, when I look at config.status, I see this:

#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host cannes.umd.edu:
#
# ../gcc-4.2.4/configure
--prefix=/data/software/devtools/gcc-4.3.1-sparc-sun-solaris2.9
--enable-langues=c,c++,objc
--with-gmp=/data/software/devtools/gmp-4.2.1-sparc-sun-solaris2.9
--with-mpfr=/data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9
--enable-languages=c,c++,java,objc
#

I don't know why the extra --enable-languages switch was appended, and
this time with java included.

-David



-- 
David Eisner http://cradle.brokenglass.com

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

* Re: gen-classlist.sh problem while building gcc 4.2.4
  2008-08-06 16:52   ` David Eisner
@ 2008-08-06 17:34     ` David Eisner
  2008-08-07  3:15     ` David Eisner
  1 sibling, 0 replies; 5+ messages in thread
From: David Eisner @ 2008-08-06 17:34 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-help

On Sat, Aug 2, 2008 at 8:29 AM, Ralf Wildenhues <Ralf.Wildenhues@gmx.de> wrote:
> This is <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25557>.
> If this isn't a regression (which I'm not sure of), then I guess this
> bug won't be fixed in the branch.

Thanks for finding that.  I had created a new bug
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37000), and I've now
marked it a duplicate.

It was recommended that I set CONFIG_SHELL to /bin/ksh, as recommended
in the build notes for Solaris, and that did the trick for me:

  http://gcc.gnu.org/install/specific.html#x-x-solaris2

I should have noticed that before.

>> By the way, I'm not sure why it's even building java.  I didn't
>> include java in the enabled languages when I ran configure.  I guess
>> it knows best.
>
> Try passing --enable-languages explicitly.

I did.  Here's how i called configure:

CC="cc -xarch=v9 -xildoff" ../gcc-4.2.4/configure \
          --prefix=/data/software/devtools/gcc-4.3.1-sparc-sun-solaris2.9 \
          --enable-langues=c,c++,objc \
          --with-gmp=/data/software/devtools/gmp-4.2.1-sparc-sun-solaris2.9 \
          --with-mpfr=/data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9

Strangely, though, when I look at config.status, I see this:

#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host cannes.umd.edu:
#
# ../gcc-4.2.4/configure
--prefix=/data/software/devtools/gcc-4.3.1-sparc-sun-solaris2.9
--enable-langues=c,c++,objc
--with-gmp=/data/software/devtools/gmp-4.2.1-sparc-sun-solaris2.9
--with-mpfr=/data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9
--enable-languages=c,c++,java,objc
#

I don't know why the extra --enable-languages switch was appended, and
this time with java included.

-David



-- 
David Eisner http://cradle.brokenglass.com

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

* Re: gen-classlist.sh problem while building gcc 4.2.4
  2008-08-06 16:52   ` David Eisner
  2008-08-06 17:34     ` David Eisner
@ 2008-08-07  3:15     ` David Eisner
  1 sibling, 0 replies; 5+ messages in thread
From: David Eisner @ 2008-08-07  3:15 UTC (permalink / raw)
  To: Ralf Wildenhues; +Cc: gcc-help

On Wed, Aug 6, 2008 at 12:48 PM, David Eisner <deisner@gmail.com> wrote:
> # ../gcc-4.2.4/configure
> --prefix=/data/software/devtools/gcc-4.3.1-sparc-sun-solaris2.9
> --enable-langues=c,c++,objc
> --with-gmp=/data/software/devtools/gmp-4.2.1-sparc-sun-solaris2.9
> --with-mpfr=/data/software/devtools/mpfr-2.3.0-sparc-sun-solaris2.9
> --enable-languages=c,c++,java,objc
> #
>
> I don't know why the extra --enable-languages switch was appended, and
> this time with java included.


A kind soul pointed out that I typed "--enable-langues" and not
"--enable-languages".  I think I implicitly assumed the ./configure
script would complain about typos, but it's liberal about accepting
--enable-*, probably with good reason.

Apologies for the bother.

-David

-- 
David Eisner http://cradle.brokenglass.com

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

end of thread, other threads:[~2008-08-06 17:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-01 14:38 gen-classlist.sh problem while building gcc 4.2.4 David Eisner
2008-08-02 12:30 ` Ralf Wildenhues
2008-08-06 16:52   ` David Eisner
2008-08-06 17:34     ` David Eisner
2008-08-07  3:15     ` David Eisner

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