# mail/spamassassin fails to build: can't find the manpages



## Cthulhux (Oct 4, 2015)

Weird things are happening while I try to install mail/spamassassin:


```
===>  Registering installation for spamassassin-3.4.1_4
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/sa-awl.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/sa-compile.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/sa-learn.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/sa-update.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/spamassassin-run.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/spamassassin.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/spamc.1.gz: No such file or directory
pkg-static: Unable to access file /usr/ports/mail/spamassassin/work/stage/usr/local/share/man/man1/spamd.1.gz: No such file or directory
*** Error code 74
```

What has gone wrong recently?


----------



## talsamon (Oct 4, 2015)

Update your portstree:

It is related to this changes:
https://svnweb.freebsd.org/ports/he..._changes=0&r1=396892&r2=396891&pathrev=396892
or
/usr/ports/CHANGES:

```
20150914:
AUTHOR: mat@FreeBSD.org

  Introducing the %%PERL5_MAN1%% PLIST_SUB entry, as Perl now installs man1
  pages in the same prefix as man3 pages.
```

The new pkg-plist (this is only a part) looks like this:

```
%%PERL5_MAN3%%/spamassassin-run.3.gz
%%PERL5_MAN1%%/sa-awl.1.gz
%%PERL5_MAN1%%/sa-compile.1.gz
%%PERL5_MAN1%%/sa-learn.1.gz
%%PERL5_MAN1%%/sa-update.1.gz
%%PERL5_MAN1%%/spamassassin-run.1.gz
%%PERL5_MAN1%%/spamassassin.1.gz
%%PERL5_MAN1%%/spamc.1.gz
%%PERL5_MAN1%%/spamd.1.gz
```


----------



## protocelt (Oct 4, 2015)

spamassassin-3.4.1_4 was added to the ports tree about six hours ago so I would assume the OP's ports tree is up to date.


----------



## Cthulhux (Oct 4, 2015)

With an updated portstree, some of the dependencies still have similar errors:


```
===>>> mail/spamassassin >> mail/p5-Mail-SPF (1/2)

===>  Installing for p5-Mail-SPF-2.9.0_3
===>  Registering installation for p5-Mail-SPF-2.9.0_3 as automatic
pkg-static: Unable to access file /usr/ports/mail/p5-Mail-SPF/work/stage/usr/local/share/man/man1/spfquery.pl.1.gz: No such file or directory
*** Error code 74

Stop.
make: stopped in /usr/ports/mail/p5-Mail-SPF
```

I did a `portsnap fetch update` first.


----------



## protocelt (Oct 4, 2015)

Which version of ports-mgmt/pkg and lang/perl does `pkg info` say you have installed currently?


----------



## Cthulhux (Oct 4, 2015)

```
pkg-1.6.1
```


```
pkg: No package(s) matching perl
```

However, `perl -v` says it's Perl 5.22.0.


----------



## protocelt (Oct 4, 2015)

Ok, so Perl is possibly the culprit here. lang/perl5.20 is the default Perl right now. Is there a specific reason your using lang/perl5.22?


----------



## Cthulhux (Oct 4, 2015)

Yes, I prefer to have the newest version for some of my own Perl scripting. When I updated the default Perl version, I did not suspect that the default port is broken.


----------



## protocelt (Oct 4, 2015)

In that case, do you have DEFAULT_VERSIONS=perl5.22 set in your /etc/make.conf file? This is needed in your case according to /usr/ports/UPDATING:

```
20150914:
  AFFECTS: users of lang/perl5*
  AUTHOR: mat@FreeBSD.org

  Binary package users can ignore this.

  The way lang/perl5* ports install themselves has changed.  From now on, only
  the default Perl port (currently 5.20), or the version listed in
  DEFAULT_VERSIONS, will install /usr/local/bin/perl.

  If you are NOT using the default version of Perl (as of right now, it is
  5.20) you MUST add a line setting the version you are using to your
  /etc/make.conf, to preserve /usr/local/bin/perl:

  DEFAULT_VERSIONS+=  perl5=5.xx

  If your Perl package name is not called perl5-5.xx.y but perl5.xx-5.xx.y,
  you will need to rename it so that portupgrade and portmaster do not get
  confused:

  pkg set -n perl5.xx:perl5

  After this date, to migrate from one Perl version to the other, you must
  first put the DEFAULT_VERSIONS line in your make.conf, and then, for example,
  if you want to move from 5.20 to 5.22, do:

  pkg set -o lang/perl5.20:lang/perl5.22
  portmaster `pkg shlib -qR libperl.so.5.20`

  If you do not do that, you will replace your default Perl 5.20 installation
  (one that has /usr/local/bin/perl) with an installation that does not have
  /usr/local/bin/perl, and it will break everything.
```


