You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Reser <be...@reser.org> on 2013/05/10 22:55:16 UTC
Problems building trunk (and probably 1.8.x) on FreeBSD 9.0
I was trying to build trunk on some ASF Infrastructure machines that
have FreeBSD 9.0 on them.
I ran into the following error:
[[[
/bin/sh /home/breser/trunk/libtool --tag=CC --silent --mode=compile
gcc -std=c89 -g -O2 -g -O2 -I./subversion/include -I./subversion
-I/usr/local/include/apr-1 -I/usr/local/include/apr-1
-I/usr/local/include -I/usr/local/include/db48
-I/home/breser/trunk/sqlite-amalgamation -o
subversion/libsvn_subr/sqlite.lo -c subversion/libsvn_subr/sqlite.c
subversion/libsvn_subr/sqlite.c:65:2: error: #error SQLite is too old
-- version 3.7.12 is the minimum required version
*** Error code 1
]]]
The problem is happening because the machine has the FreeBSD 9.0
sqlite package installed, which happens to be 3.7.10. Not a problem
I'll just use an amalgamation build so I run `./get-dep.sh sqlite`.
The problem is that FreeBSD's `apu-1-config --includes` has
-I/usr/local/include included in the output (which is where
sqlite3ext.h is installed). I'm not sure what the precise reason for
this is but I'm assuming there's some legit reason.
Putting SVN_SQLITE_INCLUDES earlier in the INCLUDES list solves the problem:
[[[
Index: Makefile.in
===================================================================
--- Makefile.in (revision 1481158)
+++ Makefile.in (working copy)
@@ -121,10 +121,11 @@
LT_CXX_LIBADD = @LT_CXX_LIBADD@
INCLUDES = -I$(top_srcdir)/subversion/include -I$(top_builddir)/subversion \
+ @SVN_SQLITE_INCLUDES@ \
@SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@
@SVN_APR_MEMCACHE_INCLUDES@ \
@SVN_DB_INCLUDES@ @SVN_GNOME_KEYRING_INCLUDES@ \
@SVN_KWALLET_INCLUDES@ @SVN_MAGIC_INCLUDES@ \
- @SVN_SASL_INCLUDES@ @SVN_SERF_INCLUDES@ @SVN_SQLITE_INCLUDES@ \
+ @SVN_SASL_INCLUDES@ @SVN_SERF_INCLUDES@ \
@SVN_XML_INCLUDES@ @SVN_ZLIB_INCLUDES@
]]]
Does that seem like a reasonable change for us to make?
Re: Problems building trunk (and probably 1.8.x) on FreeBSD 9.0
Posted by Daniel Shahaf <da...@elego.de>.
Ben Reser wrote on Fri, May 10, 2013 at 13:55:16 -0700:
> The problem is that FreeBSD's `apu-1-config --includes` has
> -I/usr/local/include included in the output (which is where
> sqlite3ext.h is installed). I'm not sure what the precise reason for
> this is but I'm assuming there's some legit reason.
>
I said it on IRC but I'll repeat here for posterity:
It seems that another fix would be for the FreeBSD APR port to install
its headers in e.g. /usr/local/include/apr-1/apr-1/apr_pools.h, rather
than /usr/local/include/apr-1/apr_pools.h, so that `apr-1-config --includes`
doesn't need to list -I/usr/local/include, which may pull in other
libraries' headers as well.
-
I'll note that some of infra's primary services, which run on FreeBSD,
run into similar problems with the system libapr and our self-compiled
(not-via-ports) libapr. The solution we use is:
% sudo gzip /usr/local/lib/libapr*
% make && sudo make install # uses our self-compiled libapr
% sudo gunzip /usr/local/lib/libapr*
Not pretty, but works.
> Putting SVN_SQLITE_INCLUDES earlier in the INCLUDES list solves the problem:
> [[[
> Index: Makefile.in
> ===================================================================
> --- Makefile.in (revision 1481158)
> +++ Makefile.in (working copy)
> @@ -121,10 +121,11 @@
> LT_CXX_LIBADD = @LT_CXX_LIBADD@
>
> INCLUDES = -I$(top_srcdir)/subversion/include -I$(top_builddir)/subversion \
> + @SVN_SQLITE_INCLUDES@ \
> @SVN_APR_INCLUDES@ @SVN_APRUTIL_INCLUDES@
> @SVN_APR_MEMCACHE_INCLUDES@ \
> @SVN_DB_INCLUDES@ @SVN_GNOME_KEYRING_INCLUDES@ \
> @SVN_KWALLET_INCLUDES@ @SVN_MAGIC_INCLUDES@ \
> - @SVN_SASL_INCLUDES@ @SVN_SERF_INCLUDES@ @SVN_SQLITE_INCLUDES@ \
> + @SVN_SASL_INCLUDES@ @SVN_SERF_INCLUDES@ \
> @SVN_XML_INCLUDES@ @SVN_ZLIB_INCLUDES@
> ]]]
>
> Does that seem like a reasonable change for us to make?