epics-base / pva2pva

PV Access gateway/proxy and EPICS Process Database integration
https://epics-base.github.io/pva2pva/
Other
4 stars 13 forks source link

Add module version numbering #5

Closed ralphlange closed 6 years ago

ralphlange commented 6 years ago

Adding the usual magic for module version numbers.

mdavidsaver commented 6 years ago

configure/CONFIG_PVA2PVA_VERSION is no problem. However, I don't want the *Version.h added. This module exports no API, so there is no reason for an API version header.

mdavidsaver commented 6 years ago

As for SHRLIB_VERSION = 1.0.0. This is acceptable in pdbApp/Makefile (where the ABI is defined in qsrv.dbd), but not in p2pApp/Makefile. libp2pcore.so is an implementation detail only meant for use with the p2p executable to which it is closely tied.

In fact, maybe it's best to force STATIC_BUILD=YES and SHARED_LIBRARIES=NO in p2pApp/Makefile and skip installing libp2pcore altogether.

mdavidsaver commented 6 years ago

In fact, maybe it's best to force STATIC_BUILD=YES and SHARED_LIBRARIES=NO in p2pApp/Makefile and skip installing libp2pcore altogether.

Seems like this isn't possible without a hack, even with TESTLIBRARY_HOST libp2pcore.so will be skipped, but libp2pcore.a is still installed.

INSTALL_LIB = ./dummy
SHARED_LIBRARIES=NO
TESTLIBRARY_HOST += p2pcore

Setting INSTALL_LIB to something under O.$(T_A) seems ugly. Perhaps @anjohnson has an idea.

anjohnson commented 6 years ago

even with TESTLIBRARY_HOST libp2pcore.so will be skipped, but libp2pcore.a is still installed.

That's a build system bug then, TESTLIBRARY targets shouldn't get installed (that's the only reason they exist). Confirmed, investigating...

anjohnson commented 6 years ago

Ok, it only gets installed when you try to use it. When I comment out the PROD_HOST=p2p it no longer happens. Printing p2p_DEPLIBS I get

p2p_DEPLIBS = ' /local/anj/base-7.0.1-pre1/lib/linux-x86_64/libp2pcore.a  /local/anj/base-7.0.1-pre1/lib/linux-x86_64/libpvAccessIOC.a  /local/anj/base-7.0.1-pre1/lib/linux-x86_64/libpvAccess.a  /local/anj/base-7.0.1-pre1/lib/linux-x86_64/libpvData.a  /local/anj/base-7.0.1-pre1/lib/linux-x86_64/libCom.a'

So it's being installed because we tell GNUmake the p2p executable depends on it being there. Argh, this is in RULES_TEMPLATE, and what's more it's the TARGET2_template definition...

I think I have a solution, which is to move some definitions around inside RULES_TARGET. I will test it properly and confirm later; the fix probably needs to go into 3.14 and be merged up.

anjohnson commented 6 years ago

RULES change pushed to 3.15, feel free to merge up if you want it.

mdavidsaver commented 6 years ago

After hitting problems with windows and osx builds, e69f99c57e4c3233735893202348df82ba1fe5fd eliminates libp2pcore and libtestutils. dd48d9355c2206feb40b7693f8683fb640c53749 exports the module and ABI versions as Makefile variables only. The remaining library libqsrv has an SONAME set. So I think the goal of this PR has been achieved.