#67174 closed defect (fixed)

R-systemfonts fails on 10.8 and earlier with Clang

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: R-systemfonts

Description

https://ports.macports.org/port/R-systemfonts/details (logs are gone)

Just noticed that, making a ticket in order to investigate the issue and fix.

Change History (4)

comment:1 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

I ran some new builds. On 10.7, it's because R doesn't build:

https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/138307/steps/install-port/logs/stdio

checking whether mixed C/Fortran code can be run... configure: WARNING: cannot run mixed C/Fortran code
configure: error: Maybe check LDFLAGS for paths to Fortran libraries?

On 10.8, lots of errors like this:

https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/127932/steps/install-port/logs/stdio

mac/FontManagerMac.mm:47:77: error: cast of Objective-C pointer type 'NSURL *' to C pointer type 'CFURLRef' (aka 'const __CFURL *') requires a bridged cast
    CFArrayRef font_descriptors = CTFontManagerCreateFontDescriptorsFromURL((CFURLRef) font_url);
                                                                            ^~~~~~~~~~ ~~~~~~~~

On 10.6 x86_64:

https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/149272/steps/install-port/logs/stdio

mac/FontManagerMac.mm:2:10: fatal error: 'CoreText/CoreText.h' file not found
#include <CoreText/CoreText.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

On 10.6 i386:

https://build.macports.org/builders/ports-10.6_i386-builder/builds/114065/steps/install-port/logs/stdio

error: -fobjc-arc is not supported on platforms using the legacy runtime

comment:2 in reply to:  1 Changed 13 months ago by barracuda156

Replying to ryandesign:

Thank you very much!

Should we use legacy API patch for < 10.9 then? https://github.com/macports/macports-ports/blob/master/R/R-systemfonts/files/patch-older-macos.diff All errors seem to be Obj-C-related.

  1. S. Also, what to do about R on 10.7? :)
Last edited 13 months ago by barracuda156 (previous) (diff)

comment:3 Changed 13 months ago by barracuda156

UPD. Yeah, this works:

platform darwin {
    if {[string match *gcc* ${configure.compiler}] || ${os.major} < 13} {
        # Older OS do not support native API, but GCC gonna fail anyway:
        # g++-mp-12: error: unrecognized command-line option '-fobjc-arc'
        patchfiles-append \
                    patch-older-macos.diff
        depends_lib-append \
                    port:fontconfig
    }
}
svacchanda$ port -v installed R-systemfonts
The following ports are currently installed:
  R-systemfonts @1.0.4_0 (active) requested_variants='' platform='darwin 12' archs='x86_64' date='2023-04-03T11:16:55+0800'

comment:4 Changed 13 months ago by barracuda156

Resolution: fixed
Status: assignedclosed

In 3e236def6fab26a7047cf85cc244a06d316abb6c/macports-ports (master):

R-systemfonts: use fallback API on <10.9, fix build

Fixes: #67174

Note: See TracTickets for help on using tickets.