# building mod_perl2: Invalid perl5 version



## AndyUKG (Sep 17, 2019)

Hi all,

  I've just updated a server, freebsd-upgrade to 11.2-RELEASE-p14, and all packages via pkg upgrade. No errors on either of these steps.
Following this I have an issue with httpd core dumping, specifically this server runs Request Tracker and uses mod_perl2. Apache is up currently so thats good, when I do issue a restart it does a config validation check, comes back ok then core dumps


```
# /usr/local/etc/rc.d/apache24 restart
Performing sanity check on apache24 configuration:
Syntax OK
Segmentation fault (core dumped)
```

So before raising the issue on the mod_perl forum I thought what else can I try, so I decided to try compiling my own mod_perl2. This then gives this error:


```
# make
===>  ap24-mod_perl2-2.0.10,3 Invalid perl5 version 5.28.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/mod_perl2
```

So I'm wondering where it gets the version requirement from as it doesn't seem to be defined in the Makefile, anyone know where this is? I'm also wondering how things got into this mess...

thanks for any replies, cheers, Andy.

PS, sorry just realised have posted this in the wrong section...


----------



## SirDice (Sep 18, 2019)

AndyUKG said:


> I've just updated a server, freebsd-upgrade to 11.2-RELEASE-p14,


Keep going, you're not done yet. You should upgrade to 11.3, 11.2 will be end-of-life soon. 


Unless you have a good reason to build from ports I suggest you use packages and upgrade everything. The default Perl version changed to 5.30 some time ago and I'm guessing you have an odd mix of Perl dependencies now. 






						[ports] Revision 508733
					






					svnweb.freebsd.org


----------



## AndyUKG (Sep 18, 2019)

SirDice said:


> Keep going, you're not done yet. You should upgrade to 11.3, 11.2 will be end-of-life soon.


Yep, aware of that, but 11.2 shouldn't be broken!



SirDice said:


> Unless you have a good reason to build from ports I suggest you use packages and upgrade everything. The default Perl version changed to 5.30 some time ago and I'm guessing you have an odd mix of Perl dependencies now.



But I was building from packages, and I did upgrade everything. I mentioned this in my original post. Pkg says there are no updates available, but my perl version is not 5.30 so this seems to possibly be the root issue. Why would this have occured? To reiterate, I have not installed anything from ports, I mearly tried to compile mod_perl2 which faild.


```
# pkg info|grep perl5
...
perl5-5.28.2                   Practical Extraction and Report Language
# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
```

thanks, Andy.


----------



## SirDice (Sep 18, 2019)

AndyUKG said:


> But I was building from packages,


This is a conflicting statement. 



AndyUKG said:


> Pkg says there are no updates available, but my perl version is not 5.30 so this seems to possibly be the root issue. Why would this have occured?


I suspect this is due to the differences between quarterly packages and latest ports. 

You might want to switch to the latest packages, those follow the ports tree more closely. The quarterly packages are updated once every three months (and may not have switched to Perl 5.30 yet).


----------



## AndyUKG (Sep 18, 2019)

SirDice said:


> This is a conflicting statement.



Sorry, poor wording. Installing from packages, no compiling.



SirDice said:


> I suspect this is due to the differences between quarterly packages and latest ports.
> 
> You might want to switch to the latest packages, those follow the ports tree more closely. The quarterly packages are updated once every three months (and may not have switched to Perl 5.30 yet).



So its not the case that binary packages hace moved to 5.30 as per your original reply? Just to avoid misunderstandings, this has branched into two issues, firstly if binary packages perl version should be 5.30 why isn't mine? It should have nothing to do with latest ports if I am using purely binary packages.
Secondly, as per my original question, how do I know what perl version mod_perl2 requires? Where is that information written?

thanks, Andy.

PS Ah ok, ports are always latest? But pkg I can choose between quarterly and latest?


----------



## AndyUKG (Sep 18, 2019)

Ok, so if I change to latest binary packages I see:


```
perl5: 5.28.2 -> 5.30.0
```

I've never used latest previously, are these considered stable? Is the only pro to quarterly that they change less frequently?

thanks, Andy.


----------



## SirDice (Sep 18, 2019)

AndyUKG said:


> So its not the case that binary packages hace moved to 5.30 as per your original reply?


The latest binary packages have. 



AndyUKG said:


> Just to avoid misunderstandings, this has branched into two issues, firstly if binary packages perl version should be 5.30 why isn't mine?


2019Q3 was split off _before_ the change. 



AndyUKG said:


> Secondly, as per my original question, how do I know what perl version mod_perl2 requires? Where is that information written?


In the port's Makefile:

```
USES=           apache:2.2+ cpe gmake perl5
```
This means it will use whatever version is set as the default. Which is further defined in /usr/ports/Mk/Uses/perl5.mk:





						[ports] Contents of /head/Mk/Uses/perl5.mk
					






					svnweb.freebsd.org
				




If you try to build from the latest ports tree, it will default to Perl 5.30.


----------



## anlashok (Sep 18, 2019)

AndyUKG said:


> Secondly, as per my original question, how do I know what perl version mod_perl2 requires? Where is that information written?



freshports.org/www/mod_perl2 also lists the run time dependencies including the one for Perl>=5.30


----------



## AndyUKG (Sep 19, 2019)

thanks for the replies guys. Will test on a clone system using the latest packages to see if that fixes the core dump issue...


----------

