You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2004/09/18 17:49:49 UTC

mp2 static build problems

It's a first time I'm trying to build the static mp2. Unless I'm missing 
something it doesn't quite work for me. I build it as:

perl Makefile.PL \
MP_INST_APACHE2=1                            \
MP_USE_STATIC=1                              \
MP_AP_BUILD=1                                \
MP_GENERATE_XS=1                             \
MP_DEBUG=1                                   \
MP_TRACE=1                                   \
MP_USE_GTOP=1                                \
MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
MP_AP_CONFIGURE="--with-mpm=prefork"         \
MP_MAINTAINER=1                              \
MP_CCOPTS='-Wall -Werror'                    \
&& make -j2 && make test

against the cvs of httpd-2.0.x (not HEAD/2.1)

-----
when building against the clean source we get a non-fatal error:
Unable to open
/home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
or directory

that's at get_apr_config. it probably shouldn't get into that
function, before apache's configure is run

-----

broken dependency: when running 'make -j':

make[2]: *** No rule to make target 
`/home/stas/apache.org/mp2-static/src/modules/perl/mod_perl.a', needed by 
`httpd'.  Stop.


-----

Finally it breaks with:

LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o 
modperl_error.o modperl_bucket.o modperl_common_util.o 
modperl_common_log.o -L/usr/local/lib -o 
../../../blib/arch/Apache2/auto/APR/APR.so 
-L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt 
-lnsl -lpthread -ldl
/usr//bin/ld: cannot find -lapr-0
collect2: ld returned 1 exit status

I'm not sure how was this supposed to work in first place. Since libapr is 
not installed yet.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:

> Philippe M. Chiasson wrote:
>
>> Stas Bekman wrote:
>>
>>> It's a first time I'm trying to build the static mp2. Unless I'm 
>>> missing something it doesn't quite work for me. I build it as:
>>>
>>> perl Makefile.PL \
>>> MP_INST_APACHE2=1                            \
>>> MP_USE_STATIC=1                              \
>>> MP_AP_BUILD=1                                \
>>> MP_GENERATE_XS=1                             \
>>> MP_DEBUG=1                                   \
>>> MP_TRACE=1                                   \
>>> MP_USE_GTOP=1                                \
>>> MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
>>> MP_AP_CONFIGURE="--with-mpm=prefork"         \
>>> MP_MAINTAINER=1                              \
>>> MP_CCOPTS='-Wall -Werror'                    \
>>> && make -j2 && make test
>>>
>>> against the cvs of httpd-2.0.x (not HEAD/2.1)
>>>
>>> -----
>>> when building against the clean source we get a non-fatal error:
>>> Unable to open
>>> /home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
>>> or directory
>>>
>>> that's at get_apr_config. it probably shouldn't get into that
>>> function, before apache's configure is run
>>
>>
>>
>> Yes, that can be easily fixed by making to run httpd's ./configure a 
>> bit earlier
>
>
> So, i guess my commit apr.h.in should be reverted as well?
>
Yeah, there was no need for that, IMO.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>> It's a first time I'm trying to build the static mp2. Unless I'm 
>> missing something it doesn't quite work for me. I build it as:
>>
>> perl Makefile.PL \
>> MP_INST_APACHE2=1                            \
>> MP_USE_STATIC=1                              \
>> MP_AP_BUILD=1                                \
>> MP_GENERATE_XS=1                             \
>> MP_DEBUG=1                                   \
>> MP_TRACE=1                                   \
>> MP_USE_GTOP=1                                \
>> MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
>> MP_AP_CONFIGURE="--with-mpm=prefork"         \
>> MP_MAINTAINER=1                              \
>> MP_CCOPTS='-Wall -Werror'                    \
>> && make -j2 && make test
>>
>> against the cvs of httpd-2.0.x (not HEAD/2.1)
>>
>> -----
>> when building against the clean source we get a non-fatal error:
>> Unable to open
>> /home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
>> or directory
>>
>> that's at get_apr_config. it probably shouldn't get into that
>> function, before apache's configure is run
> 
> 
> Yes, that can be easily fixed by making to run httpd's ./configure a bit 
> earlier

