You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ed Hillmann <ed...@gmail.com> on 2011/10/14 07:39:06 UTC

Error running configure for subversion 1.7.0

Hi all.  I'm trying to build svn 1.7.0 on a Solaris 9 box, using gcc v
4.1.1.  I've already downloaded and built APR and APR-UTIL, and am passing
their install directories to the configure command using --with-apr and
--with-apr-util.  They seemed to compile and install without an error.

When I run the configure command for Subversion, I get an error:

checking for a BSD-compatible install... build/install-sh -c
configure: Apache Portable Runtime (APR) library configuration
checking for APR... yes
checking APR version... 1.4.5
/u01/ct/ctapp/subversion-1.7.0/configure: bad substitution


I can't see what is causing the bad substitution error.

I've tried different values in the --with-apr value, but nothing seems to
make a difference.  Would anyone have a clue as to what the configure script
doesn't like?

I've looked in the configure script, and it's falling over for me at line
4668

  LDFLAGS="$LDFLAGS `
  input_flags="$apr_ldflags"
  output_flags=""
  filtered_dirs="/lib /lib64 /usr/lib /usr/lib64"
  for flag in $input_flags; do
    filter="no"
    for dir in $filtered_dirs; do
      if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then
        filter="yes"
        break
      fi
    done
    if test "$filter" = "no"; then
      output_flags="$output_flags $flag"
    fi
  done
  if test -n "$output_flags"; then
    printf "%s" "${output_flags# }"
  fi
