LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   libperl.so and apache2 (https://www.linuxquestions.org/questions/solaris-opensolaris-20/libperl-so-and-apache2-413771/)

xpucto 02-10-2006 06:07 AM

libperl.so and apache2
 
Hi!
My apache2 needs libperl.so. I work with solaris 10 and perl is alread installed:
Quote:

find / -name libperl.so
/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so
/usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE/libperl.so
/usr/apache/libexec/libperl.so
/space/servers/usr/pkgsrc/dillo/p5-DB_File-Lock/work/.buildlink/lib/perl5/5.8.0/sparc-solaris/CORE/libperl.so
I've tried to make symbolic links but it didn't work.
Since I alread have perl, I guess I need a perl module for apache2, but I don't know what exactly to install.
http://sunfreeware.com only has perl or apache but no perl module for apache.

Thanks for any help.

technopark02 02-10-2006 12:40 PM

Did you try setting the LD_LIBRARY_PATH to the directory, where you have libperl.so?

xpucto 02-14-2006 04:49 AM

Quote:

Originally Posted by technopark02
Did you try setting the LD_LIBRARY_PATH to the directory, where you have libperl.so?

No id did not. But I don't know if it would be any good idea. Here, have a look:
http://www.visi.com/~barr/ldpath.html

xpucto 02-14-2006 04:50 AM

Maybe should I rather post this message in sofatware forum. I guess that my problem is more specific to apache than to solaris.

jlliagre 02-14-2006 05:08 AM

Have you checked blastwave.org for apache2 / perl module packages ?

xpucto 02-14-2006 06:32 AM

Quote:

Originally Posted by jlliagre
Have you checked blastwave.org for apache2 / perl module packages ?

Thanks! I found it there and installed it doing the following:
Quote:

perl Makefile.PL MP_APXS=/usr/apache2/bin/apxs
then I got it installed with the following warnings at the end of the installation:
Quote:

[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.

[warning] Check the results of
[warning]
[warning] $ /usr/apache2/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
"/usr/apache2/bin/apxs -q LIBEXECDIR" gives me this:
Quote:

/usr/apache2/libexec
The problem ist that there is nowhere either a mod_perl.so (or a libperl.so)!

So in my configuration, there is no modules directory, but there is no perl module in the libexex either!

Quote:

ls /usr/apache2/libexec/
httpd.exp mod_auth_anon.so mod_dav.so mod_headers.so mod_mime.so mod_proxy_http.so mod_suexec.so
mod_access.so mod_auth_dbm.so mod_dav_fs.so mod_imap.so mod_mime_magic.so mod_rewrite.so mod_unique_id.so
mod_actions.so mod_auth_digest.so mod_dir.so mod_include.so mod_negotiation.so mod_setenvif.so mod_userdir.so
mod_alias.so mod_autoindex.so mod_env.so mod_info.so mod_proxy.so mod_speling.so mod_usertrack.so
mod_asis.so mod_cern_meta.so mod_expires.so mod_log_config.so mod_proxy_connect.so mod_ssl.so mod_vhost_alias.so
mod_auth.so mod_cgi.so mod_ext_filter.so mod_log_forensic.so mod_proxy_ftp.so mod_status.so
What can I do?

xpucto 02-14-2006 06:48 AM

I just realized that those modules are also in solaris and tried to install the package:
Quote:

pkgadd -d ./SUNWapch2d
pkgadd: ERROR: no packages were found in </var/sadm/pkg/SUNWapch2d>
# pkgadd -d . SUNWapch2d

Processing package instance <SUNWapch2d> from </var/sadm/pkg>
pkgadd: ERROR: unable to access pkgmap file </var/sadm/pkg/SUNWapch2d/pkgmap>

No changes were made to the system.
But I do not understand the error.

xpucto 02-14-2006 07:34 AM

Ok. Very stupid from me: I forgot the command make! I had so much configurations to make that I just got concentrated on the first command and totally forgot the next ones! Sorry.
But I still have 2 questions:
- the one on the previous post: why does
Quote:

pkgadd -d ./SUNWapch2d
not work?

I did the command "make" and got this error message:
Quote:

/usr/ucb/cc: language optional software package not installed
even though cc is under /usr/ucb and in the $PATH.

Any idea?

jlliagre 02-14-2006 10:18 AM

The command "pkgadd -d SUNWapch2d" is failing as this package is already installed on your system, and anyway you do not provide a directory where the package is present but the directory where the system stores its packages data.

/usr/ucb/cc is a C compiler front end designed to simulate a BSD (SunOS4.x) environment on Solaris, but you still need a back-end compiler.

Don't use it, use instead either gcc (/usr/sfw/bin/gcc) or better, Sun Studio 11 (/opt/SUNWspro/bin/cc).

technopark02 02-14-2006 03:30 PM

Quote:

Originally Posted by xpucto
No id did not. But I don't know if it would be any good idea. Here, have a look:
http://www.visi.com/~barr/ldpath.html

LD_LIBRARY_PATH gives you the flexibility to set/override the {run-time} linker search paths. As long as you know what you are doing with LD_LIBRARY_PATH, you should be fine.

I don't see any compelling reason, not to give it a try. If it works, you are done -- you don't have to go through this trouble of installing various packages.

xpucto 02-15-2006 04:23 AM

Quote:

Originally Posted by technopark02
LD_LIBRARY_PATH gives you the flexibility to set/override the {run-time} linker search paths. As long as you know what you are doing with LD_LIBRARY_PATH, you should be fine.

I don't see any compelling reason, not to give it a try. If it works, you are done -- you don't have to go through this trouble of installing various packages.

I doesn't work: in httpd.conf, I have the line:
Quote:

LoadModule perl_module libexec/libperl.so
so it looks directly in the apache2 directory.
If I write:
Quote:

LoadModule perl_module /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so
the I get the error
Quote:

Syntax error on line 285 of /etc/apache2/httpd.conf:
Can't locate API module structure `perl_module' in file /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE/libperl.so: ld.so.1: /usr/apache2/bin/httpd: fatal: perl_module: can't find symbol
This perl_module as to be compiled with my apache.

xpucto 02-15-2006 04:43 AM

Quote:

Originally Posted by jlliagre
/usr/ucb/cc is a C compiler front end designed to simulate a BSD (SunOS4.x) environment on Solaris, but you still need a back-end compiler.

Don't use it, use instead either gcc (/usr/sfw/bin/gcc) or better, Sun Studio 11 (/opt/SUNWspro/bin/cc).

I used gcc (Sun Studio 11 is not installed). I have "only" one more error:
Quote:

make: Fatal error: Command failed for target `modperl_lib'
I'm googling in order to figure out what net have I have to do. If you have any idea, I'll be very thanksfull. I'd like to have this apache2 eventually to work!

xpucto 02-15-2006 05:19 AM

I found this thread that gives a solution that is supposed to work:
http://www.mail-archive.com/modperl@.../msg29498.html
Quote:

try this:

--- mod_perl-1.99_04/src/modules/perl/mod_perl.c.old 2002-06-21 13:16:51.000000000
+0900
+++ mod_perl-1.99_04/src/modules/perl/mod_perl.c 2002-08-13 23:56:54.000000000
++0900
@@ -508,18 +508,22 @@

ap_register_output_filter(MP_FILTER_REQUEST_OUTPUT_NAME,
modperl_output_filter_handler,
+
+ NULL,
AP_FTYPE_RESOURCE);

ap_register_input_filter(MP_FILTER_REQUEST_INPUT_NAME,
modperl_input_filter_handler,
+
+ NULL,
AP_FTYPE_RESOURCE);

ap_register_output_filter(MP_FILTER_CONNECTION_OUTPUT_NAME,
modperl_output_filter_handler,
+
+ NULL,
AP_FTYPE_CONNECTION);

ap_register_input_filter(MP_FILTER_CONNECTION_INPUT_NAME,
modperl_input_filter_handler,
+
+ NULL,
AP_FTYPE_CONNECTION);

ap_hook_pre_connection(modperl_hook_pre_connection,
But I don't understand nothing about it! What am I supposed to do?!

bathory 02-15-2006 05:49 AM

This is a patch. Save the contents to a file (for example patch-mod-perl.diff) in the top directory that is created when you extracted mod-perl (according to the contents it should be: mod_perl-1.99_04) and run:
Code:

patch -p1 -i patch-mod-perl.diff
Watch for errors and if there are no any, then run "make" as usual.

xpucto 02-15-2006 06:18 AM

Quote:

Originally Posted by bathory
This is a patch. Save the contents to a file (for example patch-mod-perl.diff) in the top directory that is created when you extracted mod-perl (according to the contents it should be: mod_perl-1.99_04) and run:
Code:

patch -p1 -i patch-mod-perl.diff
Watch for errors and if there are no any, then run "make" as usual.

Thanks for your help. I tried and got
Quote:

patch -p1 -i patch-mod-perl.diff
Looks like a unified context diff.
Hunk #1 failed at line 508.
1 out of 1 hunks failed: saving rejects to src/modules/perl/mod_perl.c.rej
done
I have actually mod_perl-2.0.2 and I guess there should be some adjustment, but I'm certainly not abble to make them.

I just cannot believe that it so difficult to have perl to run with apache2!


All times are GMT -5. The time now is 02:24 PM.