cms-gem-daq-project / xhal

XHAL interface library
0 stars 10 forks source link

RPM dependencies seem to be messed up #145

Closed mexanick closed 4 years ago

mexanick commented 4 years ago

Brief summary of issue

Since the dependencies change I've introduced have been reverted, now when trying to install a following problem appears

...
--> Finished Dependency Resolution
Beginning Kernel Module Plugin
Finished Kernel Module Plugin
Error: Package: xhal-server-4.0.0-1.0.441.dev.94435d1git.centos7.gcc8_2_1.x86_64 (gemos-test)
           Requires: xhal-base
Error: Package: xhal-server-4.0.0-1.0.441.dev.94435d1git.centos7.gcc8_2_1.x86_64 (gemos-test)
           Requires: xerces-c
Error: Package: xhal-client-4.0.0-1.0.441.dev.94435d1git.centos7.gcc8_2_1.x86_64 (gemos-test)
           Requires: xhal-base
Error: Package: xhal-client-4.0.0-1.0.441.dev.94435d1git.centos7.gcc8_2_1.x86_64 (gemos-test)
           Requires: xerces-c
 You could try using --skip-broken to work around the problem

Types of issue

Expected Behavior

Should be able to install without any issues

Current Behavior

Apparently xhal-base package is not created at all but listed as a dependency. libxhal-base.so is indeed created, but packages as xhal. Another (potentially bigger issue) is while xdaq is tied to a particular version of xerces-c and includes it, it is omitted in provides list:

yum provides xerces-c
Loaded plugins: changelog, fastestmirror, kernel-module, langpacks, protectbase, tsflags, versionlock
Loading mirror speeds from cached hostfile
github_git-lfs                                                                                                                                                                 58/58
github_git-lfs-source                                                                                                                                                          55/55
256 packages excluded due to repository protections
libxerces-c-3_1-3.1.1-2.1.el7.cern.x86_64 : Shared library for Xerces-C++ validating XML parser
Repo        : cern
Matched from:
Provides    : xerces-c = 3.1.1-2.1.el7.cern
libxerces-c-3_1-3.1.4-1.1.el7.cern.x86_64 : Shared library for Xerces-C++ validating XML parser
Repo        : cern
Matched from:
Provides    : xerces-c = 3.1.4-1.1.el7.cern
xerces-c-3.1.1-7.el7_1.i686 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-7.el7_1.x86_64 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-8.el7_2.i686 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-8.el7_2.x86_64 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-9.el7.i686 : Validating XML Parser
Repo        : base
xerces-c-3.1.1-9.el7.i686 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-9.el7.x86_64 : Validating XML Parser
Repo        : base
xerces-c-3.1.1-9.el7.x86_64 : Validating XML Parser
Repo        : updates
xerces-c-3.1.1-10.el7_7.i686 : Validating XML Parser
Repo        : updateserces-c-3.1.1-10.el7_7.x86_64 : Validating XML Parser
Repo        : updates

and as as consequence, we have:

yum info xerces-c
Loaded plugins: changelog, fastestmirror, kernel-module, langpacks, protectbase, tsflags, versionlock
Loading mirror speeds from cached hostfile
256 packages excluded due to repository protections
Available Packages
Name        : xerces-c
Arch        : i686
Version     : 3.1.1
Release     : 10.el7_7
Size        : 889 k
Repo        : updates/7/x86_64
Summary     : Validating XML Parser
URL         : http://xml.apache.org/xerces-c/
License     : ASL 2.0
Description : Xerces-C is a validating XML parser written in a portable
            : subset of C++. Xerces-C makes it easy to give your application the
            : ability to read and write XML data. A shared library is provided for
            : parsing, generating, manipulating, and validating XML
            : documents. Xerces-C is faithful to the XML 1.0 recommendation and
            : associated standards: XML 1.0 (Third Edition), XML 1.1 (First
            : Edition), DOM Level 1, 2, 3 Core, DOM Level 2.0 Traversal and Range,
            : DOM Level 3.0 Load and Save, SAX 1.0 and SAX 2.0, Namespaces in XML,
            : Namespaces in XML 1.1, XML Schema, XML Inclusions).

