Re: [mp2] modperl2 compile error

[prev] [thread] [next] [Date index for 2005/05/02]

From: Marc =?ISO-8859-1?Q?Gr=E0cia?=
Subject: Re: [mp2] modperl2 compile error
Date: 07:53 on 02 May 2005
--=-j21cg9dgrASg1B2tJ1SY
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

I had some problems like this on my new x86_64 machine with mod_perl2,
seems that not only perl must be compiled with -fPIC , also apache and
all libraries or modules you plan to use. I think it's a general issue
with this architecture, not mod_perl related.
If not, there are runtime linking relocation errors everywhere.. (I also
had to recompile with -fPIC db and libz, for example)
Maybe that's the problem...

El dv 29 de 04 del 2005 a les 23:25 -0700, en/na Stas Bekman va
escriure:

> Tom Caldwell wrote:
> > Stas,
> > 
> > I forgot to mention that apache usually runs under a different account
> > than nobody (I use - apache), in case that matters.
> 
> Of course. In which case you need to check 'apache' instead of 'nobody'.
> 
> > Also, I apologize for not cc'ing the list on the last message but I
> > normally use the mail client from my desktop machine instead of this
> > Ximian client on red hat and I am not used to the client not doing the
> > cc for me.
> 
> No worries.
> 
>  > Yes, I noticed that nobody was having trouble finding libperl.so, but it
>  > seemed very strange that none of the other tests failed.
>  >
>  > Anyway, I tried to
>  > su - nobody
>  > which failed because the shell was set to /sbin/nologin.
> 
> su - apache
> 
>  > So I fixed that (set shell to bash) and set the .bashrc file to set the
>  > LD_LIBRARY_PATH to
>  > /opt/perl/lib/5.8.6/x86_64-linux/CORE:/opt/apache2/server/lib/:/usr/lib64
>  > so it can find libperl.so
>  > /opt/perl/bin/perl -V then ran correctly from the nobody account.
>  >
>  > Then I reran the tests and got the same failures here is the test report
>  > (see below).
>  >
>  > Also, I was able to run the 4 scripts in t/htdocs/util - argv.pl
>  > env.pl  in_err.pl  in_out.pl
>  >
>  > They seemed to work fine except env.pl did not print anything.
>  >
>  > Thanks for looking into this,
>  >
>  > Tom
>  >
>  > P.S. Here is the other info you asked for.
>  >
>  > First line of t/TEST is
>  > #!/opt/perl/bin/perl
>  >
>  > ldd /opt/perl/bin/perl
>  >         libperl.so => /opt/perl/lib/5.8.6/x86_64-linux/CORE/libperl.so
>  > (0x0000002a9566d000)
> 
> is it possible that this path it not readable by user 'apache'? I doubt 
> so, since all other tests run just fine.
> 
> what if you change one of these scripts (.e.g. t/htdocs/argv.pl) to be:
> 
> #!/bin/sh
> 
> printenv > /tmp/dump
> ldd /opt/perl/bin/perl >> /tmp/dump
> 
> and run the subprocess test? This will show what the environment this 
> subprocess script is running under.
> 

--=-j21cg9dgrASg1B2tJ1SY
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.2.4">
</HEAD>
<BODY>
I had some problems like this on my new x86_64 machine with mod_perl2, seems that not only perl must be compiled with -fPIC , also apache and all libraries or modules you plan to use. I think it's a general issue with this architecture, not mod_perl related.<BR>
If not, there are runtime linking relocation errors everywhere.. (I also had to recompile with -fPIC db and libz, for example)<BR>
Maybe that's the problem...<BR>
<BR>
El dv 29 de 04 del 2005 a les 23:25 -0700, en/na Stas Bekman va escriure:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Tom Caldwell wrote:</FONT>
<FONT COLOR="#000000">&gt; Stas,</FONT>
<FONT COLOR="#000000">&gt; </FONT>
<FONT COLOR="#000000">&gt; I forgot to mention that apache usually runs under a different account</FONT>
<FONT COLOR="#000000">&gt; than nobody (I use - apache), in case that matters.</FONT>

<FONT COLOR="#000000">Of course. In which case you need to check 'apache' instead of 'nobody'.</FONT>

<FONT COLOR="#000000">&gt; Also, I apologize for not cc'ing the list on the last message but I</FONT>
<FONT COLOR="#000000">&gt; normally use the mail client from my desktop machine instead of this</FONT>
<FONT COLOR="#000000">&gt; Ximian client on red hat and I am not used to the client not doing the</FONT>
<FONT COLOR="#000000">&gt; cc for me.</FONT>

<FONT COLOR="#000000">No worries.</FONT>

