Subject: Re: make: RE substitution error: Invalid preceding regular expression
To: Marc Recht <>
From: Jeremy C. Reed <>
List: tech-pkg
Date: 11/19/2003 07:57:36
On Wed, 19 Nov 2003, Marc Recht wrote:

> > I am now using latest bmake too (as installed from pkgsrc today).
> I'm a bit confused. Does it fail with pkgsrc's bmake and work with the
> bootstrap-pkgsrc one or fail with both ? (And the system is Linux ?)

It does not work with my old bmake or newest bmake (from pkgsrc). (I never
tried with bootstrap-pkgsrc version; at least I am pretty sure my old
bmake was not from bootstrap-pkgsrc since it was from a package.)

> > I tried your suggested fix above. It did not work for me. At first, I
> > don't think that is used anyways, because PKGNAME_REQD does not appear to
> > be defined (according to show-var target). But I commented out that line
> > and it continued fine.
> PKGNAME_REQD is defined (at make "target" time), see line 4029 of
> And there is the problem since it's defined quoted now.
> tries to work for quoted and unquoted PKGNAME_REQDs. Therefore
> the \'?. But the problem for "your" bmake seems to be the \' part. So,
> maybe rewriting it to:
> PYTHON_VERSION_REQD?= "${PKGNAME_REQD:C/^'?py([^-]*)-.*/\1/}"
> works ?

I see yours has double-quotes around it. So I will try now.

That didn't work either. I get nine lines of:

bmake: RE substitution error: Invalid preceding regular expression

If I get rid of the question mark (?) (and with or without the double
quotes around it) then it does not have a RE substitution error, but
PYTHON_VERSION_REQD is empty so it fails.

I copied and pasted your suggestion above just to make sure:

line 177: Unassociated shell command "error: no valid Python version"
line 184: Could not find /

> > I don't know where the problem is. I will send-pr this if I can reproduce
> > on another system.
> >
> > My workaround is to undef PYTHON_VERSION_REQD (or define it) in
> > (My PYTHON_VERSION_REQD=23pth in my Makefile is not used.)
> That doesn't work for every package, since not all work with Python 2.3.

Yes, I understand. It is my workaround so I can install gramps. My other
workaround is to just make sure each python prerequisite is installed

   Jeremy C. Reed