So, i guess my commit apr.h.in should be reverted as well?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:

> It's a first time I'm trying to build the static mp2. Unless I'm 
> missing something it doesn't quite work for me. I build it as:
>
> perl Makefile.PL \
> MP_INST_APACHE2=1                            \
> MP_USE_STATIC=1                              \
> MP_AP_BUILD=1                                \
> MP_GENERATE_XS=1                             \
> MP_DEBUG=1                                   \
> MP_TRACE=1                                   \
> MP_USE_GTOP=1                                \
> MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
> MP_AP_CONFIGURE="--with-mpm=prefork"         \
> MP_MAINTAINER=1                              \
> MP_CCOPTS='-Wall -Werror'                    \
> && make -j2 && make test
>
> against the cvs of httpd-2.0.x (not HEAD/2.1)
>
> -----
> when building against the clean source we get a non-fatal error:
> Unable to open
> /home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
> or directory
>
> that's at get_apr_config. it probably shouldn't get into that
> function, before apache's configure is run

Yes, that can be easily fixed by making to run httpd's ./configure a bit 
earlier

> -----
>
> broken dependency: when running 'make -j':
>
> make[2]: *** No rule to make target 
> `/home/stas/apache.org/mp2-static/src/modules/perl/mod_perl.a', needed 
> by `httpd'.  Stop.
>
Good spot there stas. Gotta make sure httpd's build job is only entered 
after mod_perl.a has been
built.

> -----
>
> Finally it breaks with:
>
> LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o 
> modperl_error.o modperl_bucket.o modperl_common_util.o 
> modperl_common_log.o -L/usr/local/lib -o 
> ../../../blib/arch/Apache2/auto/APR/APR.so 
> -L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt 
> -lnsl -lpthread -ldl
> /usr//bin/ld: cannot find -lapr-0
> collect2: ld returned 1 exit status
>
> I'm not sure how was this supposed to work in first place. Since 
> libapr is not installed yet.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by Stas Bekman <st...@stason.org>.
Pratik, why do you continue breaking the thread? It's started on the dev 
list. Please keep it there. Why do you redirect it to the other list?

Please repost your reply to the dev list and we will take it from there. 
Thank you.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mp2 static build problems

Posted by Pratik <pr...@gmail.com>.
Well, I am a newbie to this. So kindly forgive all the mistakes that I make.

I was building mp2 statically, I don't think resultind httpd binary
should have any dependancies. Anyway, I had copied apr-0 to
/usr/local/lib, it should not cause any trouble.

I think if LD_LIBRARY_PATH contains <apache source/srclib/apr/.lib ,
then it won't give those errors.

I guess, "make install" is not required in Apache tree, as mp2's make
file will take care of it.

-Pratik

On Sat, 18 Sep 2004 13:37:14 -0400, Stas Bekman <st...@stason.org> wrote:
> 
> 
> Pratik wrote:
> >>Finally it breaks with:
> >>
> >>LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o
> >>modperl_error.o modperl_bucket.o modperl_common_util.o
> >>modperl_common_log.o -L/usr/local/lib -o
> >>../../../blib/arch/Apache2/auto/APR/APR.so
> >>-L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt
> >>-lnsl -lpthread -ldl
> >>/usr//bin/ld: cannot find -lapr-0
> >>collect2: ld returned 1 exit status
> >>
> >>I'm not sure how was this supposed to work in first place. Since libapr is
> >>not installed yet.
> >
> >
> > I faced the same problem while building mp2 statically. I found out
> > that lapr-0 was already built inside srclib/apr/.lib of httpd. I just
> > copied that file to /usr/local/lib and it worked like a charm.
> > Probably, LD_LIBRARY_PATH should be set properly.
> 
> What is properly? If during linking you set it to the local,
> pre-installation located, then it won't work post install. As I have never
> done this before I'm not sure how is this supposed to work at all. I'd
> think that you will need to 'make install' in the Apache tree and only
> then proceed building the modperl 2 modules.
> 
> 
> 
> 
> --
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mp2 static build problems

