You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by bluedome <ad...@gmail.com> on 2012/09/19 21:43:27 UTC

mod_perl build with perlbrew


I'm building mod_perl with a perl built using perlbrew.

The build succeeds but make test fails because @INC is not correct.

@INC for the perlbrew-built perl is:

  @INC:
   
/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
    /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
    /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
    /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0

I built mod_perl with this perl, so it seems like it should keep this in
INC, but it doesn't.  When I run
apache the INC is:

/usr/sbin/httpd  -d /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t -f
/opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf -D
APACHE2 
using Apache/2.2.15 (prefork MPM)

waiting 120 seconds for server to start: .Can't locate lib.pm in @INC (@INC
contains:
/opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/main
/opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/perlmodule-vh
/usr/lib/site_perl/5.16.0/x86_64-linux /usr/lib/site_perl/5.16.0
/usr/lib/5.16.0/x86_64-linux /usr/lib/5.16.0).

I have tried modifying the INC setting during the mod_perl build by using a
command of the form:

perl Makefile.PL MP_APXS=/usr/sbin/apxs INC="-I.... -I..."

and also I've tried setting LD_LIBRARY_PATH environment variable to those
paths when running httpd, and still getting this error.

My questions are:

1. why does mod_perl lose the INC that is required to run the perl that it
is built with?
2. what do I try next?

Thanks
-- 
View this message in context: http://old.nabble.com/mod_perl-build-with-perlbrew-tp34454307p34454307.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


Re: mod_perl build with perlbrew

Posted by Perrin Harkins <pe...@elem.com>.
On Wed, Sep 19, 2012 at 3:43 PM, bluedome <ad...@gmail.com> wrote:
> I'm building mod_perl with a perl built using perlbrew.
>
> The build succeeds but make test fails because @INC is not correct.

One thing to consider is that I think perlbrew sets the PERL5LIB
environment variable.  If you aren't running in a perlbrew environment
when you start httpd, that won't be there.

- Perrin

Re: mod_perl build with perlbrew

Posted by Bill Moseley <mo...@hank.org>.
On Wed, Sep 19, 2012 at 12:43 PM, bluedome <ad...@gmail.com> wrote:

>
>
> I'm building mod_perl with a perl built using perlbrew.
>
> The build succeeds but make test fails because @INC is not correct.
>
> @INC for the perlbrew-built perl is:
>
>   @INC:
>
>
> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
>     /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
>     /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
>     /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0
>
> I built mod_perl with this perl, so it seems like it should keep this in
> INC, but it doesn't.  When I run
> apache the INC is:
>
> /usr/sbin/httpd  -d /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t
> -f
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf -D
> APACHE2
> using Apache/2.2.15 (prefork MPM)
>

I'm not sure I had the same problem, but it was kind of a pain to make
mod_perl work with Perlbrew.  I wanted to be able to simply run "cpanm
mod_perl2" and have it installed from CPAN.   But, that means not
installing modules in the default location.

So, I added this to a local copy of mod_perl's Makefile.PL and then saved
the new mod_perl tarball in our local repo.


+if ( $ENV{PERLBREW_ROOT} ) {
+    my $root = "$ENV{PERLBREW_ROOT}/perls/$ENV{PERLBREW_PERL}";
+    die "$root directory not found" unless -d $root;
+    push @ARGV, "MP_AP_DESTDIR=$root";
+}
+else {
+    die "Must be in PERLBREW environment";
+}

I also have to set DESTDIR, although that might be for libapreq2.

The other odd thing is tests failed because the tests were somehow loading
the exiting httpd.conf files in /etc/httpd.   Shouldn't do that, right?



-- 
Bill Moseley
moseley@hank.org

Re: mod_perl build with perlbrew

Posted by bluedome <ad...@gmail.com>.

It looks like these test files are not being created because MakeMaker is
failing.  During the 
perl Makefile.PL command I'm getting:

Unparsable version '' for prerequisite Apache::Test at
lib/ModPerl/BuildMM.pm line 153.

Apache::Test 1.38 is installed with cpanm, and anyway the mod_perl source
contains a copy of it.


On Wed, Sep 19, 2012 at 2:34 PM, bluedome <ad...@gmail.com> wrote:
>
> That works, thanks.
>
> Now it can't locate: ApacheTest/PerlRequireTest.pm, is that a dynamically
> created module? Because the file isn't in the mod_perl source tree at all.

