[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: libsvn_subr-1.so: undefined reference to `APR_STATUS_IS_SUCCESS'

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-09-04 22:01:43 CEST

Jeff Kowalczyk wrote:
> I'm posting this subversion question/build bug because it could possibly
> have nothing to do with the Gentoo Linux it is being built on.
>
> This is the relevant error:
> ../../../subversion/libsvn_subr/.libs/libsvn_subr-1.so:
> undefined reference to `APR_STATUS_IS_SUCCESS'
>
> Thanks.
>
> http://bugs.gentoo.org/show_bug.cgi?id=62840
>
>
> After emerging apr-1.0.0 ( http://bugs.gentoo.org/show_bug.cgi?id=61045 ),
> I
> can finally try to build subversion-1.1.0_rc*.

The APR ABI changed between 0.9.x and 1.x.

Since subversion uses apr datatypes in its own public API, and subversion is
committed to maintaining ABI compatibility throughout 1.x, subversion is not
really meant to build against apr 1.x - apr 0.9.x only.

That said, if you are willing to accept that svn-1.x+apr-1.x will be ABI
incompatible with 'normal' svn-1.x, we do try to make it work. However, as
we are not paying close attention to apr 1.x, sometimes we are slow catching
up with changes. This is one of those circumstances.

Your options:
1. Build subversion against apr 0.9.x (which can co-exist in the same
installation prefix with apr-1.x)

2. Apply the patch appended to this email (which is r10438 of subversion
trunk, and is expected to be present in 1.1.0rc3 and later).

Max.

Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 10437)
+++ subversion/libsvn_subr/io.c (revision 10438)
@@ -223,7 +223,7 @@
               apr_status_t apr_err_2 = apr_stat (&finfo, unique_name_apr,
                                                  APR_FINFO_TYPE, pool);

- if (APR_STATUS_IS_SUCCESS (apr_err_2)
+ if (!apr_err_2
                   && (finfo.filetype == APR_DIR))
                 continue;

@@ -308,7 +308,7 @@
               apr_status_t apr_err_2 = apr_stat (&finfo, unique_name_apr,
                                                  APR_FINFO_TYPE, pool);

- if (APR_STATUS_IS_SUCCESS (apr_err_2)
+ if (!apr_err_2
                   && (finfo.filetype == APR_DIR))
                 continue;

@@ -2383,7 +2383,7 @@

   status = apr_dir_is_empty (path_apr, pool);

- if (APR_STATUS_IS_SUCCESS (status))
+ if (!status)
     *is_empty_p = TRUE;
   else if (APR_STATUS_IS_ENOTEMPTY (status))
     *is_empty_p = FALSE;
Index: subversion/tests/libsvn_delta/svndiff-test.c
===================================================================
--- subversion/tests/libsvn_delta/svndiff-test.c (revision 10437)
+++ subversion/tests/libsvn_delta/svndiff-test.c (revision 10438)
@@ -50,7 +50,7 @@
   pool = svn_pool_create (NULL);
   apr_err = apr_file_open (&source_file, argv[1], (APR_READ | APR_BINARY),
                            APR_OS_DEFAULT, pool);
- if (! APR_STATUS_IS_SUCCESS (apr_err))
+ if (apr_err)
     {
       fprintf (stderr, "unable to open \"%s\" for reading\n", argv[1]);
       exit (1);
@@ -58,7 +58,7 @@

   apr_err = apr_file_open (&target_file, argv[2], (APR_READ | APR_BINARY),
                            APR_OS_DEFAULT, pool);
- if (! APR_STATUS_IS_SUCCESS (apr_err))
+ if (apr_err)
     {
       fprintf (stderr, "unable to open \"%s\" for reading\n", argv[2]);
       exit (1);
Index: subversion/tests/libsvn_delta/vdelta-test.c
===================================================================
--- subversion/tests/libsvn_delta/vdelta-test.c (revision 10437)
+++ subversion/tests/libsvn_delta/vdelta-test.c (revision 10438)
@@ -85,7 +85,7 @@
   apr_err = apr_file_open (&fp, path, (APR_READ | APR_BINARY),
                            APR_OS_DEFAULT, pool);

- if (! APR_STATUS_IS_SUCCESS (apr_err))
+ if (apr_err)
     {
       fprintf (stderr, "unable to open \"%s\" for reading\n", path);
       exit (1);
Index: subversion/libsvn_ra_svn/cram.c
===================================================================
--- subversion/libsvn_ra_svn/cram.c (revision 10437)
+++ subversion/libsvn_ra_svn/cram.c (revision 10438)
@@ -144,9 +144,9 @@

   /* Send a challenge. */
   status = make_nonce(&nonce);
- if (APR_STATUS_IS_SUCCESS(status))
+ if (!status)
     status = apr_gethostname(hostbuf, sizeof(hostbuf), pool);
- if (!APR_STATUS_IS_SUCCESS(status))
+ if (status)
     return fail(conn, pool, "Internal server error in authentication");
   challenge = apr_psprintf(pool,
                            "<%" APR_UINT64_T_FMT ".%" APR_TIME_T_FMT
"@%s>",
Index: subversion/libsvn_ra_svn/marshal.c
===================================================================
--- subversion/libsvn_ra_svn/marshal.c (revision 10437)
+++ subversion/libsvn_ra_svn/marshal.c (revision 10438)
@@ -121,7 +121,7 @@
     }
   pfd.p = pool;
   pfd.reqevents = APR_POLLIN;
- return (APR_STATUS_IS_SUCCESS(apr_poll(&pfd, 1, &n, 0)) && n);
+ return ((apr_poll(&pfd, 1, &n, 0) == APR_SUCCESS) && n);
 }

 /* --- WRITE BUFFER MANAGEMENT --- */
Index: subversion/libsvn_fs_fs/fs_fs.c
===================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 10437)
+++ subversion/libsvn_fs_fs/fs_fs.c (revision 10438)
@@ -3268,10 +3268,10 @@

   /* Match the perms on the old file to the perms reference file. */
   status = apr_stat (&finfo, perms_reference, APR_FINFO_PROT, pool);
- if (! APR_STATUS_IS_SUCCESS (status))
+ if (status)
     return svn_error_wrap_apr (status, _("Can't stat '%s'"),
perms_reference);
   status = apr_file_perms_set (old_filename, finfo.protection);
- if (! APR_STATUS_IS_SUCCESS (status))
+ if (status)
     return svn_error_wrap_apr (status, _("Can't chmod '%s'"),
old_filename);
 #endif

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 4 22:02:20 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.