You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brad Walker <me...@bradmwalker.com> on 2008/07/13 06:08:17 UTC

subversion-1.5.0 Build Problems on OpenBSD 4.4

Hello,

I'm working on updating the OpenBSD subversion port to v1.5.0. 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:

checking for ruby... /usr/local/bin/ruby
checking for rb_hash_foreach()... yes
checking for rdoc... /usr/local/bin/rdoc
checking for Ruby major version... 1
checking for Ruby minor version... 8
checking swig version... 1.3.24
configure: WARNING: Detected SWIG version 1.3.24
configure: WARNING: Subversion requires 1.3.24 or later, and is known to
work
configure: WARNING: with versions up to 1.3.31
configure: Configuring python swig binding
checking for Python includes... -I/usr/local/include/python2.5
checking for compiling Python extensions... cc -pthread
-fno-strict-aliasing -DNDEBUG -O2 -pipe  -DTHREAD_STACK_SIZE=0x20000
-fPIC -fPIC
checking for linking Python extensions... cc -shared
-L/usr/ports/lang/python/2.5/w-Python-2.5.2/Python-2.5.2
-L/usr/local/lib/python2.5/config -lpython2.5
checking for linking Python libraries...
-L/usr/ports/lang/python/2.5/w-Python-2.5.2/Python-2.5.2
-L/usr/local/lib/python2.5/config -lpython2.5
checking for apr_int64_t Python/C API format string... L
checking perl version... 5008008
configure: Configuring Ruby SWIG binding
checking for Ruby include path... -I.
-I/usr/local/lib/ruby/1.8/i386-openbsd4.4
checking how to compile Ruby extensions... cc -O2 -pipe  -fPIC
checking how to link Ruby extensions... cc -shared -fPIC -shrext .so
checking for linking Ruby libraries... -Wl,-R -Wl,/usr/local/lib
-L/usr/local/lib -lruby
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



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@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 su!
 bversion/bindings/swig/python/svn_client.c
mkdir subversion/bindings/swig/python/.libs
 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 -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@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



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@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

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



Brad Walker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: subversion-1.5.0 Build Problems on OpenBSD 4.4

Posted by Stefan Sperling <st...@elego.de>.
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])
    AC_CACHE_VAL([svn_cv_ruby_sitedir_libsuffix],[
      svn_cv_ruby_sitedir_libsuffix="`echo \"$rbconfig_sitelibdir\" | \
                                        sed -e \"s,^$rbconfig_sitedir,,\"`"
    ])
    SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}"
    AC_MSG_RESULT([$SWIG_RB_SITE_LIB_DIR])

    AC_MSG_CHECKING([where to install Ruby extensions])
    AC_CACHE_VAL([svn_cv_ruby_sitedir_archsuffix],[
      svn_cv_ruby_sitedir_archsuffix="`echo \"$rbconfig_sitearchdir\" | \
                                        sed -e \"s,^$rbconfig_sitedir,,\"`"
    ])
    SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}"


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
/bin/sh
$ 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
1.8/i386-openbsd4.4

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@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
> -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 -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@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@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"
   else
     ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    LIBS="-l$ac_lib -liconv $ac_func_search_save_LIBS"
   fi
   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}
  MULTI_PACKAGES+=       -ap2
+ SHARED_ONLY=   Yes

because mod_dav_svn cannot be built statically.

Stefan