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

Re: All swig binding tests fail miserably on OpenBSD

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 16 Sep 2008 18:34:26 +0200

On Tue, Sep 16, 2008 at 08:41:11AM -0700, David James wrote:
> On Tue, Sep 16, 2008 at 6:40 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> > On Wed, Aug 20, 2008 at 09:50:14PM +0200, Stefan Sperling wrote:
> >> Hi,
> >>
> >> I am in the process of putting together a proper Subversion-1.5.1
> >> port for OpenBSD. Their current port is still at 1.4.4.
> >>
> >> I got most things working, except for the binding regression tests.
> >> I haven't tried javahl yet (planning to tackle that at some later time),
> >> but for all the swig-based bindings, the regression tests just flat
> >> out fail.
> >
> > For the record, Brad Walker managed to fix the problems by
> > regenerating all SWIG-generated files with swig-1.3.36:
> > http://marc.info/?l=openbsd-ports&m=122157221716865&w=2
> >
> > Why do we ship generated files in releases that don't work
> > on all platforms? Are files generated by SWIG even supposed
> > to work on all platforms?
> >
> > Stefan
> Hi Stefan,
> The pregenerated SWIG files shipped with Subversion are supposed to
> work on all platforms, but there may of course be bugs. Can you post a
> log of what commands you typed during your build? Start with the tar
> command that extracts from the tarball, and let me know whether or not
> you ran "autogen.sh".

Well, the commands are all issued by OpenBSD's ports system.
There might be some way of getting it to display the commands
it's running, but either way I don't expect this would help
us much. It seems to be a deeper problem in swig -- e.g. earlier
versions than 1.3.36 also results in regression test failures
in the bindings, even when regenerating everything.
See Brad's post: http://marc.info/?l=openbsd-ports&m=122157221716865&w=2

> Tip: If you extract from a release tarball, you shouldn't run
> autogen.sh, because the release tarball already has pregenerated
> headers, and running autogen.sh without cleaning out the old headers
> can cause you to use a mixed set of headers from multiple versions of
> SWIG. I don't know if this issue affects you, but it is a common
> problem.

There are bugs in our ac-macros that make the configure script
as shipped fail on OpenBSD.

See http://subversion.tigris.org/servlets/ReadMsg?listName=users&msgNo=80039

I have patches to fix these, both of which are included in the port
Brad Walker posted to the OpenBSD-ports list.

Here's the first patch. I intend to commit this, but I'm not sure
what would happen on *nix platforms lacking libintl.

(I'm not putting [PATCH] in the subject because I will
track these myself. Daniel, it's OK if you look away :)

Fix detection of native language support (NLS) on OpenBSD.

* configure.ac: -lintl may require symbols from libiconv.
   Pass -liconv as OTHER-LIBRARIES argument to AC_SEARCH_LIBS.
   Also invoke AC_CHECK_LIB on iconv to make sure that -liconv
   is included in LD_FLAGS.

--- configure.ac.orig Tue Jul 22 16:43:53 2008
+++ configure.ac Tue Aug 19 00:40:24 2008
@@ -306,7 +306,8 @@ if test "$enable_nls" = "yes"; then
                     AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.])
- ])
+ ], -liconv)
+ AC_CHECK_LIB(iconv, libiconv_open)
     if test "$enable_nls" = "yes"; then
                 [Define to 1 if translation of program messages to the user's

Here's the second patch. Not sure about committing this one yet,
as it would probably break things for paths containing spaces. :(

   Fix locating the architecture-specific directory for the
   ruby bindings on OpenBSD.

   Something on OpenBSD did not like the nested quotes in
   a sed command we used, so sed failed with the obscure
   message 'invalid command code "'.
   * build/ac-macros/swig.m4: Don't quote -e arguments to
      sed when determining svn_cv_ruby_sitedir_libsuffix.

--- build/ac-macros/swig.m4.orig Wed Aug 20 18:36:36 2008
+++ build/ac-macros/swig.m4 Wed Aug 20 18:37:18 2008
@@ -212,16 +212,16 @@ AC_DEFUN(SVN_FIND_SWIG,
     AC_MSG_CHECKING([where to install Ruby scripts])
- svn_cv_ruby_sitedir_libsuffix="`echo \"$rbconfig_sitelibdir\" | \
- sed -e \"s,^$rbconfig_sitedir,,\"`"
+ svn_cv_ruby_sitedir_libsuffix="`echo $rbconfig_sitelibdir | \
+ sed -e s,^$rbconfig_sitedir,,`"
     AC_MSG_CHECKING([where to install Ruby extensions])
- svn_cv_ruby_sitedir_archsuffix="`echo \"$rbconfig_sitearchdir\" | \
- sed -e \"s,^$rbconfig_sitedir,,\"`"
+ svn_cv_ruby_sitedir_archsuffix="`echo $rbconfig_sitearchdir | \
+ sed -e s,^$rbconfig_sitedir,,`"

There are still more bugs in our Makefiles, which render them
incompatible with BSD make. Currently, only GNU make can be used
to build the bindings. I will look into those, too, some day.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-16 18:34:51 CEST

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.