Bug 44631 - with-included-apr fails to work when using a separate buildroot
Summary: with-included-apr fails to work when using a separate buildroot
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.5-HEAD
Hardware: PC Mac OS X 10.4
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2008-03-18 20:54 UTC by Edward Rudd
Modified: 2009-03-14 12:26 UTC (History)
1 user (show)



Attachments
Patch for the suggested fix (763 bytes, patch)
2008-04-08 07:31 UTC, Edward Rudd
Details | Diff
Updated patch off of current trunk that doesn't assume CWD (1.08 KB, patch)
2009-03-14 11:35 UTC, Edward Rudd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Rudd 2008-03-18 20:54:46 UTC
When I build apache I build apache in a separate build root so the object files do not get mixed with the source files.

example.

tar -xjf httpd-2.2.8.tar.bx2
cd httpd-2.2.8
mkdir build-worker
cd build-worker
../configure --with-lots-of-config-args \
 --with-included-apr

When this runs it aborts claiming that APR was not configured with RANDOM support (which it was).  And also looking further up it failed to find apr-1-config and looking at config.log it failed to include apr.h.  Upon further inspection I noticed that the inlcuded_apr system points the apr_config and apu_config to 

$srcdir/srclib/apr-${apr_version}-config 
   and $srcdir/srclib/apu-{apu_version}-config respectivaly.

however these should be
./srclib/apr-${apr_version}-config
   and ./srclib/apr-${apu_version}-config

note, the APR_FIND_* lines are fine.
Comment 1 Takashi Sato 2008-04-07 09:27:20 UTC
I have a similar trouble. Please someone fix this.
Comment 2 Edward Rudd 2008-04-08 07:31:53 UTC
Created attachment 21795 [details]
Patch for the suggested fix
Comment 3 Takashi Sato 2008-04-08 20:55:31 UTC
Your patch works fine. Thanks.
Comment 4 William A. Rowe Jr. 2008-05-18 10:53:55 UTC
I believe this will have a side effect.... unless I'm mistaken it should be

$builddir/srclib/apr/apr-${apr_version}-config

you were correct that it was not working correctly, but the assumed cwd isn't
a wise change.
Comment 5 Edward Rudd 2008-05-18 17:29:31 UTC
Yes, you are correct.

I'll have to poke nick and see if this fixed the issue he was having with my patch.
Comment 6 Takashi Sato 2008-12-02 22:06:06 UTC
Won't this bug be fixed?
Comment 7 Edward Rudd 2009-03-14 11:35:24 UTC
Created attachment 23384 [details]
Updated patch off of current trunk that doesn't assume CWD

Updated patch off of current trunk that fixes uses ac_top_build_prefix (the autoconf variable.. builddir is automake)

It also switches the $top_srcdir  to $ac_top_srcdir (autoconf doesn't have top_srcdir)
Comment 8 William A. Rowe Jr. 2009-03-14 12:26:58 UTC
A related observation; even single tree builds fail on included apr-util
configure due to it's resolution of the --with-apr argument if that path
resolves to a symlink.  Will investigate the patch.