You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Justin Erenkrantz <je...@apache.org> on 2002/05/14 18:56:12 UTC

[PATCH] Use libtool dependency code

This patch is a first cut at enabling the libtool intra-library
dependency code for httpd-2.0, apr, and apr-util.  This is part of
the rationale for switching to libtool-1.4.  It compiles fine here
with libtool-1.4.2 on Linux.

AIUI, this would not work on libtool-1.3.  So, if someone who has
1.3 can test it and report positively or negatively on this patch,
that'd be great.

I think Jeff said that he needs to check out the patch on AIX to
see what happens.  I forget what the problem that we ran into
before was, but we'll find out soon enough.  -- justin

Index: configure.in
===================================================================
RCS file: /home/cvs/httpd-2.0/configure.in,v
retrieving revision 1.220
diff -u -r1.220 configure.in
--- configure.in	14 May 2002 07:51:52 -0000	1.220
+++ configure.in	14 May 2002 16:46:57 -0000
@@ -408,7 +408,7 @@
 AP_LIBS="$abs_builddir/srclib/pcre/libpcre.la $AP_LIBS"
 
 dnl APR should go after the other libs, so the right symbols can be picked up
-AP_LIBS="$AP_LIBS `$apu_config --link-libtool --libs` `$apr_config --link-libtool --libs`"
+AP_LIBS="$AP_LIBS `$apu_config --link-libtool` `$apr_config --link-libtool`"
 APACHE_SUBST(AP_LIBS)
 APACHE_SUBST(AP_BUILD_SRCLIB_DIRS)
 APACHE_SUBST(AP_CLEAN_SRCLIB_DIRS)
Index: srclib/apr/Makefile.in
===================================================================
RCS file: /home/cvs/apr/Makefile.in,v
retrieving revision 1.75
diff -u -r1.75 Makefile.in
--- srclib/apr/Makefile.in	13 May 2002 05:33:39 -0000	1.75
+++ srclib/apr/Makefile.in	14 May 2002 16:46:59 -0000
@@ -95,7 +95,7 @@
 
 $(TARGET_LIB):
 	@for i in $(SUBDIRS); do objects="$$objects $$i/*.@so_ext@"; done ; \
-	    tmpcmd="$(LINK) @lib_target@ @lib_target_libs@"; \
+	    tmpcmd="$(LINK) @lib_target@ @lib_target_libs@ $(EXTRA_LDFLAGS) $(EXTRA_LIBS)"; \
 	    echo $$tmpcmd; \
 	    $$tmpcmd
 
Index: srclib/apr-util/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/Makefile.in,v
retrieving revision 1.66
diff -u -r1.66 Makefile.in
--- srclib/apr-util/Makefile.in	14 May 2002 08:37:17 -0000	1.66
+++ srclib/apr-util/Makefile.in	14 May 2002 16:47:01 -0000
@@ -75,7 +75,7 @@
 
 $(TARGET_LIB):
 	@objects="`find $(SUBDIRS) -name expat -prune -o -name 'gen_uri_delims.@so_ext@' -prune -o -name '*.@so_ext@' -print`"; \
-	    tmpcmd="$(LINK) @lib_target@ @EXTRA_OS_LINK@"; \
+	    tmpcmd="$(LINK) @lib_target@ @EXTRA_OS_LINK@ $(APRUTIL_LDFLAGS) $(APRUTIL_LIBS)"; \
 	    echo $$tmpcmd; \
 	    $$tmpcmd
 
Index: srclib/apr-util/build/apu-conf.m4
===================================================================
RCS file: /home/cvs/apr-util/build/apu-conf.m4,v
retrieving revision 1.42
diff -u -r1.42 apu-conf.m4
--- srclib/apr-util/build/apu-conf.m4	14 May 2002 09:14:39 -0000	1.42
+++ srclib/apr-util/build/apu-conf.m4	14 May 2002 16:47:01 -0000
@@ -22,7 +22,7 @@
   APR_BUILD_DIR="`cd $APR_BUILD_DIR && pwd`"
 
   APR_INCLUDES="`$apr_config --includes`"
-  APR_LIBS="`$apr_config --link-libtool --libs`"
+  APR_LIBS="`$apr_config --link-libtool`"
   APR_SO_EXT="`$apr_config --apr-so-ext`"
   APR_LIB_TARGET="`$apr_config --apr-lib-target`"
 
@@ -527,7 +527,6 @@
   expat_libs="-lexpat"
   expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
   APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
-  APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libtool])
 else
 if test "$expat_include_dir" = "$srcdir/xml/expat/include" -o "$expat_include_dir" = "$srcdir/xml/expat/lib"; then
   dnl This is a bit of a hack.  This only works because we know that
@@ -539,9 +538,6 @@
   expat_libs="-lexpat"
   expat_libtool=$top_builddir/$bundled_subdir/lib/libexpat.la
   APR_XML_SUBDIRS="`echo $bundled_subdir | sed -e 's%xml/%%'`"
