You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/05/14 04:28:01 UTC

HEAD broken?

/root/apache/httpd-2.0/support/htpasswd.c:409: undefined reference to
`apr_app_initialize'
/root/apache/httpd-2.0/support/htpasswd.c:414: undefined reference to
`apr_pool_create_ex'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_pstrmemdup'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_allocator_free'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_time_exp_get'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_allocator_destroy'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_allocator_alloc'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_mmap_dup'
/root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
reference to `apr_allocator_create'
collect2: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Justin, is this related to your recent commits?

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: HEAD broken?

Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, May 14, 2002 at 12:27:18AM -0700, Greg Stein wrote:
> -1 on the two commits.
> 
> I don't think that is right. It is entirely possible that the install
> location will NOT have the .la file. It might only have .so libs and maybe a
> .a lib.
> 
> I think the changes should be reverted, or changed as I describe below.

As usual, you're right.  =)

I've changed them to meet your description.  -- justin

Re: HEAD broken?

Posted by Greg Stein <gs...@lyra.org>.
On Mon, May 13, 2002 at 08:08:04PM -0700, Justin Erenkrantz wrote:
> On Mon, May 13, 2002 at 10:54:55PM -0400, Cliff Woolley wrote:
> > On Mon, 13 May 2002, Justin Erenkrantz wrote:
> > 
> > > Hmm.  We could modify apr-config to always print the la-file even
> > > if it doesn't exist yet.  Can you try this?
> > 
> > That fixed it.
> 
> Okay, I committed changes to both apr-config and apu-config so
> that they will always print the .la file information.  -- justin

-1 on the two commits.

I don't think that is right. It is entirely possible that the install
location will NOT have the .la file. It might only have .so libs and maybe a
.a lib.

I think the changes should be reverted, or changed as I describe below.

The simple answer is that Cliff had old libraries, and the link line
happened to pick them up first, in preference to the .la file from the local
build directory.

I would say that if location==build, then you can force the .la file. That
would also fix this particular case.

And the definition for --apr-la-file is empty, or the .la file. The doc
specifically states "if available". That is very important when you're
considering an installation that does not include the .la file.

For example, apr-1.0-1.i386.rpm might install *only* the .so file and its
symlinks. apr-devel would install the .a and .la files and the headers.
Thus, it would be quite reasonable and possible that a .la file does not
exist in a particular installation.

Cheers,
-g

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

Re: HEAD broken?

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 13 May 2002, Justin Erenkrantz wrote:

> Okay, I committed changes to both apr-config and apu-config so
> that they will always print the .la file information.  -- justin

Thanks!!

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: HEAD broken?

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, May 13, 2002 at 10:54:55PM -0400, Cliff Woolley wrote:
> On Mon, 13 May 2002, Justin Erenkrantz wrote:
> 
> > Hmm.  We could modify apr-config to always print the la-file even
> > if it doesn't exist yet.  Can you try this?
> 
> That fixed it.

Okay, I committed changes to both apr-config and apu-config so
that they will always print the .la file information.  -- justin

Re: HEAD broken?

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 13 May 2002, Justin Erenkrantz wrote:

> Hmm.  We could modify apr-config to always print the la-file even
> if it doesn't exist yet.  Can you try this?

That fixed it.

Thanks,
Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: HEAD broken?

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, May 13, 2002 at 10:40:21PM -0400, Cliff Woolley wrote:
> On Mon, 13 May 2002, Justin Erenkrantz wrote:
> 
> > > Justin, is this related to your recent commits?
> >
> > I don't think so, but what does your link line say?  It looks like
> > apr isn't being linked in correctly.  -- justin
> 
> Aww crap, I see what's happening.  Because of the way it's finding -lapr
> now, it's finding the very old copy I have installed in /usr/local/lib and
> using it in preference to the one I just built.  That's why only *some* of
> the APR symbols show up missing... it's just the ones that have been added
> since I built that old copy in /usr/local/lib.

Hmm.  We could modify apr-config to always print the la-file even
if it doesn't exist yet.  Can you try this?  

Actually, I bet if you re-ran configure right now, apr-config would
print the .la file since it *now* exists (so it won't do the -L.. -lapr
construct).

I was considering that only printing the LA_FILE only when it exists
seems bogus.  -- justin

Index: apr-config.in
===================================================================
RCS file: /home/cvs/apr/apr-config.in,v
retrieving revision 1.15
diff -u -r1.15 apr-config.in
--- apr-config.in	1 Apr 2002 19:30:27 -0000	1.15
+++ apr-config.in	14 May 2002 02:44:56 -0000
@@ -185,19 +185,10 @@
     fi
     ;;
     --link-libtool)
-    if test -f "$LA_FILE"; then
-        flags="$flags $LA_FILE"
-    elif test "$location" = "installed"; then
-        ### avoid using -L if libdir is a "standard" location like /usr/lib
-        flags="$flags -L$libdir -lapr"
-    else
-        flags="$flags -L$thisdir -lapr"
-    fi
+    flags="$flags $LA_FILE"
     ;;
     --apr-la-file)
-    if test -f "$LA_FILE"; then
-        flags="$flags $LA_FILE"
-    fi
+    flags="$flags $LA_FILE"
     ;;
     --apr-so-ext)
     echo "$APR_SO_EXT"

Re: HEAD broken?

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 13 May 2002, Justin Erenkrantz wrote:

> > Justin, is this related to your recent commits?
>
> I don't think so, but what does your link line say?  It looks like
> apr isn't being linked in correctly.  -- justin

Aww crap, I see what's happening.  Because of the way it's finding -lapr
now, it's finding the very old copy I have installed in /usr/local/lib and
using it in preference to the one I just built.  That's why only *some* of
the APR symbols show up missing... it's just the ones that have been added
since I built that old copy in /usr/local/lib.

Example:

/bin/sh /root/apache/httpd-2.0/srclib/apr/libtool --silent --mode=link gcc
-g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes
-Wmissing-declarations -pthread -DNO_DBM_REWRITEMAP    -DLINUX=2
-D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE
-D_GNU_SOURCE -DAP_DEBUG -DAP_HAVE_DESIGNATED_INITIALIZER
-I/root/apache/httpd-2.0/srclib/apr/include
-I/root/apache/httpd-2.0/srclib/apr-util/include -I/usr/local/include -I.
-I/root/apache/httpd-2.0/os/unix
-I/root/apache/httpd-2.0/server/mpm/prefork
-I/root/apache/httpd-2.0/modules/http
-I/root/apache/httpd-2.0/modules/proxy -I/root/apache/httpd-2.0/include
-I/usr/include/openssl -I/root/apache/httpd-2.0/modules/dav/main
-export-dynamic -L/usr/local/lib   -o htpasswd  htpasswd.lo
-L/usr/local/lib   -lz -lssl -lcrypto
/root/apache/httpd-2.0/srclib/pcre/libpcre.la
-L/root/apache/httpd-2.0/srclib/apr-util -laprutil -lgdbm -ldb
/usr/local/lib/libexpat.la -L/root/apache/httpd-2.0/srclib/apr -lapr -lm
-lcrypt -lnsl -ldl

--Cliff




--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Re: HEAD broken?

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, May 13, 2002 at 10:28:01PM -0400, Cliff Woolley wrote:
> 
> /root/apache/httpd-2.0/support/htpasswd.c:409: undefined reference to
> `apr_app_initialize'
> /root/apache/httpd-2.0/support/htpasswd.c:414: undefined reference to
> `apr_pool_create_ex'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_pstrmemdup'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_allocator_free'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_time_exp_get'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_allocator_destroy'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_allocator_alloc'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_mmap_dup'
> /root/apache/httpd-2.0/srclib/apr-util/.libs/libaprutil.so: undefined
> reference to `apr_allocator_create'
> collect2: ld returned 1 exit status
> make[2]: *** [htpasswd] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all-recursive] Error 1
> 
> Justin, is this related to your recent commits?

I don't think so, but what does your link line say?  It looks like
apr isn't being linked in correctly.  -- justin