Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mod_perl error: Undefined symbol "apr_os_thread_current" 1

Status
Not open for further replies.

Xaqte

IS-IT--Management
Oct 4, 2002
971
US
I'm compiling mod_perl from source, when I run:
Code:
make test
I get the following error:
Code:
waiting 120 seconds for server to start: .Syntax error on line 12 of /home/me/mod_perl-2.0.1/t/conf/httpd.conf:
Cannot load /home/me/mod_perl-2.0.1/src/modules/perl/mod_perl.so into server: /home/me/mod_perl-2.0.1/src/modules/perl/mod_perl.so: Undefined symbol "apr_os_thread_current"
I've found the following solution:
The apr is not threaded. The apr-1-config and apu-1-config binaries are in my path (/usr/local/bin). This causes the HTTPD build to link against the WRONG apr/apr util libraries. Later when mod_perl2 calls apxs to get the path for things, its given the wrong ones causing the error.
The easiest solution is to temporarily move them out of the PATH during compilation or rename them temporarily.
Being a newb to linux (or FreeBSD), I really don't understand to apply this fix. If someone would care to explain this in greater detail, It would be greatly appreciated!

My OS:
5.4-RELEASE-p6 FreeBSD 5.4-RELEASE-p6

My perl:
Tried both 5.8.6 & 5.8.7

My Makefile.PL:
perl Makefile.PL MP_DEBUG=1 MP_APXS=/home/me/apache2/bin/apxs

I have the latest Apache (downloaded today). I will reveal any other relevant information if needed. Sorry for a long post!

Thanks in advance to any responses (unless in Ruby),

X
 
Your "PATH" environment variable holds places for linux to search for executables.
You can see what is in your path with "echo $PATH".
You can also see where it's finding the binaries in question with "which apr-1-config" and "which apu-1-config" respectively.
I suggest you try these things and come back with the results and I'll try to help further.


Trojan.
 
TrojanWarBlade, thanks for the response!

echo $PATH returns:
Code:
/usr/local/bin:/usr/local/pgsql/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/public/sbin:/usr/public/bin:/usr/X11R6/bin:/home/me/bin:/usr/public/mysql/mysql4.1/bin

Both of the which commands returned nothing.
 
Ok,
Can you echo your LD_LIBRARY_PATH please?
I'm getting a little lost here cos I don't know anything about this "apr" library but from your quote it suggests that you're linking against the wrong library.
You could also "locate apr_os | fgrep '.so' | less" or even "locate apr | fgrep '.so' | less" to see what possibilities there are for this library.


Trojan.
 
Ok,
echo LD_LIBRARY_PATH & echo $LD_LIBRARY_PATH didn't return anything.
1. locate apr_os | fgrep '.so' | less
- Returned nothing
2. locate apr | fgrep '.so' | less
- Returned:
Code:
/log/src/httpd-2.0.54/srclib/apr/.libs/libapr-0.so
/log/src/httpd-2.0.54/srclib/apr/.libs/libapr-0.so.9
/log/src/httpd-2.0.54/srclib/apr-util/.libs/libaprutil-0.so
/log/src/httpd-2.0.54/srclib/apr-util/.libs/libaprutil-0.so.9
/stubs/usr_local/apache2_docs/lib/libapr-0.so
/stubs/usr_local/apache2_docs/lib/libapr-0.so.9
/stubs/usr_local/apache2_docs/lib/libaprutil-0.so
/stubs/usr_local/apache2_docs/lib/libaprutil-0.so.9
/stubs/usr_local/apache2_perl/lib/libapr-0.so
/stubs/usr_local/apache2_perl/lib/libapr-0.so.9
/stubs/usr_local/apache2_perl/lib/libaprutil-0.so
/stubs/usr_local/apache2_perl/lib/libaprutil-0.so.9
/usr/public/apache/apache2/apache2prefork/lib/libapr-0.so
/usr/public/apache/apache2/apache2prefork/lib/libapr-0.so.9
/usr/public/apache/apache2/apache2prefork/lib/libaprutil-0.so
/usr/public/apache/apache2/apache2prefork/lib/libaprutil-0.so.9
I need it to use the one in:
/home/me/apache2

Thanks again!

X
 
I think I found the fix, thanks to TrojanWarBlade. Before the compiling process, I set:
Code:
LIBPATH=/home/me/apache2/lib/

I cannot be 100% sure as of yet... I'm getting server errors saying that my filesystem my be full when running the "make" command. I've only ran it a million times in the last 12 hours :)

I'll post back after more testing, if anyone's interested.

Thanks again,

X
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top