Bug 200697 - www/mod_perl2: 2.0.9-rc2 breaks on apache22 unless ITHREADS is defined
Summary: www/mod_perl2: 2.0.9-rc2 breaks on apache22 unless ITHREADS is defined
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Olli Hauer
Depends on:
Reported: 2015-06-07 17:18 UTC by Nick Hilliard
Modified: 2015-06-09 03:55 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (apache)

fix for breakage caused by commit 1682366 (909 bytes, text/x-chdr)
2015-06-07 17:18 UTC, Nick Hilliard
no flags Details
Broken plist for 2.0.9-rc2 (1.12 KB, patch)
2015-06-07 17:30 UTC, Nick Hilliard
no flags Details | Diff
complete patch for mod_perl2 ithread detection v01 (3.59 KB, patch)
2015-06-07 21:20 UTC, Nick Hilliard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Hilliard 2015-06-07 17:18:55 UTC
Created attachment 157505 [details]
fix for breakage caused by commit 1682366

mod_perl-2.0.9-rc2 fails to compile on freebsd-10.1 with apache22 installed due to mod_perl svn commit 1682366, unless perl is built with ITHREADS.

This was fixed in the main distribution a couple of commits later, and there's a patch for it here:

Comment 1 Nick Hilliard 2015-06-07 17:30:23 UTC
Created attachment 157506 [details]
Broken plist for 2.0.9-rc2
Comment 2 Nick Hilliard 2015-06-07 17:31:27 UTC
pkg-plist is also broken in mod_perl2-2.0.9-rc2.  See the second patch to fix this problem
Comment 3 Olli Hauer freebsd_committer 2015-06-07 19:55:21 UTC
Hi Nick,

patch one is OK, but in my tests on 10.1 with perl5.20 I don't see issues with pkg-plist.

Can you provide more details about your 
- perl version plus make showconfig -C lang/perl5.nn
- OS release
Comment 4 Nick Hilliard 2015-06-07 21:19:32 UTC
Hi Olli,

I had a look at the distribution and these files are autogenerated using the xs/maps/modperl_types.map file, but they're only autogenerated if PERL_HAS_ITHREADS has been defined in mod_perl2.  This is defined if $Config{useithreads} is present in the perl configuration.  So if someone builds a single-threaded perl installation, then the ModPerl::{Interpreter,InterpPool,TiPool,TiPoolConfig} modules won't be built and the pkg-plist will throw up an error.

The port will need to test for $Config{useithreads} and then create conditional pkg-plist entries.   The attached complete patch for this problem should fix this - it works on my single-threaded installation (perl 5.20 / freebsd-10.1-amd64 / apache22).
Comment 5 Nick Hilliard 2015-06-07 21:20:12 UTC
Created attachment 157524 [details]
complete patch for mod_perl2 ithread detection v01
Comment 6 Olli Hauer freebsd_committer 2015-06-08 05:21:18 UTC
Hi Nick,

Thanks for the patches, anyway can you give a hint how you build your perl5 so I can verify in a test build?
Comment 7 Nick Hilliard 2015-06-08 11:45:01 UTC

Comment 8 commit-hook freebsd_committer 2015-06-08 21:54:03 UTC
A commit references this bug:

Author: ohauer
Date: Mon Jun  8 21:53:23 UTC 2015
New revision: 388886
URL: https://svnweb.freebsd.org/changeset/ports/388886

  - add patch from upstream trunk
  - mark broken with perl5.22.x
  - fix pkg-plist if build against apache22 and perl with THREADS=off

  - Empty commit with correct PR number

  PR:		200697
  Submitted by:	nick(_at_)foobar.org

Comment 9 Olli Hauer freebsd_committer 2015-06-08 22:11:46 UTC
Patches committed in modified version, else pkg-plist is not correct for apache24.

I have another report from a user, will keep the PR open until I have a positive feedback from that user.
Comment 10 Terry Kennedy 2015-06-08 23:36:31 UTC
Builds and runs fine for me now (apache22-2.2.29_5, perl5-5.18.4_14).