pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/51359: www/ap2-perl: Undefined PLT symbol "modperl_handler_name" (symnum = 26)



>Number:         51359
>Category:       pkg
>Synopsis:       www/ap2-perl: Undefined PLT symbol "modperl_handler_name" (symnum = 26)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 26 13:20:00 +0000 2016
>Originator:     Kimihiro Nonaka
>Release:        HEAD (20160725)
>Organization:
>Environment:
NetBSD koharu.myhome.nonakap.org 7.99.34 NetBSD 7.99.34 (KOHARU) #3904: Tue Jul 26 01:56:03 JST 2016  nonaka%koharu.myhome.nonakap.org@localhost:/home/storage/snapshot/NetBSD/HEAD-20160725/obj.NetBSD-amd64/amd64/sys/arch/amd64/compile/KOHARU amd64
>Description:
nonaka@koharu$ sudo/etc/rc.d/apache start
Starting apache.
httpd: Syntax error on line 486 of /usr/pkg/etc/httpd/httpd.conf: Syntax error on line 40 of /usr/pkg/etc/httpd/httpd-vhosts.conf: Cannot load lib/httpd/mod_perl.so into server: /usr/pkg/lib/httpd/mod_perl.so: Undefined PLT symbol "modperl_handler_name" (symnum = 26)
>How-To-Repeat:
1) install mod_perl.
   # cd /usr/pkgsrc/www/ap2-perl && make install
2) configure httpd.conf.
   # echo "LoadModule perl_module lib/httpd/mod_perl.so" >> /usr/pkg/etc/httpd/httpd.conf
3) start apache http server.
   # /etc/rc.d/apache start

>Fix:
from mod_perl-2.0.9/README.

> C compiler:
>   The mod_perl source currently uses GNU89 inline semantics on GCC, but
>   GCC 5 defaults to newer C99 semantics.  If you see MP_INLINE related
>   warnings during the build and missing symbols when starting the test
>   suite, adding "-fgnu89-inline" to MP_CCOPTS may help.
>   There are also some reports of this happening with the Clang compiler,
>   where the corresponding option to try is "-std=gnu89".

The latest version of mod_perl already includes fixes.

http://svn.apache.org/viewvc?view=revision&revision=1733566

I create a patch from mod_perl r1733566.
Please apply it.

Index: www/ap2-perl/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap2-perl/distinfo,v
retrieving revision 1.20
diff -u -p -r1.20 distinfo
--- www/ap2-perl/distinfo	4 Nov 2015 02:46:48 -0000	1.20
+++ www/ap2-perl/distinfo	26 Jul 2016 08:31:31 -0000
@@ -4,4 +4,5 @@ SHA1 (mod_perl-2.0.9.tar.gz) = 5de301821
 RMD160 (mod_perl-2.0.9.tar.gz) = f4be60f1b4f4b5645aa7e97ad09d6b1871611bd4
 SHA512 (mod_perl-2.0.9.tar.gz) = 421d385f0d5d04cbe8c1e9559960eea86a017fa1bed88e614009143550baf852e2345001faff1fb849d9b3e6383786e0011f45ebc3e7d26ad57651fbad4e2f2c
 Size (mod_perl-2.0.9.tar.gz) = 3846584 bytes
+SHA1 (patch-lib_Apache2_Build.pm) = b2dd179612272ff6facb0280c00d9589aa93dad6
 SHA1 (patch-src_modules_perl_modperl_common_util.h) = a5fd094351fef2994b67c6c70abc18c772aec532
Index: www/ap2-perl/patches/patch-lib_Apache2_Build.pm
===================================================================
RCS file: www/ap2-perl/patches/patch-lib_Apache2_Build.pm
diff -N www/ap2-perl/patches/patch-lib_Apache2_Build.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ www/ap2-perl/patches/patch-lib_Apache2_Build.pm	26 Jul 2016 08:31:31 -0000
@@ -0,0 +1,48 @@
+$NetBSD$
+
+from mod_perl r1733566.
+
+-----
+Automatic compiler flags for gcc 5 and clang
+
+To make compilation easier on gcc5/clang hosts, this patch automatically selects the appropriate c89 option, when modperl is being built with either gcc 5 or clang.
+
+Tested by the author on Ubuntu 15.10 (with gcc 5.2.1), Fedora 23 (with gcc 5.3.1) and FreeBSD 10.2 (with clang).
+
+Thanks to Klaus S. Madsen <ksm%jobindex.dk@localhost> for the patch.
+-----
+
+--- lib/Apache2/Build.pm.orig	2015-06-19 05:13:53.000000000 +0900
++++ lib/Apache2/Build.pm	2016-07-26 17:27:03.000000000 +0900
+@@ -611,6 +611,14 @@ sub ap_ccopts {
+         $ccopts .= " -DMP_TRACE";
+     }
+ 
++    if ($self->has_gcc_version('5.0.0') && $ccopts !~ /-fgnu89-inline/) {
++        $ccopts .= " -fgnu89-inline";
++    }
++
++    if ($self->has_clang && $ccopts !~ /-std=gnu89/) {
++        $ccopts .= " -std=gnu89";
++    }
++
+     # make sure apr.h can be safely included
+     # for example Perl's included -D_GNU_SOURCE implies
+     # -D_LARGEFILE64_SOURCE on linux, but this won't happen on
+@@ -641,6 +649,16 @@ sub has_gcc_version {
+     return cmp_tuples(\@tuples, \@r_tuples) == 1;
+ }
+ 
++sub has_clang {
++    my $self = shift;
++
++    my $has_version = $self->perl_config('gccversion');
++
++    return 0 unless $has_version;
++
++    return $has_version =~ m/Clang/;
++}
++
+ sub cmp_tuples {
+     my ($num_a, $num_b) = @_;
+ 



Home | Main Index | Thread Index | Old Index