----------



## Cthulhux (Oct 4, 2015)

Well, it's:


```
DEFAULT_VERSIONS=php=56
DEFAULT_VERSIONS+=perl5=5.22
```

As described in UPDATING. But that does not fix the issue.


----------



## protocelt (Oct 5, 2015)

Just to rule it out, did you follow the rest of the instructions in the UPDATING entry I posted above? Also what is the output of `pkg info perl\*` on the machine?


----------



## Cthulhux (Oct 5, 2015)

`pkg info perl\*` says:


```
perl5.22-5.22.0_4
```

Yes, I performed all of the steps in UPDATING.


----------



## talsamon (Oct 5, 2015)

Looks your pkg-plist in mail/spamassassin port like my example above?
And what is in /etc/make.conf?


----------



## Cthulhux (Oct 5, 2015)

Oh, sorry, I missed your posting! Yes, it does:


```
%%PERL5_MAN3%%/spamassassin-run.3.gz
%%PERL5_MAN1%%/sa-awl.1.gz
%%PERL5_MAN1%%/sa-compile.1.gz
%%PERL5_MAN1%%/sa-learn.1.gz
%%PERL5_MAN1%%/sa-update.1.gz
%%PERL5_MAN1%%/spamassassin-run.1.gz
%%PERL5_MAN1%%/spamassassin.1.gz
%%PERL5_MAN1%%/spamc.1.gz
%%PERL5_MAN1%%/spamd.1.gz
```

(With some more entries like this.)


----------



## protocelt (Oct 5, 2015)

Unfortunately I'm out of ideas at the moment. Possibly it's an incompatibility with the version of Perl your using but I really don't know.


----------



## Cthulhux (Oct 5, 2015)

Why would my Perl version make the mail/spamassassin port lose its man files?

Still, thank you for trying!


----------



## protocelt (Oct 5, 2015)

Cthulhux said:


> Why would my Perl version make the mail/spamassassin port lose its man files?
> 
> Still, thank you for trying!


I've seen a similar error in the past with pkg(8) when Perl wasn't upgraded correctly. Whether Perl was actually at fault or there was a different issue, I don't know, but the problems disappeared after upgrading it correctly. That however seems not to be the case here.


----------



## lethe (Oct 5, 2015)

I have the same problem. It fails at building the man pages. Perl v5.14.4.

However on another system with v5.20.3, it builds successfully.

Edit: Fixed by upgrading to Perl 5.20.3.


----------



## Cthulhux (Oct 6, 2015)

I already use the newest Perl, I can't upgrade to a newer version.


----------



## fossette (Oct 9, 2015)

I had this cant-install-docs issues too, but with ffmpeg.  Since it apears to always be `perl` related, it's a case of _SAME BUG DIFFERENT PORT_.  I deinstalled perl 5.20, then installed it again (even though perl was already at 5.20).  That fixed the problem for me because, as it turned out, the tool `/usr/local/bin/perl` was missing.

Since you configured your environment to use perl 5.22, maybe re-installing it again will fix the problem.

Dominique.


----------



## Cthulhux (Oct 9, 2015)

`/usr/local/bin/perl` works here...


----------



## e0je (Oct 16, 2015)

Same issue here... Perl v5.20.3. Can't install spamd because it cannot locate man pages in work directory.

Solution, build port:
`cd /usr/ports/mail/spamassassin; make
cp -R  work/stage/usr/local/lib/perl5/site_perl/man work/stage/usr/local/share/man
make install`


----------

