From d0d2956a6447c0c41622ca29872fd8d159360bd0 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Oct 2023 15:10:48 -0700 Subject: [PATCH 1/4] missing NDPLUGIN_API --- ADApp/pluginSrc/NDFileHDF5AttributeDataset.h | 3 ++- ADApp/pluginSrc/NDFileHDF5Dataset.h | 3 ++- ADApp/pluginSrc/NDPluginAttrPlot.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ADApp/pluginSrc/NDFileHDF5AttributeDataset.h b/ADApp/pluginSrc/NDFileHDF5AttributeDataset.h index 83fc008f0..d11417c95 100644 --- a/ADApp/pluginSrc/NDFileHDF5AttributeDataset.h +++ b/ADApp/pluginSrc/NDFileHDF5AttributeDataset.h @@ -12,10 +12,11 @@ #include #include #include +#include #include "NDFileHDF5Layout.h" #include "NDFileHDF5VersionCheck.h" -class NDFileHDF5AttributeDataset +class NDPLUGIN_API NDFileHDF5AttributeDataset { public: NDFileHDF5AttributeDataset(hid_t file, const std::string& name, NDAttrDataType_t type); diff --git a/ADApp/pluginSrc/NDFileHDF5Dataset.h b/ADApp/pluginSrc/NDFileHDF5Dataset.h index caa765145..9b6eba96e 100644 --- a/ADApp/pluginSrc/NDFileHDF5Dataset.h +++ b/ADApp/pluginSrc/NDFileHDF5Dataset.h @@ -3,12 +3,13 @@ #include #include +#include #include "NDPluginFile.h" #include "NDFileHDF5VersionCheck.h" /** Class used for writing a Dataset with the NDFileHDF5 plugin. */ -class NDFileHDF5Dataset +class NDPLUGIN_API NDFileHDF5Dataset { public: NDFileHDF5Dataset(asynUser *pAsynUser, const std::string& name, hid_t dataset); diff --git a/ADApp/pluginSrc/NDPluginAttrPlot.h b/ADApp/pluginSrc/NDPluginAttrPlot.h index fbfafc63f..ee1fe91dc 100644 --- a/ADApp/pluginSrc/NDPluginAttrPlot.h +++ b/ADApp/pluginSrc/NDPluginAttrPlot.h @@ -17,6 +17,7 @@ #include "CircularBuffer.h" +#include #include #include @@ -42,7 +43,7 @@ class NDPluginAttrPlot; /** * A task that periodically executes the data exposure method of the plugin. */ -class ExposeDataTask : public epicsThreadRunable +class NDPLUGIN_API ExposeDataTask : public epicsThreadRunable { public: /** From db1ae27bbe79f8af144922f7cb1fa7c4e995168c Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Oct 2023 15:11:56 -0700 Subject: [PATCH 2/4] no -DH5_NO_DEPRECATED_SYMBOLS by default complicates forwards compatibility --- ADApp/pluginSrc/Makefile | 2 +- ADApp/pluginTests/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ADApp/pluginSrc/Makefile b/ADApp/pluginSrc/Makefile index f3e2c74f4..73ee6c267 100644 --- a/ADApp/pluginSrc/Makefile +++ b/ADApp/pluginSrc/Makefile @@ -8,7 +8,7 @@ LIBRARY_IOC += NDPlugin DBD += NDPluginSupport.dbd # Persuade travis (ubuntu 12.04) to use HDF5 API V2 (1.8 rather than default 1.6) -USR_CXXFLAGS_Linux += -DH5_NO_DEPRECATED_SYMBOLS -DH5Gopen_vers=2 +USR_CXXFLAGS_Linux += -DH5Gopen_vers=2 # json.hpp requires C++11 NDPluginBadPixel_CXXFLAGS_Linux += -std=c++11 diff --git a/ADApp/pluginTests/Makefile b/ADApp/pluginTests/Makefile index de11dcc75..512d99057 100644 --- a/ADApp/pluginTests/Makefile +++ b/ADApp/pluginTests/Makefile @@ -5,8 +5,8 @@ include $(TOP)/configure/CONFIG #============================= # Persuade travis (ubuntu 12.04) to use HDF5 API V2 (1.8 rather than default 1.6) -USR_CXXFLAGS_Linux += -DH5_NO_DEPRECATED_SYMBOLS -DH5Dopen_vers=2 -DH5Gcreate_vers=2 -USR_CFLAGS_Linux += -DH5_NO_DEPRECATED_SYMBOLS -DH5Dopen_vers=2 -DH5Gcreate_vers=2 +USR_CXXFLAGS_Linux += -DH5Dopen_vers=2 -DH5Gcreate_vers=2 +USR_CFLAGS_Linux += -DH5Dopen_vers=2 -DH5Gcreate_vers=2 ifeq ($(SHARED_LIBRARIES), YES) USR_CXXFLAGS_WIN32 += -DH5_BUILT_AS_DYNAMIC_LIB From f8ae44b315424c4bb34ed2643fc32e22c2ff946e Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Oct 2023 15:13:22 -0700 Subject: [PATCH 3/4] only static version of ADTestUtility No dllimport/export --- ADApp/pluginTests/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ADApp/pluginTests/Makefile b/ADApp/pluginTests/Makefile index 512d99057..d17181012 100644 --- a/ADApp/pluginTests/Makefile +++ b/ADApp/pluginTests/Makefile @@ -4,6 +4,9 @@ include $(TOP)/configure/CONFIG # ADD MACRO DEFINITIONS AFTER THIS LINE #============================= +# Only build static version of ADTestUtility (missing dllimport/export) +SHARED_LIBRARIES=NO + # Persuade travis (ubuntu 12.04) to use HDF5 API V2 (1.8 rather than default 1.6) USR_CXXFLAGS_Linux += -DH5Dopen_vers=2 -DH5Gcreate_vers=2 USR_CFLAGS_Linux += -DH5Dopen_vers=2 -DH5Gcreate_vers=2 From db47e11267d8a349d4d46acb4a334660cc538619 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Oct 2023 15:14:06 -0700 Subject: [PATCH 4/4] update ci-scripts Add case with -fvisibility=hidden to enforce use of API macros --- .ci | 2 +- .github/workflows/ci-scripts.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.ci b/.ci index e0a7c5216..899b18336 160000 --- a/.ci +++ b/.ci @@ -1 +1 @@ -Subproject commit e0a7c52160dd22d76ce0aa290f08a2fa200a52a1 +Subproject commit 899b18336b4ce3bd9328fd30c33621224c78a4d7 diff --git a/.github/workflows/ci-scripts.yml b/.github/workflows/ci-scripts.yml index 156ffe38e..bb2e91d41 100644 --- a/.github/workflows/ci-scripts.yml +++ b/.github/workflows/ci-scripts.yml @@ -20,6 +20,7 @@ jobs: BCFG: ${{ matrix.configuration }} BASE: ${{ matrix.base }} SET: ${{ matrix.deps }} + EXTRA: ${{ matrix.extra }} strategy: fail-fast: false @@ -31,6 +32,8 @@ jobs: configuration: default base: "7.0" deps: os + extra: "CMD_CFLAGS='-fvisibility=hidden' + CMD_CXXFLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'" test: true - os: ubuntu-latest