-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XRootD does not compile with Clang 15.x #1975
Comments
So, when did the support for this end or is it just a Clang thing?
…On Thu, 23 Mar 2023, Guilherme Amadio wrote:
There are several errors due to redefinition of `extern inline` functions in XrdPosixPreload:
```
xrootd/src/XrdPosix/XrdPosixPreload32.cc:375:9:
error: redefinition of a 'extern inline' function 'pread' is not supported in C++
ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset)
^
/usr/include/bits/unistd.h:72:1: note: previous definition is here
pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
^
```
--
Reply to this email directly or view it on GitHub:
#1975
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
########################################################################
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
|
I looked into this today. The problem is that my distribution has |
Some of the checks added by defining _FORTIFY_SOURCE break the build with clang with errors like the one shown below. See the manual page for feature_test_macros(7) for more information. xrootd/src/XrdPosix/XrdPosixPreload32.cc:375:9: error: redefinition of a 'extern inline' function 'pread' is not supported in C++ ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset) ^ /usr/include/bits/unistd.h:72:1: note: previous definition is here pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) ^ Since distributions enable _FORTIFY_SOURCE by default, it's better to disable it for the XrdPosix plugin when using clang. Builds with GCC are not affected by this problem. Fixes xrootd#1975.
Alright, just added a commit to the pull request where I'm addressing clang warnings. Also, just for the record, Fedora enabled |
Some of the checks added by defining _FORTIFY_SOURCE break the build with clang with errors like the one shown below. See the manual page for feature_test_macros(7) for more information. xrootd/src/XrdPosix/XrdPosixPreload32.cc:375:9: error: redefinition of a 'extern inline' function 'pread' is not supported in C++ ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset) ^ /usr/include/bits/unistd.h:72:1: note: previous definition is here pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) ^ Since distributions enable _FORTIFY_SOURCE by default, it's better to disable it for the XrdPosix plugin when using clang. Builds with GCC are not affected by this problem. Fixes xrootd#1975.
Some of the checks added by defining _FORTIFY_SOURCE break the build with clang with errors like the one shown below. See the manual page for feature_test_macros(7) for more information. xrootd/src/XrdPosix/XrdPosixPreload32.cc:375:9: error: redefinition of a 'extern inline' function 'pread' is not supported in C++ ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset) ^ /usr/include/bits/unistd.h:72:1: note: previous definition is here pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) ^ Since distributions enable _FORTIFY_SOURCE by default, it's better to disable it for the XrdPosix plugin when using clang. Builds with GCC are not affected by this problem. Fixes xrootd#1975.
There are several errors due to redefinition of
extern inline
functions in XrdPosixPreload:We should try to fix this, as eventually XRootD will stop compiling on macOS if we don't.
The text was updated successfully, but these errors were encountered: