[MacPorts] #69149: lzma fails to build on 10.6 i386 with gcc: no such instruction: `xgetbv'

MacPorts noreply at macports.org
Mon Jan 22 02:00:36 UTC 2024


#69149: lzma fails to build on 10.6 i386 with gcc: no such instruction: `xgetbv'
---------------------------+-------------------------------
  Reporter:  barracuda156  |      Owner:  (none)
      Type:  defect        |     Status:  new
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.8.1
Resolution:                |   Keywords:  i386, snowleopard
      Port:  lzma          |
---------------------------+-------------------------------

Comment (by kencu):

 the xgetbv instruction is not understood by the assembler being used.

 One option might be to use a newer assembler (you recall that if a clang
 version >= 5.0 is installed, macports' cctools will use that clang version
 as the assembler).

 Another option is to replace the xgetbv instruction if needed. There is a
 handy syntax to use to put in new assembler instruction in the code
 itself.

 Here's a stackoverflow about this instruction:

 https://stackoverflow.com/questions/72522885/are-the-xgetbv-and-cpuid-
 checks-sufficient-to-guarantee-avx2-support

 and here's some intel docs about it:

 https://stackoverflow.com/questions/72522885/are-the-xgetbv-and-cpuid-
 checks-sufficient-to-guarantee-avx2-support

 here's a gcc bug saying gcc perhaps should have worked around this, but
 this was not properly fixed in gcc until gcc 9:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71659

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


More information about the macports-tickets mailing list