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

Re: subversion-1.5.0 Build Problems on OpenBSD 4.4

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 20 Jul 2008 03:01:36 +0200

On Sun, Jul 13, 2008 at 12:08:17AM -0600, Brad Walker wrote:
> Hello,
> I'm working on updating the OpenBSD subversion port to v1.5.0.

Hey Brad, I'm just after doing the same thing.

> I've ran
> into two problems: Ruby SWIG configuration in `configure' and building
> subversion in a separate directory.
> First, subversion's configure script has invalid sed commands when
> detecting the Ruby lib and arch directories. I can workaround this
> problem by passing $svn_cv_ruby_sitedir_libsuffix and
> $svn_cv_ruby_sitedir_archsuffix to `configure'. Here's the output of
> `configure' when configuring SWIG:

I ran into these as well and found your mail in the archives
while looking for a solution.

For reference, the failing sed commands are the ones in this
snippet from build/ac-macros/swig.m4:

   AC_MSG_CHECKING([where to install Ruby scripts])
      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,,\"`"

The above seems to work fine on FreeBSD, but on OpenBSD
it's failing with:

> checking where to install Ruby scripts... sed: 1:
> ""s,^/usr/local/lib/ruby ...: invalid command code "
> /usr/local/lib/ruby/site_ruby
> checking where to install Ruby extensions... sed: 1:
> ""s,^/usr/local/lib/ruby ...: invalid command code "
> /usr/local/lib/ruby/site_ruby
> checking how to use output level for Ruby bindings tests... normal
> configure: creating ./config.status

... which results in Subversion's configure script installing files to
/usr/local/lib/ruby/svn instead of /usr/local/lib/ruby/1.8/i386-openbsd4.4/

It seems to be an issue with quoting. The escaped quotes in
sed -e \"s,^$rbconfig_sitedir,,\" should be passed on to sed unescaped,
but apparently sed sees the escapes.

On the shell prompt this works on both FreeBSD and OpenBSD, for me:

$ echo $SHELL
$ svn_cv_ruby_sitedir_archsuffix="`echo \"/usr/local/lib/ruby/site_ruby/1.8/i386-openbsd4.4\" | sed -e \"s,^/usr/local/lib/ruby/site_ruby/,,\"`"
$ echo $svn_cv_ruby_sitedir_archsuffix

The error message the configure script is printing happens on either
system when sed is passed escaped quotes, like this:

$ echo /usr/local/lib/ruby/site_ruby/1.8/i386-openbsd4.4 | sed -e \"s,^/usr/local/lib/ruby/site_ruby,,\"
sed: 1: ""s,^/usr/local/lib/ruby ...: invalid command code "

Any idea how we could fix this on our end?

