[MacPorts] #58497: Don't check os_major on Linux

MacPorts noreply at macports.org
Mon May 20 03:11:19 UTC 2019


#58497: Don't check os_major on Linux
--------------------------+--------------------
  Reporter:  yan12125     |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------

Comment (by yan12125):

 Ah, great reminder!

 The actual version to use might be much more complicated. For each Linux
 executable file, there is a tag `.note.ABI-tag` indicating the minimum
 compatible kernel version. For example on my machine `readelf --notes
 /opt/local/libexec/macports/bin/tclsh8.5` gives the following info:
 (excerpted)
 {{{
 Displaying notes found in: .note.ABI-tag
   Owner                 Data size       Description
   GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
     OS: Linux, ABI: 3.2.0
 }}}

 There are some challenges:

 1. The ABI tag version might be lower than the running kernel. For example
 I got 3.2.0 even if I built macports on kernel 4.x.
 2. Different executables can have different version tags. For example,
 programmers can specify it via an assembly file (1).

 Maybe the most accurate approach needs scanning files. That sounds too
 complicated. I would prefer a simpler way - change most (if not all)
 checks around os_major from != to >= for Linux.

 (1) https://github.com/qt/qtbase/blob/5.12/src/corelib/global/minimum-
 linux.S

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


More information about the macports-tickets mailing list