<FONT COLOR="#000000"> &gt; Yes, I noticed that nobody was having trouble finding libperl.so, but it</FONT>
<FONT COLOR="#000000"> &gt; seemed very strange that none of the other tests failed.</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; Anyway, I tried to</FONT>
<FONT COLOR="#000000"> &gt; su - nobody</FONT>
<FONT COLOR="#000000"> &gt; which failed because the shell was set to /sbin/nologin.</FONT>

<FONT COLOR="#000000">su - apache</FONT>

<FONT COLOR="#000000"> &gt; So I fixed that (set shell to bash) and set the .bashrc file to set the</FONT>
<FONT COLOR="#000000"> &gt; LD_LIBRARY_PATH to</FONT>
<FONT COLOR="#000000"> &gt; /opt/perl/lib/5.8.6/x86_64-linux/CORE:/opt/apache2/server/lib/:/usr/lib64</FONT>
<FONT COLOR="#000000"> &gt; so it can find libperl.so</FONT>
<FONT COLOR="#000000"> &gt; /opt/perl/bin/perl -V then ran correctly from the nobody account.</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; Then I reran the tests and got the same failures here is the test report</FONT>
<FONT COLOR="#000000"> &gt; (see below).</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; Also, I was able to run the 4 scripts in t/htdocs/util - argv.pl</FONT>
<FONT COLOR="#000000"> &gt; env.pl  in_err.pl  in_out.pl</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; They seemed to work fine except env.pl did not print anything.</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; Thanks for looking into this,</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; Tom</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; P.S. Here is the other info you asked for.</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; First line of t/TEST is</FONT>
<FONT COLOR="#000000"> &gt; #!/opt/perl/bin/perl</FONT>
<FONT COLOR="#000000"> &gt;</FONT>
<FONT COLOR="#000000"> &gt; ldd /opt/perl/bin/perl</FONT>
<FONT COLOR="#000000"> &gt;         libperl.so =&gt; /opt/perl/lib/5.8.6/x86_64-linux/CORE/libperl.so</FONT>
<FONT COLOR="#000000"> &gt; (0x0000002a9566d000)</FONT>

<FONT COLOR="#000000">is it possible that this path it not readable by user 'apache'? I doubt </FONT>
<FONT COLOR="#000000">so, since all other tests run just fine.</FONT>

<FONT COLOR="#000000">what if you change one of these scripts (.e.g. t/htdocs/argv.pl) to be:</FONT>

<FONT COLOR="#000000">#!/bin/sh</FONT>

<FONT COLOR="#000000">printenv &gt; /tmp/dump</FONT>
<FONT COLOR="#000000">ldd /opt/perl/bin/perl &gt;&gt; /tmp/dump</FONT>

<FONT COLOR="#000000">and run the subprocess test? This will show what the environment this </FONT>
<FONT COLOR="#000000">subprocess script is running under.</FONT>

</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-j21cg9dgrASg1B2tJ1SY--

(message missing)

[mp2] modperl2 compile error
Tom Caldwell 16:35 on 27 Apr 2005

Re: [mp2] modperl2 compile error
Stas Bekman 16:41 on 27 Apr 2005

Re: [mp2] modperl2 compile error
Stas Bekman 16:36 on 28 Apr 2005

Re: [mp2] modperl2 compile error
Tom Caldwell 19:46 on 28 Apr 2005

Re: [mp2] modperl2 compile error
Stas Bekman 20:55 on 28 Apr 2005

Re: [mp2] modperl2 compile error
Tom Caldwell 18:54 on 29 Apr 2005

Re: [mp2] modperl2 compile error
Stas Bekman 06:25 on 30 Apr 2005

Re: [mp2] modperl2 compile error
Marc =?ISO-8859-1?Q?Gr=E0cia?= 07:53 on 02 May 2005

Re: [mp2] modperl2 compile error
Stas Bekman 17:05 on 02 May 2005

Re: [mp2] modperl2 compile error
Marc =?ISO-8859-1?Q?Gr=E0cia?= 10:09 on 04 May 2005

Re: [mp2] modperl2 compile error
Tom Caldwell 15:09 on 04 May 2005

Re: [mp2] modperl2 compile error
Marc =?ISO-8859-1?Q?Gr=E0cia?= 10:26 on 05 May 2005

Re: [mp2] modperl2 compile error
Stas Bekman 05:23 on 06 May 2005

Re: [mp2] modperl2 compile error
Tom Caldwell 20:03 on 09 May 2005

Re: [mp2] modperl2 compile error
Tom Caldwell 22:24 on 02 May 2005

Re: [mp2] modperl2 compile error
Stas Bekman 06:40 on 03 May 2005

Re: [mp2] modperl2 compile error
Stas Bekman 05:51 on 03 May 2005

Re: [mp2] modperl2 compile error
Stas Bekman 20:46 on 09 May 2005

Generated at 06:56 on 17 May 2005 by mariachi v0.52