Hey Alexander,
many thanks for your investigation! I think the root cause of this is that
oap.c should not live in gprs. It is in there because it's so thin and we
(probably) figured it wouldn't be worth the effort putting it elsewhere.
So after all, it *would* have been worth the effort, because we wouldn't
have to wonder about it today ;)
I'll have another look and see whether I can easily pull OAP into a
separate, tiny static lib, or otherwise I'll just add a comment at those
"if HAVE_" places.
So, whether oap is built currently is indirectly
dependent on the
presence of LIBCARES and LIBGTP, but the patch would not have been
needed, because of the conditional in tests/Makefile.am.
Maybe the patch fixes an error if one runs 'make' in tests/oap directly?
Or a missing autoreconf after pulling? ... something like that probably.
It's all a bit ocnfusing :-)
quite soncufing, agreed ;)
Thanks again!
~Neels
On Mon, Jan 25, 2016 at 11:49:53PM +0100, Alexander Huemer wrote:
Hi!
On Mon, Jan 18, 2016 at 11:09:35AM +0100, Neels Hofmeyr wrote:
about your commit on openbsc, merged as 6cacc56d:
libgtp should not be a
prerequisite for OAP. OAP is a rather simple protocol built on an IPA
connection and doesn't really relate to GTP at all.
So if your build of OAP was dependent on libgtp, that's a bug, and
probably my fault.
Could you please verify / indicate the failure you saw so we/I can fix
it?
I just revisited the situation.
The tests in tests/oap are either way only built when both LIBCARES and
LIBGTP are present because of the clause in tests/Makefile.am.
At this point I cannot reconstruct how exactly I came up with this
patch.
I think that conditional in tests/Makefile.am is there because of the
similar conditional in src/gprs.
osmo-sgsn only gets built when those two libraries are present.
src/gprs/oap.o is a dependency of only osmo-sgsn.
When the tests in tests/oap are built unconditionally, but osmo-sgsn
wasn't built before because of a missing dependency, that fails with:
make[3]: Entering directory
'/home/blackbit/src/telco/osmo/openbsc/openbsc/tests/oap'
CC ../../src/gprs/oap.o
../../src/gprs/oap.c:256:1: fatal error: opening dependency file
.deps/../../src/gprs/oap.Tpo: No such file or directory
}
^
compilation terminated.
Makefile:375: recipe for target '../../src/gprs/oap.o' failed
make[3]: *** [../../src/gprs/oap.o] Error 1
oap.o isn't built in this case if it is needed, it is pulled in with
LDADD.
Interestingly, while digging around I found a different minor issue in
the buildsystem that is only visible when the dependencies are installed
in distinct directories. It's surprising that I didn't stumble upon that
initially. I'll send a seperate patch for that.
Kind regards,
-Alex
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de>
http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Holger Freyther, Harald Welte