osmo-bsc[master]: Fix tests linking

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Dec 7 03:28:05 UTC 2017


Patch Set 1:

(6 comments)

seems to me a lot of nice tries but no firm grip on the problem. BTW, parallel build of osmo-bsc hasn't failed for me (TM) yet. Is there a particular reason why it started failing for you?

https://gerrit.osmocom.org/#/c/5084/1//COMMIT_MSG
Commit Message:

Line 10: libcommon-cs but neither libbsc itself nor tests using it are actually
AFAIK linking happens only when compiling an executable like osmo-bsc, and for compiling libbsc the ordering doesn't matter. What you want is that all the libs are built before the tests are built?


https://gerrit.osmocom.org/#/c/5084/1/src/Makefile.am
File src/Makefile.am:

Line 25: 	libcommon-cs \
> I'm not 100% sure but I think that parallel make takes this into account. A
did you mean "make -j"?

It must be "coincidence", i.e. libcommon-cs comes up a bit sooner and hence may already be built when linking a test. It is not a guarantee to work. I don't know a sure way of tying dependencies in other dirs for parallel builds... I think at some point I did a '$(make) -C ../foo target' but that's ugly.

One way to un-parallelize is used in some Makefile.am for external tests: have a single make target running the parts in sequence explicitly. Unfortunately not an option for SUBDIRS.


https://gerrit.osmocom.org/#/c/5084/1/src/libbsc/Makefile.am
File src/libbsc/Makefile.am:

Line 20: libbsc_a_LIBADD = $(top_builddir)/src/libcommon-cs/libcommon-cs.a
We're not linking dependencies when building a library, are we?


https://gerrit.osmocom.org/#/c/5084/1/src/libbsc/gsm_04_08_utils.c
File src/libbsc/gsm_04_08_utils.c:

Line 32: #include <osmocom/bsc/common_cs.h>
does this fix compiler warnings? Otherwise it's not necessary.


https://gerrit.osmocom.org/#/c/5084/1/tests/abis/Makefile.am
File tests/abis/Makefile.am:

Line 30: 	$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
if any build worked before linking this, then how is it necessary to link this now?


https://gerrit.osmocom.org/#/c/5084/1/tests/nanobts_omlattr/Makefile.am
File tests/nanobts_omlattr/Makefile.am:

Line 29: 	$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
if any build worked before linking this, then how is it necessary to link this now?


-- 
To view, visit https://gerrit.osmocom.org/5084
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib195694ef92dd6f2328ffa3a818379f3742c5084
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list