The issue as per my understanding of the issue is that the difference in
the way expat libs are detected by apr-util and neon.
apr-util searches for the expat in */usr /usr/local* xml/expat-cvs
_Snippet from apr-util/build/apu-conf.m4_
if test -z "$expat_include_dir"; then
for d in /usr /usr/local xml/expat-cvs xml/expat $srcdir/xml/expat ; do
if test -n "$expat_include_dir"; then
dnl For /usr installs of expat, we can't specify -L/usr/lib
if test "$d" = "/usr"; then
Whereas neon leaves the job of finding the expat libs to
AC_CHECK_HEADER/AC_CHECK_LIB both being influenced by the $CFLAGS,
$CPPFLAGS. This issue is not reproducible straight forward atleast in my
RHEL the gcc getting shipped along seem to be searching for headers in
/usr/include /usr/local/include without me specifying by
As I could see only the difference being /usr/local between neon and
apr-util. This patch plugs the difference in case apr-util identifies
the system expat libs a nd that happened to be in /usr/loca/... which
would be ignored by neon on a possible old compiler which won't search
Anyway updated the issuezilla for this defect how to reproduce.
Made the comments multiline and removed the steps to reproduce.
Regarding expat elsewhere anyway user needs to specify it with
Garrett Rooney wrote:
> On 12/7/05, Kamesh Jayachandran <firstname.lastname@example.org> wrote:
>> The fix actually runs the configure for neon with CFLAGS and LDFLAGS set to
>> /usr/local/include /usr/local/lib respectively for this special case if we
>> can see the /usr/local/include/expat.h.
> Why should we be hardcoding a special case for /usr/local? It seems
> kind of silly to special case one location like that when for all we
> know expat could have been installed virtually anywhere. Is there any
> reason you went with this approach as opposed to following Max
> Bowsher's suggestion in the issue about adding apu-config --cppflags
> to CPPFLAGS and thus getting the benefit of finding the exact expat
> that APR found?
>> + else
>> + #Fundamentally there is a difference in the way
>> expat(actually expat.h) is identified in the build system between the
>> apr-util and neon. apr-util explicitly identifies the expat in /usr,
>> /usr/local whereas neon hands off the task to AC_CHECK_HEADER autoconf macro
>> which just relies on the default behaviour of $(CC), $(CFLAGS) $(CPPFLAGS)
>> which seems to be fine in my gcc version 3.4.3 20041212 (Red Hat
>> 3.4.3-9.EL4) to identify expat located in /usr/local. Anyway could reproduce
>> the issue with the following command line after renaming all the instances
>> of xml-config, xml-config2, expat.h libxml2.so, libxml.so, libexpat.so in
>> /usr/include and /usr/lib dir and copying the libexpat.so and expat.h to
>> /usr/local/lib and /usr/local/include respectively.
>> + #./configure CFLAGS='-nostdinc -I/path/to/build/dir/neon/
>> -I/usr/include -I/usr/lib/gcc/<Your vendor info>/<Your gcc-version>/include
>> -I/usr/include/linux' CPPFLAGS='-nostdinc -I/usr/include
>> + if test -f /usr/local/include/expat.h; then
>> + args="$args CFLAGS='$CFLAGS -I/usr/local/include'
>> LDFLAGS='$LDFLAGS -L/usr/local/lib'"
>> + fi
>> SVN_SUBDIR_CONFIG(neon, $args)
> That's an awfully long comment... If it does need to be there (and
> I'm positive that the exact command to reproduce doesn't belong there)
> it should at least be broken into multiple lines as the rest of the
> file does, not one long line.
--- build/ac-macros/neon.m4 (revision 17664)
+++ build/ac-macros/neon.m4 (working copy)
@@ -79,6 +79,14 @@
# there, otherwise, neon is on its own to find expat.
if test -f "$abs_builddir/apr-util/xml/expat/lib/expat.h" ; then
+ #Fundamentally there is a difference in the way expat(actually expat.h) is identified in the build system between the apr-util and neon.
+ #apr-util explicitly identifies the expat in /usr, /usr/local
+ #neon hands off the task to AC_CHECK_HEADER autoconf macro which just relies on the default behaviour of $(CC), $(CFLAGS) $(CPPFLAGS) which seems to be fine in my gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) to identify expat located in /usr/local.
+ #The only effective difference is /usr/local this fix addresses that
+ if test -f /usr/local/include/expat.h; then
+ args="$args CFLAGS='$CFLAGS -I/usr/local/include' LDFLAGS='$LDFLAGS -L/usr/local/lib'"
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Thu Dec 8 07:25:53 2005