libapreq2 installtion
smthames
created: 2006-03-03 12:16:59
Hello. I've never posted here before. If I'm doing this incorrectly, please forgive me.
Installing: libapreq2 2.07
Hardware:   Poweredge 1850 - Dual 2.8 Mhz procs
OS:         Linux 2.6.11-1.1369_FC4smp
All of the t/apreq/cgi.t tests fail with this in the error log:
Can't load '/root/build/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/arch/auto/APR/Request/Request.so' for module APR::Request: libapreq2.so.2: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 230.
 at /root/build/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm line 27
Compilation failed in require at /root/build/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm line 27.
BEGIN failed--compilation aborted at /root/build/libapreq2-2.07/glue/perl/t/cgi-bin/../../blib/lib/APR/Request/Param.pm line 27.
Compilation failed in require at /root/build/libapreq2-2.07/glue/perl/t/cgi-bin/test_cgi.pl line 11.
BEGIN failed--compilation aborted at /root/build/libapreq2-2.07/glue/perl/t/cgi-bin/test_cgi.pl line 11.
Premature end of script headers: test_cgi.pl
It appears the module Request.so cannot be found but, in fact, it is there.

This is the same problem for which a Perl Test Failure is listed on CPAN: http://nntp.x.perl.org/group/perl.cpan.testers/284929

Can anyone please help with this?
Re: libapreq2 installtion
created: 2006-03-03 12:38:05
The tests are probably running as another user so they don't have access to that directory (/root/build/...).

Try either installing it on another directory so a user like "nobody" has read access it or change the permissions of your /root directory:

find /root -type d -exec chmod a+rx {} \;
Re^2: libapreq2 installtion
created: 2006-03-03 12:51:17
Thanks I tried that. I tried settings permissions on all files and directories from /root down to 777--didn't work. Then I tried setting owner and group to nobody:nobody--still didn't work, same error. Any other ideas?
Re^3: libapreq2 installtion
created: 2006-03-03 12:59:09
Hmmm... Ok, let's try harder then :)
strace -ffv make test 2>&1 | egrep -ie "(EPERM|ENOENT|EACCES|open|stat)"
This has to give you some hint... :)
Re^4: libapreq2 installtion
created: 2006-03-03 15:32:47
I did the strace. No EACCES or EPERM errors found. The stat references to 'Request.so' seem to indicate the file is there.

This error message is coming from Dynaloader which is running the XS startup code of the Request.so module. This error must be occurring there and is being reported as coming from perl.

I see two references to Request.so in the strace output:
lstat64("Request.so", {st_dev=makedev(253, 0), st_ino=5244497, st_mode=S_IFREG|0777, st_nlink=1, st_uid=99, st_gi
d=99, st_blksize=4096, st_blocks=352, st_size=170174, st_atime=2006/03/03-12:07:05, st_mtime=2006/03/03-07:54:56, st_ctime=20
06/03/03-08:44:26}) = 0
stat64("Request.so", {st_dev=makedev(253, 0), st_ino=5244497, st_mode=S_IFREG|0777, st_nlink=1, st_uid=99, st_gid
=99, st_blksize=4096, st_blocks=352, st_size=170174, st_atime=2006/03/03-12:07:05, st_mtime=2006/03/03-07:54:56, st_ctime=200
6/03/03-08:44:26}) = 0
Following this, I see some ENOENT errors in some stat calls which I must assume are trapped. Then I see this error:
[pid 20816] execve("/bin/sh", ["sh", "-c", "\"/usr/sbin/httpd\" -l"], ["HOSTNAME=jupiter.ets.com", "SHELL=/bin/bash", "TERM=v
t100", "HISTSIZE=1000", "SSH_CLIENT=::ffff:10.1.10.200 39"..., "SSH_TTY=/dev/pts/1", "USER=root", "LS_COLORS=no=00:fi=00:di=0
1;34:l"..., "SSH_AUTH_SOCK=/tmp/ssh-DMypwk308"..., "KDEDIR=/usr", "PATH=/usr/kerberos/sbin:/usr/ker"..., "MAIL=/var/spool/mai
l/root", "PWD=/root/build/libapreq2-2.07/g"..., "INPUTRC=/etc/inputrc", "APACHE_TEST_ULIMIT_SET=1", "LANG=en_US.UTF-8", "APAC
HE_TEST_HTTP_09_OK=0", "SSH_ASKPASS=/usr/libexec/openssh"..., "HOME=/root", "SHLVL=2", "PERL_LWP_USE_HTTP_10=1", "LOGNAME=roo
t", "SSH_CONNECTION=::ffff:10.1.10.20"..., "LESSOPEN=|/usr/bin/lesspipe.sh %"..., "HARNESS_ACTIVE=1", "G_BROKEN_FILENAMES=1",
 "_=/usr/bin/perl", "APACHE_TEST_HOSTNAME=test.host.n"..., "APACHE_TEST_HOSTTYPE=z80"] 
[pid 20816] <... access resumed> )      = -1 ENOENT (No such file or directory)
Does this suggest anything to you?
Re^5: libapreq2 installtion
created: 2006-03-03 17:22:47
Try the suggestions of [bowei_99], but if you really want to nail down this problem, continue reading :)

Looking at the initial error message again, I see this important thing:

libapreq2.so.2: cannot open shared object file: No such file or directory

Let's check if your httpd binary has all libraries:

ldd /usr/sbin/httpd
And check that there are no missing libraries in the output of ldd. BTW, is /usr/sbin/httpd your correct Apache binary?

Even if ldd of httpd locates all libraries, find where your libapreq2.so.2 is and add it to your LD_LIBRARY_PATH environment variable.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/of/your/libapreq2
Then try the "make test" again.

Note: setting the LD_LIBRARY_PATH variable is not recommended, I'm suggesting it here just for the sake of debugging.

Re: libapreq2 installtion
created: 2006-03-03 16:57:42
Hm, I would also prefer to compile from source, but if you need it working immediately or want something to compare to, you could try installing the RPM.

I did a google search for libapreq2 and Request.so, and found the following links -

http://rpm.pbone.net/index.php3/stat/4/idpl/2121371/com/libapreq2-debuginfo-2.06-2.fc4.i386.rpm.html
http://rpmfind.net/linux/RPM/fedora/devel/i386/debug/libapreq2-debuginfo-2.07-0.2.rc4.fc5.i386.html
http://rpm.pbone.net/index.php3/stat/4/idpl/2121347/com/perl-libapreq2-2.06-2.fc4.i386.rpm.html

Since that second link is from Fedora Extras, I'm guessing you may not have that installed. To find out, you can type

rpm -qa | grep libapreq2

You could also post the question to the apache mailing list....

-- Burvil

perlmonks.org content © perlmonks.org and bowei_99, salvix, smthames

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03