Posted by Stas Bekman <st...@stason.org>.
Pratik wrote:
>>Finally it breaks with:
>>
>>LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o
>>modperl_error.o modperl_bucket.o modperl_common_util.o
>>modperl_common_log.o -L/usr/local/lib -o
>>../../../blib/arch/Apache2/auto/APR/APR.so
>>-L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt
>>-lnsl -lpthread -ldl
>>/usr//bin/ld: cannot find -lapr-0
>>collect2: ld returned 1 exit status
>>
>>I'm not sure how was this supposed to work in first place. Since libapr is
>>not installed yet.
> 
> 
> I faced the same problem while building mp2 statically. I found out
> that lapr-0 was already built inside srclib/apr/.lib of httpd. I just
> copied that file to /usr/local/lib and it worked like a charm.
> Probably, LD_LIBRARY_PATH should be set properly.

What is properly? If during linking you set it to the local, 
pre-installation located, then it won't work post install. As I have never 
done this before I'm not sure how is this supposed to work at all. I'd 
think that you will need to 'make install' in the Apache tree and only 
then proceed building the modperl 2 modules.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by Pratik <pr...@gmail.com>.
> Finally it breaks with:
> 
> LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o
> modperl_error.o modperl_bucket.o modperl_common_util.o
> modperl_common_log.o -L/usr/local/lib -o
> ../../../blib/arch/Apache2/auto/APR/APR.so
> -L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt
> -lnsl -lpthread -ldl
> /usr//bin/ld: cannot find -lapr-0
> collect2: ld returned 1 exit status
> 
> I'm not sure how was this supposed to work in first place. Since libapr is
> not installed yet.

I faced the same problem while building mp2 statically. I found out
that lapr-0 was already built inside srclib/apr/.lib of httpd. I just
copied that file to /usr/local/lib and it worked like a charm.
Probably, LD_LIBRARY_PATH should be set properly.

Regards,
Pratik

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: mp2 static build problems

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:

>> Finally it breaks with:
>>
>> LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o 
>> modperl_error.o modperl_bucket.o modperl_common_util.o 
>> modperl_common_log.o -L/usr/local/lib -o 
>> ../../../blib/arch/Apache2/auto/APR/APR.so 
>> -L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt 
>> -lnsl -lpthread -ldl
>> /usr//bin/ld: cannot find -lapr-0
>> collect2: ld returned 1 exit status
>>
>> I'm not sure how was this supposed to work in first place. Since 
>> libapr is not installed yet.
> 
> 
> This is certainly a problem at the moment. I have been able to 
> investigate a bit and I think I know
> how to work around this problem cleanly.
> 
> There are currently 2 options I can think of.
> 
> The first one involves building mod_perl.a, building httpd and linking 
> mod_perl.a, installing httpd
> and then only resume the mod_perl build process.

That will be confusing. At least because one may need to 'su' in order to 
install things, so you can't make this transparent to the users. And they 
may want just to test the server, before installing it.

> The other option I am currently investigating involves using libtool 
> instead of cc to link the few
> modules that must link directly against libapr.

How hard it is to do that?

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.
Stas Bekman wrote:

