Opened 4 months ago

Closed 3 months ago

#70350 closed defect (fixed)

Provide fgetattrlist via legacysupport

Reported by: barracuda156 Owned by: fhgwright (Fred Wright)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), catap (Kirill A. Korinsky), kencu (Ken), macportsraf
Port: legacysupport, ruby

Description

Is there any reason why legacysupport provides fsetattrlist but not fgetattrlist? This seems to break ruby with gcc14, since configure check misdetects fgetattrlist as being available, while it is not present in /usr/include/unistd.h. I think this is because of legacysupport, and autoconf making a wrong assumption that one implies another automatically.

Ruby introduced a check here: https://github.com/ruby/ruby/commit/ddf1f59df5fbff6c659177bc36e161b2ae285d5f

If possible, it is desirable to provide fgetattrlist via legacysupport. If it is not possible, then we should find a way to not use legacysupport during configure stage of Ruby. (A temporary fix could be to set ac_cv_func_fgetattrlist=no manually, but it is clearly suboptimal.)

Change History (2)

comment:1 in reply to:  description Changed 3 months ago by fhgwright (Fred Wright)

Replying to barracuda156:

Is there any reason why legacysupport provides fsetattrlist but not fgetattrlist? This seems to break ruby with gcc14, since configure check misdetects fgetattrlist as being available, while it is not present in /usr/include/unistd.h. I think this is because of legacysupport, and autoconf making a wrong assumption that one implies another automatically.

Ruby introduced a check here: https://github.com/ruby/ruby/commit/ddf1f59df5fbff6c659177bc36e161b2ae285d5f

I don't think your diagnosis is correct, since Ruby doesn't use fsetattrlist(), and the code you referenced also doesn't reference it. If something weird is happening with gcc14, you'll have to investigate, since gcc14 isn't the normal compiler selection for Ruby on any supported platform.

If possible, it is desirable to provide fgetattrlist via legacysupport. If it is not possible, then we should find a way to not use legacysupport during configure stage of Ruby. (A temporary fix could be to set ac_cv_func_fgetattrlist=no manually, but it is clearly suboptimal.)

That's been added as of https://github.com/macports/macports-legacy-support/commit/af8a73fc55b153e86d090198e782ca20b7ad2221, but the author neglected to reference this ticket, and I consequently didn't reference this ticket in the summary for the port update.

This ticket should be closed as fixed.

comment:2 Changed 3 months ago by fhgwright (Fred Wright)

Owner: set to fhgwright
Resolution: fixed
Status: newclosed

In ceccb8bb27da3987f9c191f0ad8181998af1831c/macports-ports (master):

legacy-support: Update to v1.3.0.

  • Adds optional security wrapper for stpncpy(). Re: #69878
  • Moves renameat() prototype to the proper header location.
  • Fixes incorrect CLOCK_UPTIME_RAW_APPROX definition.
  • Eliminates spurious fmemopen() in OSes that don't need it.
  • Adds appropriate DARWIN_C_LEVEL conditionals, as in SDK headers. Re: #69688
  • Reworks headers for "mismatched" SDK compatibility. Re: #69867
  • Makes clockid_t an enum, matching SDK behavior.
  • Adds SLIST_REMOVE_AFTER, SLIST_HEAD_INITIALIZER. Re: #69890
  • Adds fgetattrlist(). Closes: #70350

Portfile changes:

  • Removes obsolete portion of Tiger-specific additions.
  • Moves atexit removal from post-extract to pre-patch, to respect expected phase behavior.

TESTED:
Tested both normal and -devel versions (currently identical) on
10.4-10.5 ppc, 10.5-10.6 ppc (i386 Rosetta), 10.4-10.6 i386, 10.4-12.x
x86_64, and 11.x-14.x arm64.
Builds on all tested platforms except 10.4 ppc +universal.
Passes all tests in all buildable cases.

Note: See TracTickets for help on using tickets.