#58916 closed defect (fixed)

findutils 4.7.0 fails to build

Reported by: Tatsh (Andrew Udvare) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: catalina Cc: ra1nb0w
Port: findutils


Log is attached. Couple of errors:

:info:build ftello.c:53:12: error: no member named '_flag' in 'struct __sFILE'; did you mean '_flags'?
:info:build   if (fp_->_flag & _IOWRT)
:info:build            ^~~~~
:info:build            _flags
:info:build /Applications/Xcode-10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:130:8: note: '_flags' declared here
:info:build         short   _flags;         /* flags, below; this FILE is free if 0 */
:info:build                 ^
:info:build ftello.c:53:20: error: use of undeclared identifier '_IOWRT'
:info:build   if (fp_->_flag & _IOWRT)

Attachments (1)

main.log (63.2 KB) - added by Tatsh (Andrew Udvare) 15 months ago.
build log

Download all attachments as: .zip

Change History (13)

Changed 15 months ago by Tatsh (Andrew Udvare)

Attachment: main.log added

build log

comment:1 Changed 15 months ago by jmroot (Joshua Root)

Keywords: catalina added
:debug:sysinfo macOS 10.15 (darwin/19.0.0) arch i386

Please be aware of wiki:FAQ#prerelease

This port built OK on <= 10.14 according to https://ports.macports.org/port/findutils/summary

comment:2 Changed 15 months ago by Tatsh (Andrew Udvare)

The difference is I am using Xcode 10.1 because at least one package (from what I remember) needs it. The builder uses 10.2.1. The version prior to this one built okay.

comment:3 Changed 15 months ago by Tatsh (Andrew Udvare)

Also I tried Xcode 10.3 (latest stable) and I still get the same error (after running port clean findutils). I made sure to run xcrun -k to kill caches and I set the SDK to 10.14 with macosx_sdk_version 10.14 in my macports.conf.

comment:4 Changed 15 months ago by Tatsh (Andrew Udvare)

I'll leave it at this is a Catalina thing because of the following in generated config.h which I assume is not happening 10.14:

/* Define to 1 if the system's ftello function has the Solaris bug. */

comment:5 Changed 15 months ago by BMinas

This is also failing under Xcode Version 11.0 (11A419c), which Apple is calling GM seed.

comment:6 Changed 15 months ago by Tatsh (Andrew Udvare)

This might be Apple's bug since prior Xcode version tools work fine. It seems extremely unlikely that macOS is going to have one of Solaris' issues all of a sudden.

You can work around this by manually by setting FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE to 0 in the workdir of the failed build and then running port install findutils again. The find binary that gets built works fine.

comment:7 Changed 15 months ago by Tatsh (Andrew Udvare)

I got this same issue with lftp. I think a lot of packages may be affected by this misdetection of an ftello bug. Certainly almost any that use autotools in the configure step.

comment:8 Changed 15 months ago by ra1nb0w

Yes, many others fail, like m4 itself. The problem seems this test

  if (!(ftell (fp) == 9))
    return 6;


  if (!(putc ('!', fp) == '!'))
    return 5;

on ftello.m4. The value of ftell() remains 8 and don't follow putc() advance.

comment:9 Changed 15 months ago by ra1nb0w

Cc: ra1nb0w added

comment:10 Changed 14 months ago by ra1nb0w

I opened an Apple feedback about the problem; if someone has faster way...seen that XCode 11 is GM In my installation I found the following packages:

  • m4
  • coreutils
  • findutils
  • gnutls
  • wget

comment:11 Changed 14 months ago by ra1nb0w

ftell() bug is fixed on macOS 10.15 Beta 10

Tested with macOS 10.15 19A578c Xcode 11.0 11A420a

this ticket can be closed.

comment:12 Changed 14 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

Closing as per comment:11.

Note: See TracTickets for help on using tickets.