It is created as a test file:

phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ find . -name
'PerlRequireTest.pm'
./t/htdocs/testdirective/main/ApacheTest/PerlRequireTest.pm
./t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm

phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ more
t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm

package ApacheTest::PerlRequireTest;
$ApacheTest::PerlRequireTest::MAGIC = 'PerlRequired by VirtualHost';
1;


-- 
View this message in context: http://old.nabble.com/mod_perl-build-with-perlbrew-tp34454307p34458276.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


Re: mod_perl build with perlbrew

Posted by steve timoshuk <st...@gmail.com>.
To whom this may concern;

  I've had my iPhone/gmail/2 of my laptops hacked and not been able to use
them over the past 2months, I finally got into my email and I found this
message, I've NEVER emailed you in my life before, and this modperl is part
of the problem.. He's changing my operating system around so he can control
al my devices (laptops/iPhone) and any further information you send is
helping this POS hack my devices.. I don't know about programming but I'm
sure you understand, this guy is being tracked by the FBI, I've been in
contact with them for the past 2 weeks.. If any further emails come to you
regarding questions about programming from this email address please do
what u can to see where it's coming from.  I have a very good idea who it
is (my friends little brother) he is a hacker and has control of numerous
computers and cell phones.  If there's anything u can do please help me
out. My # is 714 366 5142, I'd really appreciate it of you could call me
and explain what exactly he is doing and how I can erase it from my
laptops/phone.  When I'm in single user mode, if I hit ESC 5-6 times a list
pops up of 1480 different commands.  I've been locked out of my computers,
had them wiped, I can't even use them!  Please call me at your earliest
convenience!  Basically what I've found is my hard drive or EFI is
partitioned and I can't get it off, I've partitioned and wiped the hard
drive numerous times with no success.. I'm hoping you can explain how to
lock this guy out.. He has a DNS, actually multiple DNSs running and
they're hidden 30sec from after I turn my laptop on from what I can see in
logs.  Thank you and please call ASAP.  Don't email as this is the first
time I've gotten in and seen any of these messages!

Steve T.
714 366 5142
714 281 3617

On Wednesday, September 19, 2012, Fred Moyer wrote:

> On Wed, Sep 19, 2012 at 2:34 PM, bluedome <adriannye@gmail.com<javascript:;>>
> wrote:
> >
> > That works, thanks.
> >
> > Now it can't locate: ApacheTest/PerlRequireTest.pm, is that a dynamically
> > created module? Because the file isn't in the mod_perl source tree at
> all.
>
> It is created as a test file:
>
> phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ find . -name
> 'PerlRequireTest.pm'
> ./t/htdocs/testdirective/main/ApacheTest/PerlRequireTest.pm
> ./t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm
>
> phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ more
> t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm
>
> package ApacheTest::PerlRequireTest;
> $ApacheTest::PerlRequireTest::MAGIC = 'PerlRequired by VirtualHost';
> 1;
>
> >
> >
> > Andy Colson-2 wrote:
> >>
> >> On 9/19/2012 2:43 PM, bluedome wrote:
> >>>
> >>>
> >>> I'm building mod_perl with a perl built using perlbrew.
> >>>
> >>> The build succeeds but make test fails because @INC is not correct.
> >>>
> >>> @INC for the perlbrew-built perl is:
> >>>
> >>>    @INC:
> >>>
> >>>
> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
> >>>
>  /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
> >>>
> >>> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
> >>>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0
> >>>
> >>> I built mod_perl with this perl, so it seems like it should keep this
> in
> >>> INC, but it doesn't.  When I run
> >>> apache the INC is:
> >>>
> >>> /usr/sbin/httpd  -d
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t
> >>> -f
> >>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf
> -D
> >>> APACHE2
> >>> using Apache/2.2.15 (prefork MPM)
> >>>
> >>> waiting 120 seconds for server to start: .Can't locate lib.pm in @INC
> >>> (@INC
> >>> contains:
> >>>
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/main
> >>>
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/perlmodule-vh
> >>> /usr/lib/site_perl/5.16.0/x86_64-linux /usr/lib/site_perl/5.16.0
> >>> /usr/lib/5.16.0/x86_64-linux /usr/lib/5.16.0).
> >>>
> >>> I have tried modifying the INC setting during the mod_perl build by
> using
> >>> a
> >>> command of the form:
> >>>
> >>> perl Makefile.PL MP_APXS=/usr/sbin/apxs INC="-I.... -I..."
> >>>
> >>> and also I've tried setting LD_LIBRARY_PATH environment variable to
> those
> >>> paths when running httpd, and still getting this error.
> >>>
> >>> My questions are:
> >>>
> >>> 1. why does mod_perl lose the INC that is required to run the perl that
> >>> it
> >>> is built with?
> >>> 2. what do I try next?
> >>>
> >>> Thanks
> >>>
> >>
> >> Maybe setting @INC in apache.conf?
> >>
> >> add:
> >>
> >> PerlSwitches -I
> >>
> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux"
> >>
> >> PerlSwitches -I
> >> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0"
> >>
> >> etc...
> >>
> >>
> >> its not perfect... but maybe?
> >>
> >> -Andy
> >>
> >>
> >>
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> http://old.nabble.com/mod_perl-build-with-perlbrew-tp34454307p34454815.html
> > Sent from the mod_perl - General mailing list archive at Nabble.com.
> >
>

