Here are a bunch of buildsystem tweaks for openbsc. I'm not sure whether it is warranted to group them as a patch series, as they are (should be) independent of each other.
From: Andreas Rottmann a.rottmann@gmx.at
When libosmo-netif and/or libosmo-abis are installed in distinct prefixes, the build failed with non-found headers. --- openbsc/src/libfilter/Makefile.am | 2 +- openbsc/src/libtrau/Makefile.am | 2 +- openbsc/src/osmo-bsc/Makefile.am | 2 +- openbsc/src/osmo-bsc_mgcp/Makefile.am | 3 ++- openbsc/tests/gbproxy/Makefile.am | 2 +- openbsc/tests/gprs/Makefile.am | 2 +- openbsc/tests/mgcp/Makefile.am | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/openbsc/src/libfilter/Makefile.am b/openbsc/src/libfilter/Makefile.am index 4dbc590..ed3cd43 100644 --- a/openbsc/src/libfilter/Makefile.am +++ b/openbsc/src/libfilter/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) + $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(COVERAGE_CFLAGS)
noinst_LIBRARIES = libfilter.a
diff --git a/openbsc/src/libtrau/Makefile.am b/openbsc/src/libtrau/Makefile.am index 0c8cf17..0fe3a53 100644 --- a/openbsc/src/libtrau/Makefile.am +++ b/openbsc/src/libtrau/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(LIBOSMONETIF_CFLAGS) $(COVERAGE_CFLAGS) AM_LDFLAGS = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOABIS_LIBS) $(COVERAGE_LDFLAGS)
noinst_LIBRARIES = libtrau.a diff --git a/openbsc/src/osmo-bsc/Makefile.am b/openbsc/src/osmo-bsc/Makefile.am index b4a2cba..69b363b 100644 --- a/openbsc/src/osmo-bsc/Makefile.am +++ b/openbsc/src/osmo-bsc/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) -AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(COVERAGE_CFLAGS) $(LIBOSMOABIS_CFLAGS) +AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) $(LIBOSMOCTRL_CFLAGS) $(LIBOSMONETIF_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(COVERAGE_CFLAGS) $(LIBOSMOABIS_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS)
bin_PROGRAMS = osmo-bsc diff --git a/openbsc/src/osmo-bsc_mgcp/Makefile.am b/openbsc/src/osmo-bsc_mgcp/Makefile.am index fba76b4..c62131b 100644 --- a/openbsc/src/osmo-bsc_mgcp/Makefile.am +++ b/openbsc/src/osmo-bsc_mgcp/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir) AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) \ - $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) $(COVERAGE_CFLAGS) + $(LIBOSMOVTY_CFLAGS) $(LIBOSMOABIS_CFLAGS) \ + $(LIBOSMONETIF_CFLAGS) $(COVERAGE_CFLAGS)
bin_PROGRAMS = osmo-bsc_mgcp
diff --git a/openbsc/tests/gbproxy/Makefile.am b/openbsc/tests/gbproxy/Makefile.am index f6dd785..4577e3a 100644 --- a/openbsc/tests/gbproxy/Makefile.am +++ b/openbsc/tests/gbproxy/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS)
EXTRA_DIST = gbproxy_test.ok diff --git a/openbsc/tests/gprs/Makefile.am b/openbsc/tests/gprs/Makefile.am index 616042b..633c362 100644 --- a/openbsc/tests/gprs/Makefile.am +++ b/openbsc/tests/gprs/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOABIS_CFLAGS)
EXTRA_DIST = gprs_test.ok
diff --git a/openbsc/tests/mgcp/Makefile.am b/openbsc/tests/mgcp/Makefile.am index ce9e596..08fde85 100644 --- a/openbsc/tests/mgcp/Makefile.am +++ b/openbsc/tests/mgcp/Makefile.am @@ -1,5 +1,5 @@ AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(top_srcdir) -AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(COVERAGE_CFLAGS) $(LIBBCG729_CFLAGS) +AM_CFLAGS=-Wall -ggdb3 $(LIBOSMOCORE_CFLAGS) $(LIBOSMONETIF_CFLAGS) $(LIBOSMOSCCP_CFLAGS) $(COVERAGE_CFLAGS) $(LIBBCG729_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS)
EXTRA_DIST = mgcp_test.ok mgcp_transcoding_test.ok
From: Andreas Rottmann a.rottmann@gmx.at
Having subdir-objects enabled is recommended by automake 1.14, to avoid future incompatibilities.
However, adding that option breaks out-of-tree builds, and also seems to break "make distclean" for in-tree builds. The reason is that apparently, automake with subdir-objects enabled cannot cope with source files in a different, non-child directory. To avoid that, we simply compile the files referenced in this way into a static library in their own source directory, and instead of referencing the source files, we link against that library.
Besides making the build system a bit more future proof, this change also potentially enhances build times, as it reduces the number of compiler invocations, in exchange a slight increase of "ar" invocations. --- openbsc/configure.ac | 2 +- openbsc/src/gprs/Makefile.am | 20 ++++++++++++-------- openbsc/src/osmo-bsc_nat/Makefile.am | 7 +++++-- openbsc/tests/bsc-nat-trie/Makefile.am | 6 +++--- openbsc/tests/bsc-nat/Makefile.am | 11 +++-------- openbsc/tests/bsc/Makefile.am | 6 +++--- openbsc/tests/gprs/Makefile.am | 6 +++--- openbsc/tests/smpp/Makefile.am | 7 ++++--- 8 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/openbsc/configure.ac b/openbsc/configure.ac index fb6feb9..e022393 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -3,7 +3,7 @@ AC_INIT([openbsc], m4_esyscmd([./git-version-gen .tarball-version]), [openbsc@lists.osmocom.org])
-AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([subdir-objects dist-bzip2]) AC_CONFIG_TESTDIR(tests)
dnl kernel style compile messages diff --git a/openbsc/src/gprs/Makefile.am b/openbsc/src/gprs/Makefile.am index f46a402..9765cdd 100644 --- a/openbsc/src/gprs/Makefile.am +++ b/openbsc/src/gprs/Makefile.am @@ -16,18 +16,22 @@ bin_PROGRAMS += osmo-sgsn endif endif
+noinst_LIBRARIES = libgprs.a + +libgprs_a_SOURCES = gprs_gb_parse.c crc24.c gprs_utils.c \ + gprs_llc.c gprs_llc_parse.c gprs_llc_vty.c \ + gprs_subscriber.c \ + gprs_gsup_messages.c gprs_gsup_client.c + osmo_gbproxy_SOURCES = gb_proxy.c gb_proxy_main.c gb_proxy_vty.c \ - gb_proxy_patch.c gb_proxy_tlli.c gb_proxy_peer.c \ - gprs_gb_parse.c gprs_llc_parse.c crc24.c gprs_utils.c -osmo_gbproxy_LDADD = $(top_builddir)/src/libcommon/libcommon.a \ + gb_proxy_patch.c gb_proxy_tlli.c gb_proxy_peer.c +osmo_gbproxy_LDADD = libgprs.a $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) -lrt
osmo_sgsn_SOURCES = gprs_gmm.c gprs_sgsn.c gprs_sndcp.c gprs_sndcp_vty.c \ sgsn_main.c sgsn_vty.c sgsn_libgtp.c \ - gprs_llc.c gprs_llc_parse.c gprs_llc_vty.c crc24.c \ - sgsn_ctrl.c sgsn_auth.c gprs_subscriber.c \ - gprs_gsup_messages.c gprs_utils.c gprs_gsup_client.c \ - gsm_04_08_gprs.c sgsn_cdr.c sgsn_ares.c -osmo_sgsn_LDADD = \ + sgsn_ctrl.c sgsn_auth.c \ + gsm_04_08_gprs.c sgsn_cdr.c +osmo_sgsn_LDADD = libgprs.a \ $(top_builddir)/src/libcommon/libcommon.a \ -lgtp $(OSMO_LIBS) $(LIBOSMOABIS_LIBS) $(LIBCARES_LIBS) -lrt diff --git a/openbsc/src/osmo-bsc_nat/Makefile.am b/openbsc/src/osmo-bsc_nat/Makefile.am index d96a391..a38d68a 100644 --- a/openbsc/src/osmo-bsc_nat/Makefile.am +++ b/openbsc/src/osmo-bsc_nat/Makefile.am @@ -3,12 +3,15 @@ AM_CFLAGS=-Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) $(LIBOSMOVTY_CFLAGS) AM_LDFLAGS = $(COVERAGE_LDFLAGS)
bin_PROGRAMS = osmo-bsc_nat +noinst_LIBRARIES = libbsc_nat.a
- -osmo_bsc_nat_SOURCES = bsc_filter.c bsc_mgcp_utils.c bsc_nat.c bsc_nat_utils.c \ +libbsc_nat_a_SOURCES = \ + bsc_filter.c bsc_mgcp_utils.c bsc_nat_utils.c \ bsc_nat_vty.c bsc_sccp.c bsc_ussd.c bsc_nat_ctrl.c \ bsc_nat_rewrite.c bsc_nat_rewrite_trie.c bsc_nat_filter.c +osmo_bsc_nat_SOURCES = bsc_nat.c osmo_bsc_nat_LDADD = \ + libbsc_nat.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ diff --git a/openbsc/tests/bsc-nat-trie/Makefile.am b/openbsc/tests/bsc-nat-trie/Makefile.am index cf8ebaf..64c71ba 100644 --- a/openbsc/tests/bsc-nat-trie/Makefile.am +++ b/openbsc/tests/bsc-nat-trie/Makefile.am @@ -6,9 +6,9 @@ EXTRA_DIST = bsc_nat_trie_test.ok prefixes.csv
noinst_PROGRAMS = bsc_nat_trie_test
-bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c -bsc_nat_trie_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ +bsc_nat_trie_test_SOURCES = bsc_nat_trie_test.c +bsc_nat_trie_test_LDADD = $(top_builddir)/src/osmo-bsc_nat/libbsc_nat.a \ + $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ diff --git a/openbsc/tests/bsc-nat/Makefile.am b/openbsc/tests/bsc-nat/Makefile.am index 26e5500..c1a5b1a 100644 --- a/openbsc/tests/bsc-nat/Makefile.am +++ b/openbsc/tests/bsc-nat/Makefile.am @@ -6,15 +6,10 @@ EXTRA_DIST = bsc_nat_test.ok bsc_data.c barr.cfg barr_dup.cfg prefixes.csv
noinst_PROGRAMS = bsc_nat_test
-bsc_nat_test_SOURCES = bsc_nat_test.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_filter.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_sccp.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_utils.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_rewrite_trie.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_mgcp_utils.c \ - $(top_srcdir)/src/osmo-bsc_nat/bsc_nat_filter.c +bsc_nat_test_SOURCES = bsc_nat_test.c + bsc_nat_test_LDADD = \ + $(top_builddir)/src/osmo-bsc_nat/libbsc_nat.a \ $(top_builddir)/src/libfilter/libfilter.a \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ diff --git a/openbsc/tests/bsc/Makefile.am b/openbsc/tests/bsc/Makefile.am index 8b786ff..7c3a219 100644 --- a/openbsc/tests/bsc/Makefile.am +++ b/openbsc/tests/bsc/Makefile.am @@ -6,9 +6,9 @@ EXTRA_DIST = bsc_test.ok
noinst_PROGRAMS = bsc_test
-bsc_test_SOURCES = bsc_test.c \ - $(top_srcdir)/src/osmo-bsc/osmo_bsc_filter.c -bsc_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ +bsc_test_SOURCES = bsc_test.c +bsc_test_LDADD = $(top_builddir)/src/osmo-bsc/libbsc.a \ + $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libmgcp/libmgcp.a \ $(top_builddir)/src/libtrau/libtrau.a \ diff --git a/openbsc/tests/gprs/Makefile.am b/openbsc/tests/gprs/Makefile.am index 633c362..44d9965 100644 --- a/openbsc/tests/gprs/Makefile.am +++ b/openbsc/tests/gprs/Makefile.am @@ -5,7 +5,7 @@ EXTRA_DIST = gprs_test.ok
noinst_PROGRAMS = gprs_test
-gprs_test_SOURCES = gprs_test.c $(top_srcdir)/src/gprs/gprs_utils.c \ - $(top_srcdir)/src/gprs/gprs_gsup_messages.c +gprs_test_SOURCES = gprs_test.c
-gprs_test_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) +gprs_test_LDADD = $(top_builddir)/src/gprs/libgprs.a \ + $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) diff --git a/openbsc/tests/smpp/Makefile.am b/openbsc/tests/smpp/Makefile.am index b3d4568..d36266d 100644 --- a/openbsc/tests/smpp/Makefile.am +++ b/openbsc/tests/smpp/Makefile.am @@ -6,7 +6,8 @@ EXTRA_DIST = smpp_test.ok smpp_test.err
noinst_PROGRAMS = smpp_test
-smpp_test_SOURCES = smpp_test.c \ - $(top_builddir)/src/libmsc/smpp_utils.c -smpp_test_LDADD = $(LIBOSMOCORE_LIBS) \ +smpp_test_SOURCES = smpp_test.c +smpp_test_LDADD = \ + $(top_builddir)/src/libmsc/libmsc.a + $(LIBOSMOCORE_LIBS) \ $(top_builddir)/src/libcommon/libcommon.a
On 16 Jun 2015, at 23:23, Andreas Rottmann mail@rotty.xx.vu wrote:
From: Andreas Rottmann a.rottmann@gmx.at
Having subdir-objects enabled is recommended by automake 1.14, to avoid future incompatibilities.
However, adding that option breaks out-of-tree builds, and also seems to break "make distclean" for in-tree builds. The reason is that apparently, automake with subdir-objects enabled cannot cope with source files in a different, non-child directory. To avoid that, we simply compile the files referenced in this way into a static library in their own source directory, and instead of referencing the source files, we link against that library.
Besides making the build system a bit more future proof, this change also potentially enhances build times, as it reduces the number of compiler invocations, in exchange a slight increase of "ar" invocations.
That automake behavior is shameful. What would be the effort to get rid off the recursive make?
On Wed, Jun 17, 2015 at 07:47:45AM +0200, Holger Freyther wrote:
On 16 Jun 2015, at 23:23, Andreas Rottmann mail@rotty.xx.vu wrote:
From: Andreas Rottmann a.rottmann@gmx.at
Having subdir-objects enabled is recommended by automake 1.14, to avoid future incompatibilities.
However, adding that option breaks out-of-tree builds, and also seems to break "make distclean" for in-tree builds. The reason is that apparently, automake with subdir-objects enabled cannot cope with source files in a different, non-child directory. To avoid that, we simply compile the files referenced in this way into a static library in their own source directory, and instead of referencing the source files, we link against that library.
Besides making the build system a bit more future proof, this change also potentially enhances build times, as it reduces the number of compiler invocations, in exchange a slight increase of "ar" invocations.
That automake behavior is shameful. What would be the effort to get rid off the recursive make?
AFAIR there was a patch series a few years ago from Diego Elio Pettenò (flameeyes) that changed the build system behavior of several osmo* subprojects to use non recursive make. There were objections against them, so they were not merged.
Kind regards, -Alex
On 17 Jun 2015, at 10:04, Alexander Huemer alexander.huemer@xx.vu wrote:
AFAIR there was a patch series a few years ago from Diego Elio Pettenò (flameeyes) that changed the build system behavior of several osmo* subprojects to use non recursive make. There were objections against them, so they were not merged.
hehe, but we did merge parts of libosmocore? E.g. all test directories are non-recursive there?
Hi!
On Wed, Jun 17, 2015 at 01:36:05PM +0200, Holger Freyther wrote:
On 17 Jun 2015, at 10:04, Alexander Huemer alexander.huemer@xx.vu wrote:
AFAIR there was a patch series a few years ago from Diego Elio Pettenò (flameeyes) that changed the build system behavior of several osmo* subprojects to use non recursive make. There were objections against them, so they were not merged.
hehe, but we did merge parts of libosmocore? E.g. all test directories are non-recursive there?
The relevant commits with build system changes that were merged seem to be these:
7e007e0f87c4a06396ef46081ef1d69a4bdc11ae build: avoid multi-level recursion for src/ directory.
d471a2192015440ec9b8c409268ba6433511f421 build: simplify headers management and remove recursion
ea0e1eca2bc32b531242a3b0a3c471e492a6f493 build: simplify test handling and speed up build.
I can dig up the unmerged ones from the old ML if that's of any value.
Kind regards, -Alex
Hi!
On Wed, Jun 17, 2015 at 02:04:45PM +0200, Alexander Huemer wrote:
On Wed, Jun 17, 2015 at 01:36:05PM +0200, Holger Freyther wrote:
On 17 Jun 2015, at 10:04, Alexander Huemer alexander.huemer@xx.vu wrote:
AFAIR there was a patch series a few years ago from Diego Elio Pettenò (flameeyes) that changed the build system behavior of several osmo* subprojects to use non recursive make. There were objections against them, so they were not merged.
hehe, but we did merge parts of libosmocore? E.g. all test directories are non-recursive there?
The relevant commits with build system changes that were merged seem to be these:
7e007e0f87c4a06396ef46081ef1d69a4bdc11ae build: avoid multi-level recursion for src/ directory.
d471a2192015440ec9b8c409268ba6433511f421 build: simplify headers management and remove recursion
ea0e1eca2bc32b531242a3b0a3c471e492a6f493 build: simplify test handling and speed up build.
I can dig up the unmerged ones from the old ML if that's of any value.
Actually, all patches from flameeyes for libosmocore were merged.
Here are the overall numbers. merged/sent with commit summary lines of the unmerged patches.
libosmocore 12/12
libosmo-abis 7/7
libosmo-dsp 3/5 build: flatten build to a single Makefile.am build: avoid running unused checks
libosmo-sccp 0/7 mtp_pcap: mark structure as constant as well as static. m2ua: remove unset talloc context. build: flatten headers installation in include/Makefile.am build: set automake options in configure.ac only. build: simplify test build m2ua: accept a constant parameter in m2ua_from_msg. tests: remove warnings and make more data constant.
osmo-gmr 0/7 build: avoid recursing into include/ for non-installed headers. build: simplify building by avoiding recursion in src/. gmr1_rx: remove to variables set but not used build: simplify documentation install. build: remove unused test and get rid of libtool. build: move automake options to configure.ac gitignore: ignore src/gmr1_gen_mat as well.
sam7-util 2/2
Kind regards, -Alex
From: Andreas Rottmann a.rottmann@gmx.at
Running "make distcheck" failed trying to generate ".version" into the read-only unpacked source directory. Actually shipping ".version" in the tarball fixes that. --- openbsc/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openbsc/Makefile.am b/openbsc/Makefile.am index d7329ba..8696eb4 100644 --- a/openbsc/Makefile.am +++ b/openbsc/Makefile.am @@ -7,7 +7,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = openbsc.pc
BUILT_SOURCES = $(top_srcdir)/.version -EXTRA_DIST = git-version-gen osmoappdesc.py +EXTRA_DIST = git-version-gen osmoappdesc.py .version $(top_srcdir)/.version: echo $(VERSION) > $@-t && mv $@-t $@ dist-hook:
From: Andreas Rottmann a.rottmann@gmx.at
In the libfilter source code, which is built regardless of --enable-nat, headers from libosmo-sccp were used, thus causing a build failure (see below) when building without --enable-nat, and libosmo-sccp not being installed (or being installed in a prefix not otherwise included in the build).
The build fails like this:
In file included from ../../../src/libfilter/bsc_msg_filter.c:27:0: ../../../include/openbsc/bsc_nat_sccp.h:27:37: fatal error: osmocom/sccp/sccp_types.h: No such file or directory
As the includes seem not to be actually needed, this change fixes the issue by just omitting them. --- openbsc/src/libfilter/bsc_msg_filter.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/openbsc/src/libfilter/bsc_msg_filter.c b/openbsc/src/libfilter/bsc_msg_filter.c index be518a4..eafeff4 100644 --- a/openbsc/src/libfilter/bsc_msg_filter.c +++ b/openbsc/src/libfilter/bsc_msg_filter.c @@ -24,7 +24,6 @@ #include <openbsc/bsc_msg_filter.h>
#include <openbsc/bsc_nat.h> -#include <openbsc/bsc_nat_sccp.h> #include <openbsc/bsc_msc.h> #include <openbsc/gsm_data.h> #include <openbsc/debug.h> @@ -36,8 +35,6 @@ #include <osmocom/gsm/protocol/gsm_08_08.h> #include <osmocom/gsm/protocol/gsm_04_11.h>
-#include <osmocom/sccp/sccp.h> - int bsc_filter_barr_find(struct rb_root *root, const char *imsi, int *cm, int *lu) { struct bsc_filter_barr_entry *n;