Bug 23225 - symbolic link causes apr-config and apu-config to guess wrong APR_INCLUDEDIR, APU_INCLUDEDIR
Summary: symbolic link causes apr-config and apu-config to guess wrong APR_INCLUDEDIR,...
Status: CLOSED DUPLICATE of bug 8867
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.0.47
Hardware: Sun Solaris
: P3 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-17 20:20 UTC by Greg Mortensen
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Mortensen 2003-09-17 20:20:59 UTC
My build directory is "/export/home/greg/src/httpd-2.0.47". "/export/home/greg" 
is a symbolic link to "../../fs0/export/home/greg":

[telesto:/export/home]$ ls -la
lrwxrwxrwx   1 root     root          26 Jul 14 13:50 greg -
> ../../fs0/export/home/greg

srclib/apr/apr-config and srclib/apr-util/apu-config get confused because of 
this link, and APR_INCLUDEDIR and APU_INCLUDEDIR point to both /fs0 
and /export.  From config.log:

APR_INCLUDEDIR='/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr/include /expor
t/home/greg/src/httpd-2.0.47/srclib/apr/include'
APU_INCLUDEDIR='/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include /
export/home/greg/src/httpd-2.0.47/srclib/apr-util/include'

The apr-util and apr *.h files get listed twice in server/exports_files:

/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_anylock.h
/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_base64.h
/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_buckets.h
[...snip...]
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_anylock.h
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_base64.h
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr-util/include/apr_buckets.h

/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr.h
/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr_allocator.h
/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr_atomic.h
[...snip...]
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr.h
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr_allocator.h
/fs0/export/home/greg/src/httpd-2.0.47/srclib/apr/include/apr_atomic.h

This results in the following build errors:

/export/home/greg/src/httpd-2.0.47/server/exports.c:1554: error: redefinition of
 `ap_hack_apr_base64_encode_len'
/export/home/greg/src/httpd-2.0.47/server/exports.c:672: error: `ap_hack_apr_bas
e64_encode_len' previously defined here
/export/home/greg/src/httpd-2.0.47/server/exports.c:1555: error: redefinition of
 `ap_hack_apr_base64_encode'
/export/home/greg/src/httpd-2.0.47/server/exports.c:673: error: `ap_hack_apr_bas
e64_encode' previously defined here
[...snip...]

A simple workaround is to edit server/exports_files by hand to remove the 
duplicates.
Comment 1 Kate Ward 2003-09-23 10:27:32 UTC
I am having a similar problem, but it originally seemed more related to Bug#
21718.  See Comment #2 there for my report.  This error is reproducable on two
of my systems, and it seems also to do with sym-links.

Solaris 8 Sparc 02/02; gcc 3.3
/usr/local/src -> /VolA1/usr/local/src

Solaris 8 x86 10/01; gcc 3.3
/usr/local/src -> /net/girly/usr/local/src

After running configure, I had to run make once and let it run through until the
error showed up.  Then I was able to edit the server/export_files file and
remove the duplicate entries.  Editing the file immediatly after running
configure (essentially editing a version of the file from a previous make run)
did not work.  When make enters the server directory the first time, it finds
new headers and rebuilds the exports.c and export_files files.
Comment 2 Jeff Trawick 2003-10-10 12:41:25 UTC

*** This bug has been marked as a duplicate of 8867 ***
Comment 3 Ian McNish 2003-10-16 23:25:17 UTC
if you access the src dir via the real path rather than via a sym link then this 
problem does not occur.