> Subversion 1.4.6 built fine with configure run from a separate
> directory, but 1.5.0 has problems making swig-py and swig-rb and
> installing gettext files. OpenBSD ports extracts subversion
> into /usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/,
> creates a
> directory /usr/ports/devel/subversion/w-subversion-1.5.0/build-`uname
> -m`/, and then runs configure from the build-`uname -m` directory. It
> next runs make in the separate build directory. It builds fine until it
> it gets to the SWIG bindings and cannot find the files:
> [root_at_gibson /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386]#
> make swig-py
> /bin/sh /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/libtool --tag=CC --mode=compile cc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe -DTHREAD_STACK_SIZE=0x20000 -fPIC -fPIC -D_POSIX_THREADS -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/proxy -I/usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/subversion/bindings/swig/proxy -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/python2.5 -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/python/libsvn_swig_py -prefer-pic -c -o subversion/bindings/swig/python/svn_client.lo subversion/bindings/swig/python/svn_client.c
> mkdir subversion/bindings/swig/python/.libs
> cc -pthread -fno-strict-aliasing -DNDEBUG -O2 -pipe
> -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/proxy -I/usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/subversion/bindings/swig/proxy -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I/usr/local/include/python2.5 -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/python/libsvn_swig_py -c subversion/bindings/swig/python/svn_client.c -fPIC -DPIC -o subversion/bindings/swig/python/.libs/svn_client.o
> cc: subversion/bindings/swig/python/svn_client.c: No such file or
> directory
> cc: no input files
> *** Error code 1
> Stop in /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386 (line
> 1434
> of /usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/build-outputs.mk).
> [root_at_gibson /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386]#
> make swig-rb
> /bin/sh /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/libtool --tag=CC --mode=compile cc -O2 -pipe -fPIC -D_POSIX_THREADS -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/proxy -I/usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/subversion/bindings/swig/proxy -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I. -I/usr/local/lib/ruby/1.8/i386-openbsd4.4 -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/ruby/libsvn_swig_ruby -prefer-pic -c -o subversion/bindings/swig/ruby/svn_client.lo subversion/bindings/swig/ruby/svn_client.c
> cc -O2 -pipe -fPIC -D_POSIX_THREADS
> -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/include -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/proxy -I/usr/ports/devel/subversion/w-subversion-1.5.0/build-i386/subversion/bindings/swig/proxy -I/usr/local/include/apr-1/ -I/usr/local/include/apr-1/ -I/usr/local/include/db4 -I/usr/local/include -I. -I/usr/local/lib/ruby/1.8/i386-openbsd4.4 -I/usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/subversion/bindings/swig/ruby/libsvn_swig_ruby -c subversion/bindings/swig/ruby/svn_client.c -fPIC -DPIC -o subversion/bindings/swig/ruby/.libs/svn_client.o
> cc: subversion/bindings/swig/ruby/svn_client.c: No such file or
> directory
> cc: no input files
> *** Error code 1
> Stop in /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386 (line
> 1461
> of /usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/build-outputs.mk).
> Make target `swig-pl' works for whatever reason. I've worked around this
> by patching build-outputs.mk:
> http://bradmwalker.com/ports/patch-build-outputs_mk.diff

I've seen this problem as well and removed SEPARATE_BUILD from the
port's Makefile as a workaround.

Note that build-outputs.mk is generated, so we'll need to fix
this somewhere else at our end. I'll look into this.

> Also, make target `install-locale' can't find the locale files. The
> `install` make target doesn't install them either. Here's the
> `install-locale' output:
> [root_at_gibson /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386]#
> make install-locale
> /bin/mkdir -p /usr/local/share/locale
> /bin/mkdir -p /usr/local/share/locale/de/LC_MESSAGES
> cd subversion/po ; /usr/bin/install -c -o root -g bin -m 644
> de.mo /usr/local/share/locale/de/LC_MESSAGES/subversion.mo
> install: de.mo: No such file or directory
> *** Error code 71

Looking at config.log, the .mo files are not generated because the
configure script fails to detect the bindtextdomain() function.
The test link fails due to missing symbols from libiconv.
I'm getting this in config.log compiling your port:

configure:22607: cc -o conftest -O2 -pipe -D_POSIX_THREADS -L/usr/local/lib/db4 -L/usr/local/lib -L/usr/local/lib conftest.c -lintl >&5
/usr/local/lib/libintl.so.4.0: undefined reference to `libiconv_set_relocation_prefix'
/usr/local/lib/libintl.so.4.0: undefined reference to `libiconv_open'
/usr/local/lib/libintl.so.4.0: undefined reference to `libiconv'
collect2: ld returned 1 exit status

Configure then says: "WARNING: bindtextdomain() not found. Disabling NLS"

Note that your patch to update the port to 1.5.0 removes a -liconv that
the 1.4.4 port was patching into the configure script. I'll see if I can
get our configure script to try to link bindtextdomain() with -liconv
by default.

Here's a patch that might work for you in the meantime, untested:

--- configure.orig Sun Jul 20 02:33:21 2008
+++ configure Sun Jul 20 02:34:04 2008
@@ -22596,7 +22596,7 @@
     ac_res="none required"
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ LIBS="-l$ac_lib -liconv $ac_func_search_save_LIBS"
   rm -f conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"

> Stop in /usr/ports/devel/subversion/w-subversion-1.5.0/build-i386 (line
> 773
> of /usr/ports/devel/subversion/w-subversion-1.5.0/subversion-1.5.0/build-outputs.mk).
> My patch against OpenBSD's subversion 1.4.6 port can be found at:
> http://bradmwalker.com/ports/subversion-1.5.0.diff

That looks mostly like mine.
The only significant thing I've also changed is this:

  .if !${FLAVOR:L:Mno_ap2}

because mod_dav_svn cannot be built statically.


  • application/pgp-signature attachment: stored
Received on 2008-07-20 03:02:53 CEST

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

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