-  APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libtool])
-else
-  APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libs])
 fi
 fi
 APR_XML_DIR=$bundled_subdir
@@ -553,6 +549,7 @@
 if test "$expat_include_dir" != "/usr/include"; then
   APR_ADDTO(APRUTIL_INCLUDES, [-I$expat_include_dir])
 fi
+APR_ADDTO(APRUTIL_EXPORT_LIBS, [$expat_libs])
 APR_ADDTO(APRUTIL_LDFLAGS, [$expat_ldflags])
 APR_ADDTO(APRUTIL_LIBS, [$expat_libtool])
 ])

Re: [PATCH] Use libtool dependency code

Posted by Greg Stein <gs...@lyra.org>.
On Tue, May 14, 2002 at 09:56:12AM -0700, Justin Erenkrantz wrote:
> This patch is a first cut at enabling the libtool intra-library
> dependency code for httpd-2.0, apr, and apr-util.  This is part of
> the rationale for switching to libtool-1.4.  It compiles fine here
> with libtool-1.4.2 on Linux.
> 
> AIUI, this would not work on libtool-1.3.  So, if someone who has
> 1.3 can test it and report positively or negatively on this patch,
> that'd be great.

Why even bother testing against 1.3? Let's just change buildcheck.sh to
require libtool 1.4 and go from there.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [PATCH] Use libtool dependency code

Posted by Jeff Trawick <tr...@attglobal.net>.
Justin Erenkrantz <je...@apache.org> writes:

> This patch is a first cut at enabling the libtool intra-library
> dependency code for httpd-2.0, apr, and apr-util.  This is part of
> the rationale for switching to libtool-1.4.  It compiles fine here
> with libtool-1.4.2 on Linux.

Does binbuild work for you with this patch?  I never got to the bottom
of what was failing on AIX, but I suspected a build order problem that
caused it to fail if one of the support libraries didn't already exist
(yeah, that is pretty vague :( ).  It didn't seem like a
libtool-on-AIX problem.

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Re: [PATCH] Use libtool dependency code

Posted by Jeff Trawick <tr...@attglobal.net>.
Jeff Trawick <tr...@attglobal.net> writes:

> I'm getting a weird problem with an Apache binary build:
> 
> Binary image successfully created...
> exec(): 0509-036 Cannot load program ./bindist/bin/httpd because of the following errors:
>         0509-150   Dependent module libaprutil.so could not be loaded.
>         0509-022 Cannot load module libaprutil.so.
>         0509-026 System error: A file or directory in the path name
> does not exist.
> Creating supplementary files...
> exec(): 0509-036 Cannot load program ./bindist/bin/httpd because of the following errors:
>         0509-150   Dependent module libaprutil.so could not be loaded.
>         0509-022 Cannot load module libaprutil.so.
>         0509-026 System error: A file or directory in the path name
> does not exist.

aprutil just isn't getting installed for some reason.  More research
is required on my part...

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...

Re: [PATCH] Use libtool dependency code

Posted by Jeff Trawick <tr...@attglobal.net>.
Justin Erenkrantz <je...@apache.org> writes:

> This patch is a first cut at enabling the libtool intra-library
> dependency code for httpd-2.0, apr, and apr-util.  This is part of
> the rationale for switching to libtool-1.4.  It compiles fine here
> with libtool-1.4.2 on Linux.
> 
> AIUI, this would not work on libtool-1.3.  So, if someone who has
> 1.3 can test it and report positively or negatively on this patch,
> that'd be great.
> 
> I think Jeff said that he needs to check out the patch on AIX to
> see what happens.  I forget what the problem that we ran into
> before was, but we'll find out soon enough.  -- justin

I'm getting a weird problem with an Apache binary build:

Binary image successfully created...
exec(): 0509-036 Cannot load program ./bindist/bin/httpd because of the following errors:
        0509-150   Dependent module libaprutil.so could not be loaded.
        0509-022 Cannot load module libaprutil.so.
        0509-026 System error: A file or directory in the path name
does not exist.
Creating supplementary files...
exec(): 0509-036 Cannot load program ./bindist/bin/httpd because of the following errors:
        0509-150   Dependent module libaprutil.so could not be loaded.
        0509-022 Cannot load module libaprutil.so.
        0509-026 System error: A file or directory in the path name
does not exist.
Creating distribution archive and readme file...
Ready.
You can find the binary archive
(httpd-2.0-powerpc-ibm-aix4.3.3.0.tar.gz)
and the readme file (httpd-2.0-powerpc-ibm-aix4.3.3.0.README) in the
parent directory.

I need to look into this further.

(I first patched binbuild.sh to work-around current breakage with the
BinaryDistribution layout.  I'm 90% sure that binbuild.sh didn't have
this problem before your patch, but I'll double check.)

-- 
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...