Re: mod_perl build with perlbrew

Posted by Fred Moyer <fr...@redhotpenguin.com>.
On Wed, Sep 19, 2012 at 2:34 PM, bluedome <ad...@gmail.com> wrote:
>
> That works, thanks.
>
> Now it can't locate: ApacheTest/PerlRequireTest.pm, is that a dynamically
> created module? Because the file isn't in the mod_perl source tree at all.

It is created as a test file:

phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ find . -name 'PerlRequireTest.pm'
./t/htdocs/testdirective/main/ApacheTest/PerlRequireTest.pm
./t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm

phred@pooky ~/dev/svn/modperl/mod_perl-2.0 $ more
t/htdocs/testdirective/vh/ApacheTest/PerlRequireTest.pm

package ApacheTest::PerlRequireTest;
$ApacheTest::PerlRequireTest::MAGIC = 'PerlRequired by VirtualHost';
1;

>
>
> Andy Colson-2 wrote:
>>
>> On 9/19/2012 2:43 PM, bluedome wrote:
>>>
>>>
>>> I'm building mod_perl with a perl built using perlbrew.
>>>
>>> The build succeeds but make test fails because @INC is not correct.
>>>
>>> @INC for the perlbrew-built perl is:
>>>
>>>    @INC:
>>>
>>> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
>>>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
>>>
>>> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
>>>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0
>>>
>>> I built mod_perl with this perl, so it seems like it should keep this in
>>> INC, but it doesn't.  When I run
>>> apache the INC is:
>>>
>>> /usr/sbin/httpd  -d /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t
>>> -f
>>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf -D
>>> APACHE2
>>> using Apache/2.2.15 (prefork MPM)
>>>
>>> waiting 120 seconds for server to start: .Can't locate lib.pm in @INC
>>> (@INC
>>> contains:
>>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/main
>>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/perlmodule-vh
>>> /usr/lib/site_perl/5.16.0/x86_64-linux /usr/lib/site_perl/5.16.0
>>> /usr/lib/5.16.0/x86_64-linux /usr/lib/5.16.0).
>>>
>>> I have tried modifying the INC setting during the mod_perl build by using
>>> a
>>> command of the form:
>>>
>>> perl Makefile.PL MP_APXS=/usr/sbin/apxs INC="-I.... -I..."
>>>
>>> and also I've tried setting LD_LIBRARY_PATH environment variable to those
>>> paths when running httpd, and still getting this error.
>>>
>>> My questions are:
>>>
>>> 1. why does mod_perl lose the INC that is required to run the perl that
>>> it
>>> is built with?
>>> 2. what do I try next?
>>>
>>> Thanks
>>>
>>
>> Maybe setting @INC in apache.conf?
>>
>> add:
>>
>> PerlSwitches -I
>> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux"
>>
>> PerlSwitches -I
>> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0"
>>
>> etc...
>>
>>
>> its not perfect... but maybe?
>>
>> -Andy
>>
>>
>>
>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/mod_perl-build-with-perlbrew-tp34454307p34454815.html
> Sent from the mod_perl - General mailing list archive at Nabble.com.
>

