dell / libsmbios

library for interacting with Dell SMBIOS tables
Other
190 stars 39 forks source link

drop libsmbios_c++ #27

Closed superm1 closed 6 years ago

superm1 commented 6 years ago

Nothing is using it in practice these days. It's bulky. It's easier, less error prone, and better to code once in a single language and then add bindings for others. It's causing failures in CI:

g++ -DHAVE_CONFIG_H -I. -I./out/include  -I./out/include -I./src/include -DLIBSMBIOS_LOCALEDIR=\"/usr/local/share/locale\"  -DBUILD_LINUX  -I/usr/include/libxml2 -I./src/libsmbios_c++/common  -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -fPIC -std=c++98 -MT src/cppunit/out_testPlatform-testPlatform.o -MD -MP -MF src/cppunit/.deps/out_testPlatform-testPlatform.Tpo -c -o src/cppunit/out_testPlatform-testPlatform.o `test -f 'src/cppunit/testPlatform.cpp' || echo './'`src/cppunit/testPlatform.cpp
In file included from /usr/include/c++/7/type_traits:35:0,
                 from /usr/include/cppunit/tools/StringHelper.h:7,
                 from /usr/include/cppunit/TestAssert.h:8,
                 from /usr/include/cppunit/TestCase.h:6,
                 from /usr/include/cppunit/TestCaller.h:5,
                 from /usr/include/cppunit/extensions/HelperMacros.h:9,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^~~~~
In file included from /usr/include/cppunit/TestAssert.h:8:0,
                 from /usr/include/cppunit/TestCase.h:6,
                 from /usr/include/cppunit/TestCaller.h:5,
                 from /usr/include/cppunit/extensions/HelperMacros.h:9,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: 'enable_if' in namespace 'std' does not name a template type
 typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
               ^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before '<' token
 typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
                        ^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: 'enable_if' in namespace 'std' does not name a template type
 typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
               ^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before '<' token
 typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
                        ^
In file included from /usr/include/cppunit/TestCase.h:6:0,
                 from /usr/include/cppunit/TestCaller.h:5,
                 from /usr/include/cppunit/extensions/HelperMacros.h:9,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/cppunit/TestAssert.h: In static member function 'static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)':
/usr/include/cppunit/TestAssert.h:74:42: error: 'toString' is not a member of 'CppUnit::StringHelper'
         return CPPUNIT_NS::StringHelper::toString(x);
                                          ^~~~~~~~
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: 'std::function' has not been declared
   TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
                                     ^~~~~~~~
/usr/include/cppunit/TestCaller.h:159:45: error: expected ',' or '...' before '<' token
   TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
                                             ^
/usr/include/cppunit/TestCaller.h:200:8: error: 'function' in namespace 'std' does not name a template type
   std::function<void()> m_test_function;
        ^~~~~~~~
/usr/include/cppunit/TestCaller.h: In constructor 'CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)':
/usr/include/cppunit/TestCaller.h:121:6: error: class 'CppUnit::TestCaller<Fixture>' does not have any field named 'm_test_function'
      m_test_function( std::bind(test, m_fixture) )
      ^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:121:28: error: 'bind' is not a member of 'std'
      m_test_function( std::bind(test, m_fixture) )
                            ^~~~
/usr/include/cppunit/TestCaller.h:121:28: note: suggested alternative: 'find'
      m_test_function( std::bind(test, m_fixture) )
                            ^~~~
                            find
/usr/include/cppunit/TestCaller.h: In constructor 'CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)':
/usr/include/cppunit/TestCaller.h:138:6: error: class 'CppUnit::TestCaller<Fixture>' does not have any field named 'm_test_function'
      m_test_function( std::bind(test, &fixture) )
      ^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:138:28: error: 'bind' is not a member of 'std'
      m_test_function( std::bind(test, &fixture) )
                            ^~~~
/usr/include/cppunit/TestCaller.h:138:28: note: suggested alternative: 'find'
      m_test_function( std::bind(test, &fixture) )
                            ^~~~
                            find