`"

Is there an alternative for this part of the configure script that will work
on Solaris for me?  It doesn't like this.

Thanks for any ideas,
Ed

Re: Error running configure for subversion 1.7.0

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
I suppose setting SHELL or CONFIG_SHELL to bash or /usr/xpg4/bin/sh on
the configure command line might have had a similar effect.

Ed Hillmann wrote on Tue, Oct 18, 2011 at 09:42:39 +1000:
> I found a much easier solution.  I changed the first line of the configure
> script from
> 
> #!/bin/ksh
> 
> to
> 
> #!/bin/bash
> 
> Everything worked straight away. :)
> 
> Thanks,
> Ed
> 
> On Mon, Oct 17, 2011 at 7:42 AM, Ed Hillmann <ed...@gmail.com> wrote:
> 
> > I spoke too soon.
> >
> > Changing printf to echo $output_flags did work.  I just needed to do it for
> > all of the occurences in the script.
> >
> > So, I'm making forward progress.  Thanks!
> >
> > Ed
> >
> > On Fri, Oct 14, 2011 at 6:59 PM, Philip Martin <philip.martin@wandisco.com
> > > wrote:
> >
> >> Ed Hillmann <ed...@gmail.com> writes:
> >>
> >> > checking for a BSD-compatible install... build/install-sh -c
> >> > configure: Apache Portable Runtime (APR) library configuration
> >> > checking for APR... yes
> >> > checking APR version... 1.4.5
> >> > /u01/ct/ctapp/subversion-1.7.0/configure: bad substitution
> >> >
> >> >
> >> > I can't see what is causing the bad substitution error.
> >>
> >> >     printf "%s" "${output_flags# }"
> >>
> >> I'm guessing it's the # substitution in that line.  Which shell are you
> >> using?  It's a long time since I used Solaris but there used to be
> >> /usr/xpg4/bin/sh that was more like the shells commonly found on Linux.
> >> Perhaps you could use that. Alternatively you may be able to replace
> >> the above line with:
> >>
> >>      echo $output_flags
> >>
> >> it occurs in several places in configure.
> >>
> >> --
> >> Philip
> >>
> >
> >

Re: Error running configure for subversion 1.7.0

Posted by Ed Hillmann <ed...@gmail.com>.
I found a much easier solution.  I changed the first line of the configure
script from

#!/bin/ksh

to

#!/bin/bash

Everything worked straight away. :)

Thanks,
Ed

On Mon, Oct 17, 2011 at 7:42 AM, Ed Hillmann <ed...@gmail.com> wrote:

> I spoke too soon.
>
> Changing printf to echo $output_flags did work.  I just needed to do it for
> all of the occurences in the script.
>
> So, I'm making forward progress.  Thanks!
>
> Ed
>
> On Fri, Oct 14, 2011 at 6:59 PM, Philip Martin <philip.martin@wandisco.com
> > wrote:
>
>> Ed Hillmann <ed...@gmail.com> writes:
>>
>> > checking for a BSD-compatible install... build/install-sh -c
>> > configure: Apache Portable Runtime (APR) library configuration
>> > checking for APR... yes
>> > checking APR version... 1.4.5
>> > /u01/ct/ctapp/subversion-1.7.0/configure: bad substitution
>> >
>> >
>> > I can't see what is causing the bad substitution error.
>>
>> >     printf "%s" "${output_flags# }"
>>
>> I'm guessing it's the # substitution in that line.  Which shell are you
>> using?  It's a long time since I used Solaris but there used to be
>> /usr/xpg4/bin/sh that was more like the shells commonly found on Linux.
>> Perhaps you could use that. Alternatively you may be able to replace
>> the above line with:
>>
>>      echo $output_flags
>>
>> it occurs in several places in configure.
>>
>> --
>> Philip
>>
>
>

Re: Error running configure for subversion 1.7.0

Posted by Ed Hillmann <ed...@gmail.com>.
I spoke too soon.

Changing printf to echo $output_flags did work.  I just needed to do it for
all of the occurences in the script.

So, I'm making forward progress.  Thanks!

Ed

On Fri, Oct 14, 2011 at 6:59 PM, Philip Martin
<ph...@wandisco.com>wrote:

> Ed Hillmann <ed...@gmail.com> writes:
>
> > checking for a BSD-compatible install... build/install-sh -c
> > configure: Apache Portable Runtime (APR) library configuration
> > checking for APR... yes
> > checking APR version... 1.4.5
> > /u01/ct/ctapp/subversion-1.7.0/configure: bad substitution
> >
> >
> > I can't see what is causing the bad substitution error.
>
> >     printf "%s" "${output_flags# }"
>
> I'm guessing it's the # substitution in that line.  Which shell are you
> using?  It's a long time since I used Solaris but there used to be
> /usr/xpg4/bin/sh that was more like the shells commonly found on Linux.
> Perhaps you could use that. Alternatively you may be able to replace
> the above line with:
>
>      echo $output_flags
>
> it occurs in several places in configure.
>
> --
> Philip
>

Re: Error running configure for subversion 1.7.0

Posted by Ed Hillmann <ed...@gmail.com>.
Thanks for the ideas.  I was using /bin/sh (my call to configure is in a
shell script).  I tried /usr/xpg4/bin/sh, but I still get the same error.  I
also tried changing the configure script to call echo $output_flags, but no
change. :/

Thanks very much for the ideas, though.

Ed

On Fri, Oct 14, 2011 at 6:59 PM, Philip Martin
<ph...@wandisco.com>wrote:

> Ed Hillmann <ed...@gmail.com> writes:
>
> > checking for a BSD-compatible install... build/install-sh -c
> > configure: Apache Portable Runtime (APR) library configuration
> > checking for APR... yes
> > checking APR version... 1.4.5
> > /u01/ct/ctapp/subversion-1.7.0/configure: bad substitution
> >
> >
> > I can't see what is causing the bad substitution error.
>
> >     printf "%s" "${output_flags# }"
>
> I'm guessing it's the # substitution in that line.  Which shell are you
> using?  It's a long time since I used Solaris but there used to be
> /usr/xpg4/bin/sh that was more like the shells commonly found on Linux.
> Perhaps you could use that. Alternatively you may be able to replace
> the above line with:
>
>      echo $output_flags
>
> it occurs in several places in configure.
>
> --
> Philip
>

Re: Error running configure for subversion 1.7.0

Posted by Philip Martin <ph...@wandisco.com>.
Ed Hillmann <ed...@gmail.com> writes:

> checking for a BSD-compatible install... build/install-sh -c
> configure: Apache Portable Runtime (APR) library configuration
> checking for APR... yes
> checking APR version... 1.4.5
> /u01/ct/ctapp/subversion-1.7.0/configure: bad substitution
>
>
> I can't see what is causing the bad substitution error.

>     printf "%s" "${output_flags# }"

I'm guessing it's the # substitution in that line.  Which shell are you
using?  It's a long time since I used Solaris but there used to be
/usr/xpg4/bin/sh that was more like the shells commonly found on Linux.
Perhaps you could use that. Alternatively you may be able to replace
the above line with:

      echo $output_flags

it occurs in several places in configure.

-- 
Philip