Name        : xerces-c
Arch        : x86_64
Version     : 3.1.1
Release     : 10.el7_7
Size        : 879 k
Repo        : updates/7/x86_64
Summary     : Validating XML Parser
URL         : http://xml.apache.org/xerces-c/
License     : ASL 2.0
Description : Xerces-C is a validating XML parser written in a portable
            : subset of C++. Xerces-C makes it easy to give your application the
            : ability to read and write XML data. A shared library is provided for
            : parsing, generating, manipulating, and validating XML
            : documents. Xerces-C is faithful to the XML 1.0 recommendation and
            : associated standards: XML 1.0 (Third Edition), XML 1.1 (First
            : Edition), DOM Level 1, 2, 3 Core, DOM Level 2.0 Traversal and Range,
            : DOM Level 3.0 Load and Save, SAX 1.0 and SAX 2.0, Namespaces in XML,
            : Namespaces in XML 1.1, XML Schema, XML Inclusions).

it is not listed as installed, so in case one has the repos above enabled, another copy of xerces-c will be installed during installation of xhal. After some investigation found an interesting case of ...hmm... rebranding?

yum provides cmsos-core-xerces
Loaded plugins: changelog, fastestmirror, kernel-module, langpacks, protectbase, tsflags, versionlock
Loading mirror speeds from cached hostfile
256 packages excluded due to repository protections
cmsos-core-xerces-3.2.0.2-1.r15.centos7.gcc8.x86_64 : C++ is a validating XML parser written in a portable subset of C++.
Repo        : cmsos-core
cmsos-core-xerces-3.2.0.2-2.r15.centos7.gcc8.x86_64 : C++ is a validating XML parser written in a portable subset of C++.
Repo        : cmsos-core
cmsos-core-xerces-3.2.0.2-2.r15.centos7.gcc8.x86_64 : C++ is a validating XML parser written in a portable subset of C++.
Repo        : @cmsos-core

Steps to Reproduce (for bugs)

  1. build xhal rpms
  2. copy them to the repository
  3. run yum install xhal\*

Possible Solution (for bugs)

jsturdy commented 4 years ago
diff --git a/xhal/include/packageinfo.h b/xhal/include/packageinfo.h
index 2d707a3..1bcd54e 100644
--- a/xhal/include/packageinfo.h
+++ b/xhal/include/packageinfo.h
@@ -3,15 +3,15 @@

 #ifndef DOXYGEN_IGNORE_THIS

-#define XHAL_REQUIRED_PACKAGE_LIST reedmuller,xerces-c
-#define XHAL_BASE_REQUIRED_PACKAGE_LIST reedmuller,xerces-c
-#define XHAL_CLIENT_REQUIRED_PACKAGE_LIST xhal-base,reedmuller,xerces-c
-#define XHAL_SERVER_REQUIRED_PACKAGE_LIST xhal-base,reedmuller,xerces-c,lmdb
+#define XHAL_REQUIRED_PACKAGE_LIST
+#define XHAL_BASE_REQUIRED_PACKAGE_LIST
+#define XHAL_CLIENT_REQUIRED_PACKAGE_LIST xhal
+#define XHAL_SERVER_REQUIRED_PACKAGE_LIST xhal,lmdb

-#define XHAL_BUILD_REQUIRED_PACKAGE_LIST reedmuller-devel,gem-peta-stage-ctp7
-#define XHAL_BASE_BUILD_REQUIRED_PACKAGE_LIST reedmuller-devel,gem-peta-stage-ctp7
-#define XHAL_CLIENT_BUILD_REQUIRED_PACKAGE_LIST reedmuller-devel,gem-peta-stage-ctp7
-#define XHAL_SERVER_BUILD_REQUIRED_PACKAGE_LIST reedmuller-devel,lmdb-devel,gem-peta-stage-ctp7
+#define XHAL_BUILD_REQUIRED_PACKAGE_LIST gem-peta-stage-ctp7
+#define XHAL_BASE_BUILD_REQUIRED_PACKAGE_LIST gem-peta-stage-ctp7
+#define XHAL_CLIENT_BUILD_REQUIRED_PACKAGE_LIST gem-peta-stage-ctp7
+#define XHAL_SERVER_BUILD_REQUIRED_PACKAGE_LIST lmdb-devel,gem-peta-stage-ctp7

 #endif

At a minimum, something like this should be all that's required (I think it was also mentioned in the original issue @mexanick reported and fixed), as the dependencies will be picked up by RPM during the creation itself (and here they'll get the actual soname versions that they're being built against, which the xdaq packages do declare as provides). The binary packages may not need any explicit things here (but at least the current ARM build fails with an empty list), and on the ARM since we disable the auto deps it's handy in the case that packages eventually are installed via a card-based package manager.

lpetre-ulb commented 4 years ago

"Fixed" (i.e. xHAL compiled statically) in the new repository.