/usr/include/cppunit/TestCaller.h: In constructor 'CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)':
/usr/include/cppunit/TestCaller.h:155:6: error: class 'CppUnit::TestCaller<Fixture>' does not have any field named 'm_test_function'
      m_test_function( std::bind(test, fixture) )
      ^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:155:28: error: 'bind' is not a member of 'std'
      m_test_function( std::bind(test, fixture) )
                            ^~~~
/usr/include/cppunit/TestCaller.h:155:28: note: suggested alternative: 'find'
      m_test_function( std::bind(test, fixture) )
                            ^~~~
                            find
/usr/include/cppunit/TestCaller.h: In constructor 'CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)':
/usr/include/cppunit/TestCaller.h:162:17: error: 'fixture' was not declared in this scope
       m_fixture(fixture),
                 ^~~~~~~
/usr/include/cppunit/TestCaller.h:162:17: note: suggested alternative: 'Fixture'
       m_fixture(fixture),
                 ^~~~~~~
                 Fixture
/usr/include/cppunit/TestCaller.h:163:7: error: class 'CppUnit::TestCaller<Fixture>' does not have any field named 'm_test_function'
       m_test_function(test_function)
       ^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:163:23: error: 'test_function' was not declared in this scope
       m_test_function(test_function)
                       ^~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h: In member function 'void CppUnit::TestCaller<Fixture>::runTest()':
/usr/include/cppunit/TestCaller.h:175:7: error: there are no arguments to 'm_test_function' that depend on a template parameter, so a declaration of 'm_test_function' must be available [-fpermissive]
       m_test_function();
       ^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:175:7: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/extensions/HelperMacros.h:14:0,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/cppunit/extensions/TestNamer.h: In member function 'std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const':
/usr/include/cppunit/extensions/TestNamer.h:70:95: error: 'toString' is not a member of 'CppUnit::StringHelper'
 r(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
                                                                     ^~~~~~~~
In file included from src/cppunit/testPlatform.h:24:0,
                 from src/cppunit/testPlatform.cpp:25:
src/cppunit/testPlatform.h: In static member function 'static CppUnit::TestSuite* testPlatform::suite()':
src/cppunit/testPlatform.h:129:5: error: 'unique_ptr' is not a member of 'std'
     CPPUNIT_TEST_SUITE_END ();
     ^
src/cppunit/testPlatform.h:129:5: error: expected primary-expression before '>' token
     CPPUNIT_TEST_SUITE_END ();
     ^
src/cppunit/testPlatform.h:129:5: error: 'guard' was not declared in this scope
     CPPUNIT_TEST_SUITE_END ();
     ^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
                 from src/cppunit/testPlatform.h:24,
                 from src/cppunit/testPlatform.cpp:25:
/usr/include/cppunit/TestCaller.h: In instantiation of 'void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = testPlatform]':
src/cppunit/testPlatform.cpp:859:1:   required from here
/usr/include/cppunit/TestCaller.h:175:22: error: 'm_test_function' was not declared in this scope
       m_test_function();
       ~~~~~~~~~~~~~~~^~
/usr/include/cppunit/TestCaller.h:175:22: note: suggested alternative: '__fortify_function'
       m_test_function();
       ~~~~~~~~~~~~~~~^~
       __fortify_function
Makefile:3005: recipe for target 'src/cppunit/out_testPlatform-testPlatform.o' failed
carlwgeorge commented 6 years ago

Nothing is using it in practice these days.

About that...

# yum install srvadmin-all
Error: Package: srvadmin-storage-9.1.0-2757.12163.el7.x86_64 (dell)
           Requires: libsmbios.so.2()(64bit)
           Available: libsmbios-2.3.1-2757.12163.el7.x86_64 (dell)
               libsmbios.so.2()(64bit)
           Available: libsmbios-2.3.3-6.el7.i686 (base)
               Not found

https://access.redhat.com/solutions/3409271