Compiling xrootd triggers the new -Waddress-of-packed-member warning introduced in gcc 9:
https://gcc.gnu.org/gcc-9/changes.html
Since xrootd used -Werror this causes the build to fail:
In file included from /builddir/build/BUILD/xrootd-4.8.5/src/XrdSys/XrdSysIOEvents.cc:1198:
/builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc: In static member function 'static XrdSys::IOEvents::Poller* XrdSys::IOEvents::Poller::newPoller(int*, int&, const char**)':
/builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc:136:71: error: converting a packed 'epoll_event*' pointer (alignment 1) to 'void*' (alignment 8) may result in an unaligned pointer value [-Werror=address-of-packed-member]
136 | if ((eNum = XrdSys::IOEvents::PollE::AllocMem((void **)&pp, allocFD)))
| ^
In file included from /builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc:36,
from /builddir/build/BUILD/xrootd-4.8.5/src/XrdSys/XrdSysIOEvents.cc:1198:
/usr/include/sys/epoll.h:83:8: note: defined here
83 | struct epoll_event
| ^~~~~~~~~~~
In file included from /builddir/build/BUILD/xrootd-4.8.5/src/XrdSys/XrdSysIOEvents.cc:1198:
/builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc: In member function 'int XrdSys::IOEvents::PollE::AllocPT(int)':
/builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc:182:37: error: converting a packed 'epoll_event*' pointer (alignment 1) to 'void*' (alignment 8) may result in an unaligned pointer value [-Werror=address-of-packed-member]
182 | if (!AllocMem((void **)&pp, slots))
| ^
In file included from /builddir/build/BUILD/xrootd-4.8.5/src/./XrdSys/XrdSysIOEventsPollE.icc:36,
from /builddir/build/BUILD/xrootd-4.8.5/src/XrdSys/XrdSysIOEvents.cc:1198:
/usr/include/sys/epoll.h:83:8: note: defined here
83 | struct epoll_event
| ^~~~~~~~~~~
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1