> It's a first time I'm trying to build the static mp2. Unless I'm 
> missing something it doesn't quite work for me. I build it as:
>
> perl Makefile.PL \
> MP_INST_APACHE2=1                            \
> MP_USE_STATIC=1                              \
> MP_AP_BUILD=1                                \
> MP_GENERATE_XS=1                             \
> MP_DEBUG=1                                   \
> MP_TRACE=1                                   \
> MP_USE_GTOP=1                                \
> MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
> MP_AP_CONFIGURE="--with-mpm=prefork"         \
> MP_MAINTAINER=1                              \
> MP_CCOPTS='-Wall -Werror'                    \
> && make -j2 && make test
>
> against the cvs of httpd-2.0.x (not HEAD/2.1)
>
> -----
> when building against the clean source we get a non-fatal error:
> Unable to open
> /home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
> or directory
>
> that's at get_apr_config. it probably shouldn't get into that
> function, before apache's configure is run
>
> -----
>
> broken dependency: when running 'make -j':
>
> make[2]: *** No rule to make target 
> `/home/stas/apache.org/mp2-static/src/modules/perl/mod_perl.a', needed 
> by `httpd'.  Stop.
>
>
> -----
>
> Finally it breaks with:
>
> LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o 
> modperl_error.o modperl_bucket.o modperl_common_util.o 
> modperl_common_log.o -L/usr/local/lib -o 
> ../../../blib/arch/Apache2/auto/APR/APR.so 
> -L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt 
> -lnsl -lpthread -ldl
> /usr//bin/ld: cannot find -lapr-0
> collect2: ld returned 1 exit status
>
> I'm not sure how was this supposed to work in first place. Since 
> libapr is not installed yet.

This is certainly a problem at the moment. I have been able to 
investigate a bit and I think I know
how to work around this problem cleanly.

There are currently 2 options I can think of.

The first one involves building mod_perl.a, building httpd and linking 
mod_perl.a, installing httpd
and then only resume the mod_perl build process.

The other option I am currently investigating involves using libtool 
instead of cc to link the few
modules that must link directly against libapr.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by Stas Bekman <st...@stason.org>.
Philippe M. Chiasson wrote:
> 
> 
> Pratik wrote:

>> Sorry for breaking the thread twice. It had really slipped out of my
>> mind that I was also subscribed to dev list and I accidently posted 2
>> messages to mp's user list.

No worries :)

>> 3. When we say static mp2, I belive that all the libraries will be
>> statically linked to the resulting binary. So, the final binary
>> shouldn't be dependant on any library. Therefore, it shouldn't matter
>> if I delete libapr-0.a from /usr/local/lib.
> 
> 
> No, when we say static mp2, we mean statically linked mod_perl module to
> httpd. The rest of the libraries, like libapr libapr-util, etc are still
> dynamically loaded.

Just to add, that static mp1 is exactly the same. It's .pm|.so modules 
aren't linked in. And linking all 42 mp2 .so objects [1] will be a huge 
bloat [2] if you are going to use only a handfull of them.

[1] % find WrapXS | grep '\.o' | wc -l
42

[2] % du -c `find WrapXS | grep '\.o'` | grep total
2336    total

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by "Philippe M. Chiasson" <go...@ectoplasm.org>.

Pratik wrote:
> Hi !
> 
> Sorry for breaking the thread twice. It had really slipped out of my
> mind that I was also subscribed to dev list and I accidently posted 2
> messages to mp's user list.
> 
> But here is how I sucessfully built mp2 statically.
> 
> First I tried to do this in mp2 source directory.
> 
> perl Makefile.PL MP_AP_PREFIX=/home/pratik/src/mp2/httpd-2.0.51
> MP_AP_BUILD=1 MP_AP_CONFIGURE="--enable-so"
> 
> But it failed with the following errors.
> 
> [  error] Can't find apr include/ directory,
> [  error] use MP_APR_CONFIG=/path/to/apr-config
> 
> Then I went to apache source directory and did "./configure".

This issue is fixed in the latest CVS version.

> After that, I went to mp2 source directory and did 
> 
> perl Makefile.PL MP_AP_PREFIX=/home/pratik/src/mp2/httpd-2.0.51
> MP_AP_BUILD=1 MP_AP_CONFIGURE="--enable-so"
> 
> It created make file successfully and then I did "make". But it failed
> with the following error.
> 
> /usr/bin/ld: cannot find -lapr-0
> 
> Then I did "su" and copied libapr-0.a from srclib/apr/.lib of apche
> source to /usr/loca/lib. After doing this, I did "make", "su" and
> "make install" and I got binary called "httpd" in apache source
> directory.

This issue will be fixed shortly, but thanks for pointing it out ;-)

> I have a couiple queries related to this :
> 
> 1. Is there any need for libapr-0.a to be in /usr/local/lib ? Or I can
> just have a proper path set in LD_LIBRARY_PATH before giving "make" ?

Yes, there was no need for that. It was a bug in mod_perl build system.

> 2. When I give MP_AP_BUILD=1, it is must to provide MP_AP_CONFIGURE
> with some value to Makefile.PL. I belive this restriction shouldn't be
> there.

Correct. That's why MP_AP_BUILD has been removed as a configure option.
Now whenever you specify MP_USE_STATIC=1, apache will be configured
and built for you.

> 3. When we say static mp2, I belive that all the libraries will be
> statically linked to the resulting binary. So, the final binary
> shouldn't be dependant on any library. Therefore, it shouldn't matter
> if I delete libapr-0.a from /usr/local/lib.

No, when we say static mp2, we mean statically linked mod_perl module to
httpd. The rest of the libraries, like libapr libapr-util, etc are still
dynamically loaded.

> Regards,
> Pratik
> 
> On Sat, 18 Sep 2004 11:49:49 -0400, Stas Bekman <st...@stason.org> wrote:
> 
>>It's a first time I'm trying to build the static mp2. Unless I'm missing
>>something it doesn't quite work for me. I build it as:
>>
>>perl Makefile.PL \
>>MP_INST_APACHE2=1                            \
>>MP_USE_STATIC=1                              \
>>MP_AP_BUILD=1                                \
>>MP_GENERATE_XS=1                             \
>>MP_DEBUG=1                                   \
>>MP_TRACE=1                                   \
>>MP_USE_GTOP=1                                \
>>MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
>>MP_AP_CONFIGURE="--with-mpm=prefork"         \
>>MP_MAINTAINER=1                              \
>>MP_CCOPTS='-Wall -Werror'                    \
>>&& make -j2 && make test
>>
>>against the cvs of httpd-2.0.x (not HEAD/2.1)
>>
>>-----
>>when building against the clean source we get a non-fatal error:
>>Unable to open
>>/home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
>>or directory
>>
>>that's at get_apr_config. it probably shouldn't get into that
>>function, before apache's configure is run
>>
>>-----
>>
>>broken dependency: when running 'make -j':
>>
>>make[2]: *** No rule to make target
>>`/home/stas/apache.org/mp2-static/src/modules/perl/mod_perl.a', needed by
>>`httpd'.  Stop.
>>
>>-----
>>
>>Finally it breaks with:
>>
>>LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o
>>modperl_error.o modperl_bucket.o modperl_common_util.o
>>modperl_common_log.o -L/usr/local/lib -o
>>../../../blib/arch/Apache2/auto/APR/APR.so
>>-L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt
>>-lnsl -lpthread -ldl
>>/usr//bin/ld: cannot find -lapr-0
>>collect2: ld returned 1 exit status
>>
>>I'm not sure how was this supposed to work in first place. Since libapr is
>>not installed yet.
>>
>>--
>>__________________________________________________________________
>>Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>>http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>>mailto:stas@stason.org http://use.perl.org http://apacheweek.com
>>http://modperlbook.org http://apache.org   http://ticketmaster.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
>>For additional commands, e-mail: dev-help@perl.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
> 
> 

-- 
--------------------------------------------------------------------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/     F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: mp2 static build problems

Posted by Pratik <pr...@gmail.com>.
Hi !

Sorry for breaking the thread twice. It had really slipped out of my
mind that I was also subscribed to dev list and I accidently posted 2
messages to mp's user list.