Re: mod_perl build with perlbrew

Posted by bluedome <ad...@gmail.com>.
That works, thanks.

Now it can't locate: ApacheTest/PerlRequireTest.pm, is that a dynamically
created module? Because the file isn't in the mod_perl source tree at all.


Andy Colson-2 wrote:
> 
> On 9/19/2012 2:43 PM, bluedome wrote:
>>
>>
>> I'm building mod_perl with a perl built using perlbrew.
>>
>> The build succeeds but make test fails because @INC is not correct.
>>
>> @INC for the perlbrew-built perl is:
>>
>>    @INC:
>>
>> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
>>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
>>     
>> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
>>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0
>>
>> I built mod_perl with this perl, so it seems like it should keep this in
>> INC, but it doesn't.  When I run
>> apache the INC is:
>>
>> /usr/sbin/httpd  -d /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t
>> -f
>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf -D
>> APACHE2
>> using Apache/2.2.15 (prefork MPM)
>>
>> waiting 120 seconds for server to start: .Can't locate lib.pm in @INC
>> (@INC
>> contains:
>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/main
>> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/perlmodule-vh
>> /usr/lib/site_perl/5.16.0/x86_64-linux /usr/lib/site_perl/5.16.0
>> /usr/lib/5.16.0/x86_64-linux /usr/lib/5.16.0).
>>
>> I have tried modifying the INC setting during the mod_perl build by using
>> a
>> command of the form:
>>
>> perl Makefile.PL MP_APXS=/usr/sbin/apxs INC="-I.... -I..."
>>
>> and also I've tried setting LD_LIBRARY_PATH environment variable to those
>> paths when running httpd, and still getting this error.
>>
>> My questions are:
>>
>> 1. why does mod_perl lose the INC that is required to run the perl that
>> it
>> is built with?
>> 2. what do I try next?
>>
>> Thanks
>>
> 
> Maybe setting @INC in apache.conf?
> 
> add:
> 
> PerlSwitches -I 
> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux"
> 
> PerlSwitches -I 
> "/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0"
> 
> etc...
> 
> 
> its not perfect... but maybe?
> 
> -Andy
> 
> 
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/mod_perl-build-with-perlbrew-tp34454307p34454815.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


Re: mod_perl build with perlbrew

Posted by Andy Colson <an...@squeakycode.net>.
On 9/19/2012 2:43 PM, bluedome wrote:
>
>
> I'm building mod_perl with a perl built using perlbrew.
>
> The build succeeds but make test fails because @INC is not correct.
>
> @INC for the perlbrew-built perl is:
>
>    @INC:
>
> /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux
>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0
>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0/x86_64-linux
>      /opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/5.16.0
>
> I built mod_perl with this perl, so it seems like it should keep this in
> INC, but it doesn't.  When I run
> apache the INC is:
>
> /usr/sbin/httpd  -d /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t -f
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/conf/httpd.conf -D
> APACHE2
> using Apache/2.2.15 (prefork MPM)
>
> waiting 120 seconds for server to start: .Can't locate lib.pm in @INC (@INC
> contains:
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/main
> /opt/comms/be/code/apache_extensions/mod_perl-2.0.7/t/htdocs/testdirective/perlmodule-vh
> /usr/lib/site_perl/5.16.0/x86_64-linux /usr/lib/site_perl/5.16.0
> /usr/lib/5.16.0/x86_64-linux /usr/lib/5.16.0).
>
> I have tried modifying the INC setting during the mod_perl build by using a
> command of the form:
>
> perl Makefile.PL MP_APXS=/usr/sbin/apxs INC="-I.... -I..."
>
> and also I've tried setting LD_LIBRARY_PATH environment variable to those
> paths when running httpd, and still getting this error.
>
> My questions are:
>
> 1. why does mod_perl lose the INC that is required to run the perl that it
> is built with?
> 2. what do I try next?
>
> Thanks
>

Maybe setting @INC in apache.conf?

add:

PerlSwitches -I 
"/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0/x86_64-linux"

PerlSwitches -I 
"/opt/comms/be/perl5/perlbrew/perls/perl-5.16.0/lib/site_perl/5.16.0"

etc...


its not perfect... but maybe?

-Andy