Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

VS: build of libapreq2 fails

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


kl at aub

Jan 28, 2011, 3:23 AM

Post #1 of 2 (348 views)
Permalink
VS: build of libapreq2 fails

Hi,

Also configuring the runtime linking environment under Solaris 10 often helps a lot along with LDFLAGS:

> crle -u -l /usr/sfw/lib
> crle -u -l /usr/local/lib

Kind regards,
Kasper Løvschall

Special Consultant, Civil Engineer M.Sc.
Aalborg University Library
Langagervej 2
Po.Box 8200
DK-9220 Aalborg Øst
Denmark

Tlf: (+45) 99 40 73 03, Mobile: (+45) 28 95 91 29

E-mail: kl [at] aub




-----Oprindelig meddelelse-----
Fra: John D Groenveld [mailto:jdg117 [at] elvis]
Sendt: 28. januar 2011 00:49
Til: modperl [at] perl
Emne: Re: build of libapreq2 fails

In message <527C4914F1B2EA47B38422DE0FA05A65064B1BA899 [at] DH201
hcock.org>, "James B. Muir" writes:
>Hi, I am trying to build libapreq2 so that I may use it with Apache2 and mo=
>d_perl. I'm on a Solaris 10 system. The version of Apache I am using is old=
>:
>
>./bin/apachectl -v
>Server version: Apache/2.0.59
>Server built: Aug 22 2006 11:38:34

<URL:http://www.apache.org/dist/httpd/CHANGES_2.0.64>

>
>I receive the following surprising errors during the build of libapreq2:
>
>gmake[2]: Entering directory `/opt/sfw/libapreq2-2.13/module'
>/bin/bash ../libtool --tag=3DCC --mode=3Dlink gcc -g -O2 `/usr/local/lib=
>apreq2-2.
>13/apreq2-config --link-libtool` -L/usr/local/apache2/lib -laprutil-0 -L/u=
>sr/lo
>cal/apache2/lib -lapr-0 -o test_cgi test_cgi.o
>gcc -g -O2 -o .libs/test_cgi test_cgi.o /opt/sfw/libapreq2-2.13/library/.l=
>ibs/l
>ibapreq2.so -L/usr/local/apache2/lib /usr/local/apache2/lib/libaprutil-0.so=
> /usr
>/local/apache2/lib/libapr-0.so -lsendfile -lrt -lm -lsocket -lnsl -lresolv =
>-lpth
>read -R/usr/local/apache2/lib
>Undefined first referenced
>symbol in file
>XML_Parse /usr/local/apache2/lib/libaprutil-0.so
>XML_ParserCreate /usr/local/apache2/lib/libaprutil-0.so
>XML_ErrorString /usr/local/apache2/lib/libaprutil-0.so
>XML_SetUserData /usr/local/apache2/lib/libaprutil-0.so
>XML_ParserFree /usr/local/apache2/lib/libaprutil-0.so
>XML_GetErrorCode /usr/local/apache2/lib/libaprutil-0.so
>XML_SetCharacterDataHandler /usr/local/apache2/lib/libaprutil-0.so
>XML_SetElementHandler /usr/local/apache2/lib/libaprutil-0.so
>ld: fatal: Symbol referencing errors. No output written to .libs/test_cgi
>collect2: ld returned 1 exit status
>gmake[2]: *** [test_cgi] Error 1
>gmake[2]: Leaving directory `/opt/sfw/libapreq2-2.13/module'
>
>
>I recently installed libexpat to /usr/local/lib.
>
>ls -lF libexpat*
>-rw-r--r-- 1 root root 492744 Dec 14 16:23 libexpat.a
>-rwxr-xr-x 1 root root 816 Dec 14 16:23 libexpat.la*
>lrwxrwxrwx 1 root root 17 Dec 14 16:23 libexpat.so -> libexp=
>at.so.1.5.2*
>lrwxrwxrwx 1 root root 17 Dec 14 16:23 libexpat.so.1 -> libe=
>xpat.so.1.5.2*
>-rwxr-xr-x 1 root root 305504 Dec 14 16:23 libexpat.so.1.5.2*
>
>Does anyone have any idea why I am seeing the undefined symbols when I buil=
>d libapreq2? Do I need to rebuild apache to resolve this?

I don't see the attempt to link libexpat.
You can try manually adding it to LDFLAGS

$ env LDFLAGS="-L/usr/local/lib -R/usr/local/lib -lexpat" perl Makefile.PL \
--with-apache2-apxs=/usr/local/apache2/bin/apxs

And libexpat ships with Solaris 10 in the SUNWlexpt package.

When building Apache httpd 2.2, you specify --with-expat in the
configure.

John
groenveld [at] acm


jdg117 at elvis

Jan 28, 2011, 7:47 AM

Post #2 of 2 (338 views)
Permalink
Re: VS: build of libapreq2 fails [In reply to]

In message <B175E5DAA6BE4F4896AD6A8AA534B18701EDE9CF0E [at] AD-MAILBOX01>, =?
iso-8859-1?Q?Kasper_L=F8vschall?= writes:
>Also configuring the runtime linking environment under Solaris 10 often helps
>a lot along with LDFLAGS:
>
>> crle -u -l /usr/sfw/lib
>> crle -u -l /usr/local/lib

If you add the -R flag to the linker (or not set any runtime paths
with -R and instead set them with the LD_RUN_PATH environment) then
you shouldn't need to kludge the Solaris system or user runtime link
environment.

My notes for building 64-bit modperl with httpd 2.2 remind me to
check these build files:
# edit apr_rules.mk and config_vars.mk in /opt/apache2/build
# add "-m64 -xO3" to EXTRA_CFLAGS and "-m64" EXTRA_LDFLAGS
# confirm "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64"
# edit apr-1-config and apu-1-config in /opt/apache2/bin
# add the same to CFLAGS and LDFLAGS
# confirm "-m64 -L/usr/sfw/lib/64 -R/usr/sfw/lib/64"


BTW with 32-bit Solaris builds one needs to be dilligent about
building httpd and Perl the same as either largefile(5) or not
or modperl will core.

John
groenveld [at] acm

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.