Project

General

Profile

Actions

Bug #5595

closed

libzpool won't build with a studio primary

Added by Rich Lowe over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2015-02-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Since ZFS started putting inline functions in headers, libzpool has been unable to build with Sun Studio.

The reason is that Sun Studio creates COMDAT GROUP sections for the out-of-line version of these symbols, but in doing so creates invalid groups which refer to non-existent sections:

Group Section:  .group%zap_m_phys
     index    flags / section         signature symbol
       [0]   [ COMDAT ]               zap_m_phys
       [1]   .text%zap_m_phys [6]
       [2]   <invalid section> [20]
       [3]   <invalid section> [21]

ld(1), quite rightly (in my view) considers this group invalid, and its presence a fatal error

ld: fatal: file pics/zap_micro.o: group section [2].group%zap_m_phys: entry 2: invalid section index: 20
ld: fatal: file pics/zap_micro.o: section [6].text%zap_m_phys: SHF_GROUP flag set, but no corresponding SHT_GROUP section found

There is nothing I can do about this except make ld(1) more forgiving of invalid groups where in this case "forgiving" is, perhaps, a way of saying "wrong". I would rather not do this.

Clearly, though, we also can't fix Sun Studio.

The other option is ZFS ceasing to use inline functions in headers like this, or doing so in a way which (portably) never emits an out-of-line definition.


Related issues

Has duplicate illumos gate - Bug #5580: Sun Studio probably relies on the behaviour 3616 removedRejected2015-01-31

Actions
Actions

Also available in: Atom PDF