sdl_core: Build failing on Fedora 25

It would seem that SDL’s API usage is incompatible with log4cxx (0.10.0) in Fedora 25:

In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:68:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value >= std::numeric_limits<OutputType>::min(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:70:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value <= std::numeric_limits<OutputType>::max(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:70:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value <= std::numeric_limits<OutputType>::max(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h: In instantiation of ‘OutputType utils::SafeStaticCast(InputType) [with InputType = long unsigned int; OutputType = unsigned int]’:
/home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/number_schema_item.h:138:54:   required from ‘NsSmartDeviceLink::NsSmartObjects::Errors::eType NsSmartDeviceLink::NsSmartObjects::TNumberSchemaItem<NumberType>::validate(const NsSmartDeviceLink::NsSmartObjects::SmartObject&) [with NumberType = double]’
/home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:11596:1:   required from here
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:68:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value >= std::numeric_limits<OutputType>::min(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:68:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value >= std::numeric_limits<OutputType>::min(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:70:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value <= std::numeric_limits<OutputType>::max(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40:0,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:89:65: error: ‘static const LogString log4cxx::spi::LoggingEvent::getCurrentThreadName()’ is private within this context
               ::log4cxx::spi::LoggingEvent::getCurrentThreadName()); \
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:122:3: note: in expansion of macro ‘LOG_WITH_LEVEL’
   LOG_WITH_LEVEL(loggerPtr, ::log4cxx::Level::getFatal(), logEvent)
   ^~~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:94:5: note: in expansion of macro ‘LOG4CXX_FATAL’
     LOG4CXX_FATAL(logger_,                                                    \
     ^~~~~~~~~~~~~
/home/zeenix/checkout/sdl_core/src/components/utils/include/utils/convert_utils.h:70:3: note: in expansion of macro ‘DCHECK_OR_RETURN’
   DCHECK_OR_RETURN(value <= std::numeric_limits<OutputType>::max(),
   ^~~~~~~~~~~~~~~~
In file included from /home/zeenix/checkout/sdl_core/src/components/include/utils/logger.h:41:0,
                 from /home/zeenix/checkout/sdl_core/src/components/include/utils/macro.h:40,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_schema.h:35,
                 from /home/zeenix/checkout/sdl_core/src/components/smart_objects/include/smart_objects/smart_object.h:41,
                 from /home/zeenix/checkout/sdl_core/src/components/formatters/include/formatters/CSmartFactory.h:38,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.h:42,
                 from /home/zeenix/checkout/sdl_core/src/components/interfaces/MOBILE_API_schema.cc:42:
/usr/include/log4cxx/spi/loggingevent.h:247:47: note: declared private here
                        static const LogString getCurrentThreadName();
                                               ^~~~~~~~~~~~~~~~~~~~
src/components/interfaces/CMakeFiles/MOBILE_API.dir/build.make:111: recipe for target 'src/components/interfaces/CMakeFiles/MOBILE_API.dir/MOBILE_API_schema.cc.o' failed
make[2]: *** [src/components/interfaces/CMakeFiles/MOBILE_API.dir/MOBILE_API_schema.cc.o] Error 1
CMakeFiles/Makefile2:1054: recipe for target 'src/components/interfaces/CMakeFiles/MOBILE_API.dir/all' failed
make[1]: *** [src/components/interfaces/CMakeFiles/MOBILE_API.dir/all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (6 by maintainers)

Most upvoted comments

@zeenix Perhaps ‘sudo make install’ caused this issue. I would like to share my experience for building and run SDL core (my environment is Ubuntu 16.04.2 LTS).

$ git clone https://github.com/smartdevicelink/sdl_core.git $ mkdir -p build $ cd build $ cmake …/sdl_core/ $ make $ make install $ cd bin $ LD_LIBRARY_PATH=. ./smartDeviceLinkCore Hope this can help.

FYI /apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp:163:21: error: narrowing conversion of ‘153’ from ‘int’ to ‘char’ inside { } [-Wnarrowing]

This is when the platform/compiler treats char as signed. On another platform it might have worked because char was unsigned there. The C standard leaves it open.

With a signed char, 153 does not fit and therefore there are warnings. Instead of casting the absolute values, I feel the correct solution seems to be to declare the type of the expression unsigned char if that is what is intended. (It may have some ripple effects that need to be fixed also).

Even better switching to an upstream version of this component, they might have fix this already and/or it is where it ought to be fixed at least.

@zeenix Please check these 2 patches. I ported from logcxx upstream for fixing building failure of gcc 6.x 0003-Applied-patch-for-LOGCXX-400-LOGCXX-404-LOGCXX-402-L.patch svn-log4cxx-rev-1751050.patch