[MacPorts] #64368: cmake @3.22.1_0: "Error running link command: Invalid argument" when run under trace mode

MacPorts noreply at macports.org
Tue Jan 18 23:49:40 UTC 2022


#64368: cmake @3.22.1_0: "Error running link command: Invalid argument" when run
under trace mode
---------------------------+-----------------------
  Reporter:  chrstphrchvz  |      Owner:  michaelld
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.1
Resolution:                |   Keywords:  tracemode
      Port:  cmake         |
---------------------------+-----------------------

Comment (by neverpanic):

 Trace mode should only use one file descriptor per thread in addition to
 what is being used without trace mode.
 I doubt that CMake's linking tests would usually use 1024 file
 descriptors, so that means there's probably a leak somewhere, possibly
 related to dynamically creating and destroying threads.

 I'm in favor of sending this patch upstream, since from what I understand
 this will also lead to memory corruption if a CMake build ever tried to
 legitimately open more than 1024 files, right?

 Thanks for the extensive debugging. I had seen those error messages before
 and traced them to the invocation of select(), but couldn't figure out
 what was wrong.

-- 
Ticket URL: <https://trac.macports.org/ticket/64368#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list