# Exim 4.71 sed: 1: "s,XX_CFLAGS_XX,-O2 -fno ...": bad flag in substitute command: '-'



## joint (Mar 29, 2010)

I had Exim 4.71 running fine, and after Perl-5.8.9_3 updated to Perl-5.10_1 with these steps:
0) Fix pkgdb.db (for safety):
`pkgdb -Ff`

    1) Reinstall perl with new 5.10:
`portupgrade -o lang/perl5.10 -f perl-5.8.\*`

    2) Reinstall everything that depends on Perl:
`portupgrade -fr perl`

And during 
`# portupgrade -fr perl`
the Exim package was knocked off unexpectedly.

Tried to deinstall it and after I tried install and got Error:   

```
# cd /usr/ports/mail/exim/ && make install clean
===>   exim-4.71 depends on file: /usr/local/lib/libcrypto.so.7 - found
===>   exim-4.71 depends on file: /usr/local/bin/perl5.10.1 - found
===>   exim-4.71 depends on shared library: pcre.0 - found
===>   exim-4.71 depends on shared library: iconv.3 - found
===>  Configuring for exim-4.71
sed: 1: "s,XX_CFLAGS_XX,-O2 -fno ...": bad flag in substitute command: '-'
*** Error code 1

Stop in /usr/ports/mail/exim.
*** Error code 1

Stop in /usr/ports/mail/exim.
```

Anybody does have ideas on how to fix the issue and install the Exim back on again, please?


----------



## OH (Mar 29, 2010)

You have CFLAGS set in your /etc/make.conf?


----------



## gcooper@ (Mar 29, 2010)

The message is a bit confusing, but it boils down to a bug in the substitution command; in particular the fact that it doesn't escape regexp special chars, in this case `-' -> `\-'.

Please contact the maintainer (krion@? might be better to contact ports@ because krion@'s been of the map for a while), and let them know about this (and the fact that they probably need to remove the -E -- which would solve this problem).


----------



## joint (Mar 29, 2010)

OH said:
			
		

> You have CFLAGS set in your /etc/make.conf?


Nope.
Here are the lines in make.conf:

```
CPUTYPE=athlon64
WITHOUT_X11=yes

NO_SENDMAIL=true

# added by use.perl 2010-03-29 08:58:44
PERL_VERSION=5.10.1
```


----------



## joint (Mar 29, 2010)

gcooper@ said:
			
		

> The message is a bit confusing, but it boils down to a bug in the substitution command; in particular the fact that it doesn't escape regexp special chars, in this case `-' -> `\-'.
> 
> Please contact the maintainer (krion@? might be better to contact ports@ because krion@'s been of the map for a while), and let them know about this (and the fact that they probably need to remove the -E -- which would solve this problem).



Thank you!
The message to maintainer has been sent.


----------

