Opened 5 years ago

Last modified 10 months ago

#59371 assigned defect

harfbuzz fails to compile on i386 older macs

Reported by: rmottola (Riccardo) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: i386 leopard Cc: mascguy (Christopher Nielsen), catap (Kirill A. Korinsky)
Port: harfbuzz

Description

Old headers produce errors with newer compilers, which are though needed. I have had the issue right now on 10.5

I was able to compile harfbuzz by adding this to the portfile (adapted and simplifed from cmake):

platform darwin {
    if {${os.arch} eq "i386" && ${os.major} <= 9} {
        # The old system headers do some bit shifting on Intel about which
        # newer compilers throw errors:
        # SecKeychain.h:102:46: error: shift expression '(1853123693 << 8)' overflows [-fpermissive]
        configure.cflags-append -fpermissive
        configure.cxxflags-append -fpermissive
    }
}

Change History (9)

comment:1 Changed 5 years ago by kencu (Ken)

You might also be interested in all this 58031 analysis I did previously, but closed as it was just sitting.

comment:2 Changed 5 years ago by jmroot (Joshua Root)

Cc: ryandesign@… removed
Owner: set to ryandesign
Status: newassigned

comment:3 Changed 5 years ago by rmottola (Riccardo)

interesting analysis Ken... I just started with gcc-6 over clang because it is a proven and reliable compiler, except that on older MacOS it needs -fpermissive.

During 2.6.2 upgrades I had to upgarde harfbuzz again and needed my "fix" again which, in combination with gcc6 worked fine (not for harfbuzz-icu though)

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

harfbuzz @2.6.4 built successfully on 10.6 i386 without the changes suggested in this ticket. Perhaps upstream fixed something about this. Can we close this ticket?

comment:5 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Oh, but you said 10.5.

comment:6 Changed 5 years ago by kencu (Ken)

I think it is really just gcc that needs that -fpermissive flag added, and that is called in on 10.5 and 10.4 to build this on Intel systems so it shows up there.

comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:8 Changed 2 years ago by catap (Kirill A. Korinsky)

Cc: catap added

comment:9 Changed 10 months ago by rmottola (Riccardo)

I just build successfully on 10.5 x86, even if we have https://trac.macports.org/ticket/69117

10.5 x86_64 doesn't build yet, glib2 fails. 10.5 PPC32: will check these coming days. I can't check PPC64.

Note: See TracTickets for help on using tickets.