But here is how I sucessfully built mp2 statically.

First I tried to do this in mp2 source directory.

perl Makefile.PL MP_AP_PREFIX=/home/pratik/src/mp2/httpd-2.0.51
MP_AP_BUILD=1 MP_AP_CONFIGURE="--enable-so"

But it failed with the following errors.

[  error] Can't find apr include/ directory,
[  error] use MP_APR_CONFIG=/path/to/apr-config

Then I went to apache source directory and did "./configure".

After that, I went to mp2 source directory and did 

perl Makefile.PL MP_AP_PREFIX=/home/pratik/src/mp2/httpd-2.0.51
MP_AP_BUILD=1 MP_AP_CONFIGURE="--enable-so"

It created make file successfully and then I did "make". But it failed
with the following error.

/usr/bin/ld: cannot find -lapr-0

Then I did "su" and copied libapr-0.a from srclib/apr/.lib of apche
source to /usr/loca/lib. After doing this, I did "make", "su" and
"make install" and I got binary called "httpd" in apache source
directory.

I have a couiple queries related to this :

1. Is there any need for libapr-0.a to be in /usr/local/lib ? Or I can
just have a proper path set in LD_LIBRARY_PATH before giving "make" ?
2. When I give MP_AP_BUILD=1, it is must to provide MP_AP_CONFIGURE
with some value to Makefile.PL. I belive this restriction shouldn't be
there.
3. When we say static mp2, I belive that all the libraries will be
statically linked to the resulting binary. So, the final binary
shouldn't be dependant on any library. Therefore, it shouldn't matter
if I delete libapr-0.a from /usr/local/lib.

Regards,
Pratik

On Sat, 18 Sep 2004 11:49:49 -0400, Stas Bekman <st...@stason.org> wrote:
> It's a first time I'm trying to build the static mp2. Unless I'm missing
> something it doesn't quite work for me. I build it as:
> 
> perl Makefile.PL \
> MP_INST_APACHE2=1                            \
> MP_USE_STATIC=1                              \
> MP_AP_BUILD=1                                \
> MP_GENERATE_XS=1                             \
> MP_DEBUG=1                                   \
> MP_TRACE=1                                   \
> MP_USE_GTOP=1                                \
> MP_AP_PREFIX=/home/stas/apache.org/httpd-2.0 \
> MP_AP_CONFIGURE="--with-mpm=prefork"         \
> MP_MAINTAINER=1                              \
> MP_CCOPTS='-Wall -Werror'                    \
> && make -j2 && make test
> 
> against the cvs of httpd-2.0.x (not HEAD/2.1)
> 
> -----
> when building against the clean source we get a non-fatal error:
> Unable to open
> /home/stas/apache.org/httpd-2.0/srclib/apr/include/apr.h: No such file
> or directory
> 
> that's at get_apr_config. it probably shouldn't get into that
> function, before apache's configure is run
> 
> -----
> 
> broken dependency: when running 'make -j':
> 
> make[2]: *** No rule to make target
> `/home/stas/apache.org/mp2-static/src/modules/perl/mod_perl.a', needed by
> `httpd'.  Stop.
> 
> -----
> 
> Finally it breaks with:
> 
> LD_RUN_PATH="/usr/lib:/lib" cc  -shared -L/usr/local/lib APR.o
> modperl_error.o modperl_bucket.o modperl_common_util.o
> modperl_common_log.o -L/usr/local/lib -o
> ../../../blib/arch/Apache2/auto/APR/APR.so
> -L/home/stas/apache.org/httpd-2.0/srclib/apr -lapr-0 -lrt -lm -lcrypt
> -lnsl -lpthread -ldl
> /usr//bin/ld: cannot find -lapr-0
> collect2: ld returned 1 exit status
> 
> I'm not sure how was this supposed to work in first place. Since libapr is
> not installed yet.
> 
> --
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
> For additional commands, e-mail: dev-help@perl.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org