-
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
XrdPosix fails to compile with glibc 2.33 (2.32.9000) #1315
Comments
Hi Mattias,
It just eans we need to replce this with the 2.33 equivalent. I assume
you installed it manually because this release won't be officially
available until February 2021. Do you know which Linux distribution it
will appear in first?
Andy
…On Mon, 26 Oct 2020, Mattias Ellert wrote:
```
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc: In function 'int XrdPosix_Fstat(int, stat*)':
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc:379:27: error: '_STAT_VER' was not declared in this scope
379 | : Xunix.Fstat64(_STAT_VER, fildes, (struct stat64 *)buf));
| ^~~~~~~~~
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc: In function 'int XrdPosix_Lstat(const char*, stat*)':
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc:563:27: error: '_STAT_VER' was not declared in this scope
563 | ? Xunix.Lstat64(_STAT_VER, path, (struct stat64 *)buf)
| ^~~~~~~~~
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc: In function 'int XrdPosix_Stat(const char*, stat*)':
/builddir/build/BUILD/xrootd-5.0.2/src/XrdPosix/XrdPosix.cc:891:26: error: '_STAT_VER' was not declared in this scope
891 | ? Xunix.Stat64(_STAT_VER, path, (struct stat64 *)buf)
| ^~~~~~~~~
```
In glibc 2.32 and earlier _STAT_VER is defined in /usr/include/sys/stat.h (which includes /usr/include/bits/stat.h). However, in glibc 2.33 this define is dropped. The headers no longer redirects the calls to the kernel functions, but there are implementations in glibc.
I do not know how to fix this, is it sufficient to do
```
#ifndef _STAT_VER
#define _STAT_VER <some value> /* What value? */
#endif
```
Or does it need morc complicates changes?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#1315
########################################################################
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
|
The compilation started failing on Fedora 34/Fedora Rawhide. Fedora 34 is scheduled for 2021-04-20. It can be reproduced using a Fedora Rawhide mockbuild: |
Ah, those are hard to come by. Anyway I can login to a Fedora 34 machine? |
You don't need a Fedora 34 machine to build for Fedora 34. A mock chroot environment is sufficient. |
This is fixed in 5298c73 |
I applied the commit as a patch for the Fedora Rawhide build and it builds again. Candidate commit for stable? |
@ellert : thanks a lot! we will have |
https://build.opensuse.org/request/show/876080 by user badshah400 + RBrownSUSE - Update to version 4.12.7. - Add xrootd-build-with-glibc2.33.patch: Fix build with glibc 2.33; patch taken from upstream commit [gh#xrootd/xrootd#1315].
In glibc 2.32 and earlier _STAT_VER is defined in /usr/include/sys/stat.h (which includes /usr/include/bits/stat.h). However, in glibc 2.33 this define is dropped. The headers no longer redirects the calls to the kernel functions, but there are implementations in glibc.
I do not know how to fix this, is it sufficient to do
Or does it need morc complicates changes?
The text was updated successfully, but these errors were encountered: