Closed ralphlange closed 7 years ago
Is done with the latest update
Well, that's not really true. opcUaDevSupApp/Makefile
contains
EXTLIB_INSTALLS += $(INSTALL_LIB)/libuastack.so
[...]
build: $(EXTLIB_INSTALLS)
[...]
$(INSTALL_LIB)/lib%.so : $(UASDK)/lib/lib%.so
$(ECHO) "Installing $@, $<"
$(INSTALL) -d -m 555 $< $(@D)
which unconditionally installs libuastack.so from the external location into the device support module.
So ... before issuing another PR, I will try to outline the situation.
In terms of SDK shared library deployment, there are three common use cases we should cover:
In terms of STATIC vs. DYNAMIC build, the following applies:
All the above complies with the SDK license, as no header files nor API documentation is being deployed or used outside of the development system.
Configuration uses three variables:
UASDK = <location of the Unified Automation SDK>
UASDK_DEPLOY_MODE = SYSTEM | PROVIDED | INSTALL
SHARED_LIBRARIES = YES | NO
These should be set inside the CONFIG_SITE
or an CONFIG_SITE.local
file.
@bkuner, do you agree?
What should be the default for the UASDK_DEPLOY_MODE
?
I would propose SYSTEM (or PROVIDED) for Linux.
@rvuga: What would be the most common option for Windows?
Oops - sorry for the noise. I will remove the reference until this is ready to be pulled.
Update: I just realized a mistake. Since this is a module building a library (and not building an IOC), the static libraries have also to be copied into the application in the INSTALL (3.) case.
In terms of STATIC vs. DYNAMIC build, the following applies:
Hi, sorry for late reply.
For Windows the most common use case is the following:
Our use case is anyhow a bit special. We build EPICS base and all supporting modules statically and link against dlls. And because dlls requires a different CRT (at least for pre-VS14 versions) we've changed default EPICS base build configuration to use dynamic CRT for static builds as well... That said for Windows the only viable option is to have the SHARED_LIBRARIES set to Yes.
Sorry - the question about PROVIDED/INSTALL is meant a bit different. Say that you are running a couple of IOCs from different TOP structures on a single Windows host. Would you assume that the user has one installment of the SDK DLLs in a specified place (PROVIDED), or would you assume that each IOC should find a copy of the SDK DLLs in the same directory as the IOC binary (INSTALL)?
So if I understand correctly, you are asking which would be the common option that the users would prefer? It is hard to say, both are valid choices. If you run several IOCs, of which one may need a different SDK version than the others, then the INSTALL option may be less painful.
Sure. I'm just trying to find out if in the Windows world (that I hardly know) things would be handled somehow completely different, making one of the options very unlikely or very likely to be the most common one.
Currently, my leaning is to make PROVIDED the default in both worlds. That would be the most simple approach, needing less specific stuff and documentation. Anyone handling things differently can just set things in their CONFIG_SITE.local to whatever they need.
Yup, that sounds good.
Closed by merging the PR #32
In
opcUaDevSupApp/Makefile
, the way that the external SDK is being used is quite non-standard: libraries from the SDK are copied (installed) in the application.In the case of static (.a) libraries, the libraries should be used in place (in the SDK location). Once they are linked into the binaries or generated library, they are not used anymore.
In the case of static (.so) libraries, the user should have the option of copying those into the application (so that they are deployed with the created library or binaries) or using them in place (in the SDK location) assuming they will be installed in target systems as a dependency of the device support.