Hi all,

A new build error has cropped up building qpid-cpp-1.36.0 on Gentoo since
the distro's upgrade to nss-3.28. The issue will filter through to other
less bleeding-edge distros when they catch up!

[ 25%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/Modules.cpp.o
In file included from /usr/include/nss/ssl.h:18:0,
                 from
/var/tmp/portage/net-misc/qpid-cpp-1.36.0/work/qpid-cpp-1.36.0/src/qpid/sys/ssl/util.cpp:30:
/usr/include/nss/sslt.h:121:40: error: comma at end of enumerator list
[-Werror=pedantic]
     ssl_sig_rsa_pkcs1_sha1md5 = 0x10101,
                                        ^
cc1plus: all warnings being treated as errors


Technically the fault here is in the nss lib, but I'd like to request 2
changes in qpid to ease the issue, if I could...

Firstly, CMake has a SYSTEM clause to the include_directories statement
(see https://cmake.org/cmake/help/v3.0/command/include_directories.html)
which causes some compilers not to apply strict warnings to the files in
the directories following said clause. Could this be used with the NSS
includes, and perhaps with the Cyrus SASL includes also? Other included
headers throughout qpid-cpp are either from libraries which should know
better (bindings languages and boost) or other qpid libs. I've attached a
short patch which does this.

The second change I'd like to suggest is to add a CMake switch to control
the application of solely the -Werror flag in addition to the more broadly
applied ENABLE_WARNINGS option already present, which switches off
additional compiler warnings altogether. Naturally the default should be
that -Werror is applied. This would be in keeping with the packaging
guidelines for Gentoo (
https://devmanual.gentoo.org/ebuild-writing/common-mistakes/), specifically
the section "-Werror compiler flag not removed". I don't have a more
authoritative citation for how -Werror should be enforced but their
suggestion seems reasonable to me.

Regards

-- 

*Chris Richardson*, System Architect
c...@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*
diff -ur qpid-cpp-1.36.0/src/CMakeLists.txt qpid-cpp-1.36.0-edited/src/CMakeLists.txt
--- qpid-cpp-1.36.0/src/CMakeLists.txt	2016-12-09 17:16:02.000000000 +0000
+++ qpid-cpp-1.36.0-edited/src/CMakeLists.txt	2017-01-17 17:25:56.314054425 +0000
@@ -371,7 +371,7 @@
       qpid/sys/cyrus/CyrusSecurityLayer.h
       qpid/sys/cyrus/CyrusSecurityLayer.cpp
      )
-  include_directories (${CYRUS_SASL_INCLUDE_DIR})
+  include_directories (SYSTEM ${CYRUS_SASL_INCLUDE_DIR})
   set(sasl_LIB ${CYRUS_SASL_LIBRARY})
   set(HAVE_SASL 1)
 else (BUILD_SASL)
@@ -451,7 +451,7 @@
   # Add include directories and link directories for NSS
   # unfortunately this doesn't get done automatically for
   # libraries detected by FindPkgConfig
-  include_directories(${ssl_INCLUDES})
+  include_directories(SYSTEM ${ssl_INCLUDES})
   link_directories(${ssl_LIBDIRS})
 endif (BUILD_SSL)
 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to