* [PATCH rdma-core 1/3] Fix compilation warnings when NDEBUG is set
[not found] ` <20171113060806.27354-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-11-13 6:08 ` Leon Romanovsky
2017-11-13 6:08 ` [PATCH rdma-core 2/3] util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit Leon Romanovsky
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-13 6:08 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
Benjamin Drung, Alaa Hleihel, Jason Gunthorpe, Sean Hefty,
Hal Rosenstock, Yishai Hadas, Nicolas Morey-Chaisemartin
From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
When NDEBUG is set (-DCMAKE_BUILD_TYPE=Release) and CFLAGS is set to
-Werorr, we get some compilation errors as the following:
rdma-core/libibverbs/neigh.c:378:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
ssize_t rc;
Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
libibverbs/neigh.c | 2 +-
librdmacm/rsocket.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libibverbs/neigh.c b/libibverbs/neigh.c
index 3e9ee926..21177db0 100644
--- a/libibverbs/neigh.c
+++ b/libibverbs/neigh.c
@@ -375,7 +375,7 @@ static struct nl_addr *process_get_neigh_mac(
if (FD_ISSET(timer_fd, &fdset)) {
uint64_t read_val;
- ssize_t rc;
+ ssize_t __attribute__((unused)) rc;
rc =
read(timer_fd, &read_val, sizeof(read_val));
diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c
index 693d9eb5..2ce71627 100644
--- a/librdmacm/rsocket.c
+++ b/librdmacm/rsocket.c
@@ -408,14 +408,14 @@ struct ds_udp_header {
static void write_all(int fd, const void *msg, size_t len)
{
// FIXME: if fd is a socket this really needs to handle EINTR and other conditions.
- ssize_t rc = write(fd, msg, len);
+ ssize_t __attribute__((unused)) rc = write(fd, msg, len);
assert(rc == len);
}
static void read_all(int fd, void *msg, size_t len)
{
// FIXME: if fd is a socket this really needs to handle EINTR and other conditions.
- ssize_t rc = read(fd, msg, len);
+ ssize_t __attribute__((unused)) rc = read(fd, msg, len);
assert(rc == len);
}
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rdma-core 2/3] util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit
[not found] ` <20171113060806.27354-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-13 6:08 ` [PATCH rdma-core 1/3] Fix compilation warnings when NDEBUG is set Leon Romanovsky
@ 2017-11-13 6:08 ` Leon Romanovsky
[not found] ` <20171113060806.27354-3-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-13 6:08 ` [PATCH rdma-core 3/3] travis: Test Debian packaging under artful container Leon Romanovsky
2017-11-13 9:55 ` [PATCH rdma-core 0/3] Fixes and package improvement to Travis CI Nicolas Morey-Chaisemartin
3 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-13 6:08 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
Benjamin Drung, Alaa Hleihel, Jason Gunthorpe, Sean Hefty,
Hal Rosenstock, Yishai Hadas, Nicolas Morey-Chaisemartin
From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
When building for 32 bit, the compilation may fail with the following
errors in case that __SSE__ is not set:
In file included from ../util/mmio.c:37:0:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:31:3: error: #error "SSE instruction set not enabled"
Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
util/mmio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/mmio.c b/util/mmio.c
index b362a65e..cea4a727 100644
--- a/util/mmio.c
+++ b/util/mmio.c
@@ -33,7 +33,7 @@ static void pthread_mmio_write64_be(void *addr, __be64 val)
mmio_wc_spinunlock(&mmio_spinlock);
}
-#if defined(__i386__)
+#if defined(__i386__) && defined(__SSE__)
#include <xmmintrin.h>
#include <cpuid.h>
@@ -73,7 +73,7 @@ write64_fn_t resolve_mmio_write64_be(void) __asm__("mmio_write64_be");
write64_fn_t resolve_mmio_write64_be(void)
{
-#if defined(__i386__)
+#if defined(__i386__) && defined(__SSE__)
if (have_sse())
return &sse_mmio_write64_be;
#endif
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH rdma-core 3/3] travis: Test Debian packaging under artful container
[not found] ` <20171113060806.27354-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-13 6:08 ` [PATCH rdma-core 1/3] Fix compilation warnings when NDEBUG is set Leon Romanovsky
2017-11-13 6:08 ` [PATCH rdma-core 2/3] util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit Leon Romanovsky
@ 2017-11-13 6:08 ` Leon Romanovsky
[not found] ` <20171113060806.27354-4-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-13 9:55 ` [PATCH rdma-core 0/3] Fixes and package improvement to Travis CI Nicolas Morey-Chaisemartin
3 siblings, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-11-13 6:08 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky,
Benjamin Drung, Alaa Hleihel, Jason Gunthorpe, Sean Hefty,
Hal Rosenstock, Yishai Hadas, Nicolas Morey-Chaisemartin
From: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
This will be compiled with GCC 7 coming with Ubuntu artful.
Also, remove installations of GCC 7 and debian helpers from addons->apt
list in .travis.yml file as they are no longer required.
Finally, since we are removing a -Werror compilation test from buildlib/travis-build,
make sure that all builds performed by buildlib/cbuild will run with
-Werorr by adding it to CFLAGS environment variable.
Signed-off-by: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
.travis.yml | 6 ------
buildlib/cbuild | 7 +++++++
buildlib/package-build-test | 2 +-
buildlib/travis-build | 16 +---------------
4 files changed, 9 insertions(+), 22 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 4d7b0cc0..dadee011 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,18 +14,13 @@ addons:
# whitelisted 4.0
- sourceline: "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main"
key_url: "http://apt.llvm.org/llvm-snapshot.gpg.key"
- - ubuntu-toolchain-r-test
# Multiverse is not on by default and we need it to get sparse
- sourceline: "deb http://archive.ubuntu.com/ubuntu/ trusty multiverse"
packages:
- build-essential
- clang-4.0
- cmake
- - debhelper
- - dh-systemd
- - fakeroot
- gcc
- - gcc-7
- git
- libnl-3-dev
- libnl-route-3-dev
@@ -40,7 +35,6 @@ addons:
# 32 bit support packages
- gcc-multilib
- - lib32gcc-7-dev
service:
- docker
diff --git a/buildlib/cbuild b/buildlib/cbuild
index 32bb70df..d47938ef 100755
--- a/buildlib/cbuild
+++ b/buildlib/cbuild
@@ -478,6 +478,9 @@ os.symlink({tarfn!r},os.path.join("SOURCES",tarfn));
extra_opts = getattr(env,"rpmbuild_options", [])
bopts = ["-bb",tspec_file] + extra_opts;
+ # Let rpmbuild compile with -Werror
+ print >> F,'os.environ["CFLAGS"] = "-Werror"'
+
print >> F,'os.execlp("rpmbuild","rpmbuild",%s)'%(
",".join(repr(I) for I in bopts));
@@ -533,6 +536,10 @@ import subprocess,os;
def to_user():
os.setgid({gid:d});
os.setuid({uid:d});
+
+# Compile with -Werror
+os.environ["CFLAGS"] = "-Werror"
+
subprocess.check_call(["debian/rules","debian/rules","build"],
preexec_fn=to_user);
subprocess.check_call(["debian/rules","debian/rules","binary"]);
diff --git a/buildlib/package-build-test b/buildlib/package-build-test
index 15f24caa..b1a7807c 100755
--- a/buildlib/package-build-test
+++ b/buildlib/package-build-test
@@ -11,7 +11,7 @@ if [ -e "/.dockerenv" ] || (grep -q docker /proc/self/cgroup &>/dev/null); then
exit 0
fi
-for OS in centos7 tumbleweed
+for OS in centos7 tumbleweed artful
do
echo
echo "Checking package build for ${OS} ...."
diff --git a/buildlib/travis-build b/buildlib/travis-build
index bf86baa7..3ee4182b 100755
--- a/buildlib/travis-build
+++ b/buildlib/travis-build
@@ -17,7 +17,7 @@ ninja
cd ../build32
# travis's trusty is not configured in a way that enables all 32 bit
# packages. We could fix this with some sudo stuff.. For now turn off libnl
-CC=gcc-7 CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
+CFLAGS="-Werror -m32" cmake -GNinja .. -DENABLE_RESOLVE_NEIGH=0
ninja
# aarch64 build to check compilation on ARM 64bit platform
@@ -45,17 +45,3 @@ rm CMakeCache.txt
CC=clang-4.0 CFLAGS=-Werror cmake -GNinja ..
ninja
cp ../util/udma_barrier.h.old ../util/udma_barrier.h
-
-# Finally run through gcc-7 64 bit through the debian packaging This gives a
-# good clue if patches are changing packaging related things, the RPM stuff
-# will have to be audited by hand.
-
-# When running cmake through debian/rules it is hard to set -Werror,
-# instead force it on by changing the CMakeLists.txt
-cd ..
-echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")' >> buildlib/RDMA_EnableCStd.cmake
-sed -i -e 's/-DCMAKE_BUILD_TYPE=Release//g' debian/rules
-sed -i -e 's/ninja \(.*\)-v/ninja \1/g' debian/rules
-
-CC=gcc-7 debian/rules build
-fakeroot debian/rules binary
--
2.15.0
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH rdma-core 0/3] Fixes and package improvement to Travis CI
[not found] ` <20171113060806.27354-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
` (2 preceding siblings ...)
2017-11-13 6:08 ` [PATCH rdma-core 3/3] travis: Test Debian packaging under artful container Leon Romanovsky
@ 2017-11-13 9:55 ` Nicolas Morey-Chaisemartin
[not found] ` <65be5c4f-0127-78c7-db0c-f54c22884902-l3A5Bk7waGM@public.gmane.org>
3 siblings, 1 reply; 8+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-13 9:55 UTC (permalink / raw)
To: Leon Romanovsky, Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Benjamin Drung, Alaa Hleihel,
Jason Gunthorpe, Sean Hefty, Hal Rosenstock, Yishai Hadas
Le 13/11/2017 à 07:08, Leon Romanovsky a écrit :
> Hi,
>
> This patchset comes from Alaa, who fixed two issues discovered during
> his work to enable checks of distribution packages in Travis CI.
> These fixes allowed us to add Ubuntu Artful to the list of checked
> distributions.
>
> PR can be found at:
> https://github.com/linux-rdma/rdma-core/pull/248
>
> Cc: Benjamin Drung <benjamin.drung-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
> Cc: Alaa Hleihel <alaa-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>
> Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Cc: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Cc: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-l3A5Bk7waGM@public.gmane.org>
>
> Thanks
>
> Alaa Hleihel (3):
> Fix compilation warnings when NDEBUG is set
> util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit
> travis: Test Debian packaging under artful container
>
> .travis.yml | 6 ------
> buildlib/cbuild | 7 +++++++
> buildlib/package-build-test | 2 +-
> buildlib/travis-build | 16 +---------------
> libibverbs/neigh.c | 2 +-
> librdmacm/rsocket.c | 4 ++--
> util/mmio.c | 4 ++--
> 7 files changed, 14 insertions(+), 27 deletions(-)
>
> --
> 2.15.0
>
For the series:
Reviewed-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin-IBi9RG/b67k@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread