Opened 14 years ago

Closed 12 years ago

#23993 closed defect (fixed)

mod_perl2 build fails with perl5.10 or perl5.12 without +threads

Reported by: gisburne@… Owned by: ryan@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: robertoschwald (Robert Oschwald), ghosthound, astricker@…
Port: perl5.10 perl5.12 mod_perl2

Description (last modified by mf2k (Frank Schima))

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_perl2/work/mod_perl-2.0.4" && /usr/bin/make -j2 all " returned error 2
DEBUG: Backtrace: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_perl2/work/mod_perl-2.0.4" && /usr/bin/make -j2 all " returned error 2
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 9)
    invoked from within
"$procedure $targetname"

Attachments (3)

debug_log_mod_perl2.rtf (34.7 KB) - added by gisburne@… 14 years ago.
run as port -d install mod_perl2
perl5.10-portfile.diff (431 bytes) - added by nrh@… 14 years ago.
perl5.10 portfile diff (disables multiplicity)
mod_perl2-portfile.diff (601 bytes) - added by nrh@… 14 years ago.
mod_perl2 post-destroot fix

Download all attachments as: .zip

Change History (21)

comment:1 Changed 14 years ago by mf2k (Frank Schima)

Description: modified (diff)
Keywords: mod_perl2 removed
Owner: changed from macports-tickets@… to ryan@…
Port: mod_perl2 added

More information would be helpful. Please attach the complete debug log.

Changed 14 years ago by gisburne@…

Attachment: debug_log_mod_perl2.rtf added

run as port -d install mod_perl2

comment:2 Changed 14 years ago by gisburne@…

I'm attached complete debug log.

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: install port mod_perl2 on MacOSX 10.6.2mod_perl2 build fails with perl5.10 or perl5.12

I see several other reports of this problem by searching Google. mod_perl2 @2.0.4 is apparently not compatible with perl5.10 (which I see you're using) or perl5.12. Use perl5.8 instead.

comment:4 Changed 14 years ago by jagerman@…

The fix is trivial: look for "5.8*" in the Portfile and change it to "5.*". Doing that makes mod_perl build and work with 5.10/5.12 (tested with 5.12, but should also work with 5.10).

comment:5 in reply to:  4 Changed 14 years ago by nstanger (Nigel Stanger)

Replying to jagerman@…:

The fix is trivial: look for "5.8*" in the Portfile and change it to "5.*". Doing that makes mod_perl build and work with 5.10/5.12 (tested with 5.12, but should also work with 5.10).

Nope. Just tried that fix with 5.10, same error. In fact, I can't see how that fix would help anyway, as the only reference to "5.8*" is in post-destroot. The build never reaches that far, because it dies during the compile phase.

Changed 14 years ago by nrh@…

Attachment: perl5.10-portfile.diff added

perl5.10 portfile diff (disables multiplicity)

Changed 14 years ago by nrh@…

Attachment: mod_perl2-portfile.diff added

mod_perl2 post-destroot fix

comment:6 Changed 14 years ago by nrh@…

related thread on the perl dev list: http://www.mail-archive.com/dev@perl.apache.org/msg12588.html disabling usemultiplicity and fixing the destroot makes this work, fwiw. patches attached. (caveat: i have no idea what multiplicity does - there seems to be very little documentation on this option)

comment:7 Changed 13 years ago by michael@…

It looks like all you need to do is rebuild perl5.10 or perl5.12 using the "threads" variant.

mod_perl mistakenly assumes the MULTIPLICITY feature implies the USE_ITHREADS feature, which is not true and won't be fixed upstream for some time.

The maintainer is advised to check whether USE_ITHREADS is defined in the output of "perl -V" and abort the build early if not present, with a helpful message to the user explaining what to do.

comment:8 Changed 13 years ago by cmconnelly (Claire Connelly)

My experience was that you have to do all of the following to get things working:

  • (Re)install perl5.12 with the +threads variant.
  • port clean mod_perl2 port (or it will keep looking for old files).
  • Edit the Portfile for mod_perl2 to change 5.8* to 5.* in the post-destroot section.

comment:9 in reply to:  8 Changed 13 years ago by nstanger (Nigel Stanger)

Replying to cmc@…:

My experience was that you have to do all of the following to get things working:

  • (Re)install perl5.12 with the +threads variant.
  • port clean mod_perl2 port (or it will keep looking for old files).
  • Edit the Portfile for mod_perl2 to change 5.8* to 5.* in the post-destroot section.

I can confirm that this also works for me (finally!).

comment:10 Changed 13 years ago by pixilla (Bradley Giesbrecht)

After patching with mod_perl2-portfile.diff:
build succeeds
but activate collides with p5-apache-test on ${prefix}/share/man/man3/Apache::Test.3pm.gz

--->  Activating mod_perl2 @2.0.4_0
Error: Target org.macports.activate returned: Image error: /opt/macports-test/share/man/man3/Apache::Test.3pm.gz is being used by the active p5-apache-test port.

comment:11 Changed 13 years ago by jon.hermansen@…

Especially now, with the default_variant for perl5 being 5.12, I think that we should make this change to mod_perl2.

The patch is working for me, latest apache2 and perl5.12, both universal.

comment:12 Changed 13 years ago by wqcoleman@…

@cmc@… +1

comment:13 Changed 13 years ago by robertoschwald (Robert Oschwald)

Cc: robertoschwald@… added

Cc Me!

comment:14 Changed 13 years ago by jmroot (Joshua Root)

Cc: ricci@… added

Adding the perl maintainer to cc since there are changes to it proposed here.

comment:15 Changed 13 years ago by jmroot (Joshua Root)

Port: perl5.10 perl5.12 added
Summary: mod_perl2 build fails with perl5.10 or perl5.12mod_perl2 build fails with perl5.10 or perl5.12 without +threads

BTW the mod_perl2 destroot issue is already fixed; that was #23608.

comment:16 Changed 13 years ago by astricker@…

Cc: astricker@… added

Cc Me!

comment:17 Changed 13 years ago by astricker@…

I can confirm that the current port (where the patch above is already applied) and perl5.14 with +threads will work. As I switched to Perl 5.14 I've had to rebuild all perl packages listed with port dependents perl5. I don't know if switching to the +threads variant alone also requires rebuilding?

comment:18 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.