Skip to content

Conversation

@schwicke
Copy link
Contributor

When trying to use XrdPosix on Apple, the code is not able to find system calls like open64. This patch assumes that Apple is always 64bit and maps these functions to the "regular" system calls. Using XRDPOSIX_REPORT=1 reports two more missing functions, namely acl() and Lgetxattr() which cannot be found. These are disabled by this patch when running on this platform. With this fix in xrootd, the next version of CERNLIB can be xrootd enabled as well on Apple.

Copy link
Member

@abh3 abh3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me. I suppose prior to Catalina (2019) MacOS did have 32 and 64 bit interfaces. Since then all the standard interfaces are 64 bits and 32 bit apps are history. So, thank you for he changes.

Copy link
Member

@amadio amadio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments to cross-check before merging. Since we are changing this code in any case, let's try to not use deprecated functions which will likely require further changes later. Other than that, looks good.

Copy link
Member

@abh3 abh3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed here.

@abh3
Copy link
Member

abh3 commented Feb 19, 2025

Looking at the trace back, it seems the std::cerr also calls fprintf() but the way that s it is done is before required linkages in the Posix layer have been completed and this causes a SEGV. Substituting with fprintf) is a reasonable bypass.

@amadio amadio changed the title Fixings for XrdPosix on Apple Fixes for XrdPosix on Apple Feb 19, 2025
@amadio amadio merged commit 69fed56 into xrootd:master Feb 19, 2025
11 checks passed
@amadio
Copy link
Member

amadio commented Feb 19, 2025

@schwicke Thanks! I squashed to avoid having intermediate state that doesn't work (i.e. typos fixed, etc).

@amadio amadio added this to the 5.8.0 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants