Opened 7 years ago

Closed 7 years ago

#54346 closed defect (fixed)

glib2 @2.52.2 fails to build on macOS <= 10.8

Reported by: rlhamil Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: tiger leopard snowleopard lion mountainlion Cc: rlhamil, ballapete (Peter "Pete" Dyballa), JacksonIsaac (Jackson Isaac)
Port: glib2

Description

glib2 @2.52.2fails to build on Snow Leopard, with patching errors as shown in attached log.

Attachments (1)

main.log-glib2.txt (20.4 KB) - added by rlhamil 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by rlhamil

Attachment: main.log-glib2.txt added

comment:1 Changed 7 years ago by rlhamil

Cc: rlhamil added

comment:2 Changed 7 years ago by raimue (Rainer Müller)

Owner: set to ryandesign
Status: newassigned
Summary: glib2 @2.52.2 fails to build on Snow Leopardglib2 @2.52.2 fails to build on macOS <= 10.8

According to the log, the patch remove-gcocoanotificationbackend.patch no longer applies. It is only applied on macOS <= 10.8, so an updated patch is required for these legacy OS versions.

comment:3 Changed 7 years ago by kencu (Ken)

Looks like it might be not too difficult to fix for older systems. In the file of note gio/giomodule.c, they now have this:

#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
extern GType g_cocoa_notification_backend_get_type (void);
#endif

so I tried just disabling the patch completely

if {[vercmp ${macosx_deployment_target} 10.9] < 0} {
    # gcocoanotificationbackend requires OS X 10.9 or later.
    # patchfiles-append       remove-gcocoanotificationbackend.patch
} else {
    # gcocoanotificationbackend.c:115:52: error: array subscript is not an integer
    compiler.blacklist-append {clang < 600}
}

and it installed without issue:

$ port -v installed glib2
The following ports are currently installed:
  glib2 @2.50.3_0+universal platform='darwin 10' archs='i386 x86_64' date='2017-02-15T12:56:54-0800'
  glib2 @2.52.2_1+universal+x11 (active) platform='darwin 10' archs='i386 x86_64' date='2017-06-18T17:12:39-0700'

I don't know about the +quartz variant, all my glib2 stuff is not installed that way. Someone want to try?

I assume we still will need to set the compiler blacklisting for systems 10.9 or later. My 10.6 system is building with clang-3.9 so I don't know exactly what the minimum compiler would need to be.

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

Cc: ballapete JacksonIsaac added
Keywords: tiger leopard snowleopard lion mountainlion added

Has duplicate #54349.

Please try not to screw up my ports... glib2-devel was working on older systems so if you wanted to update glib2 all you had to do was copy the changes from glib2-devel to glib2.

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

Status: assignedaccepted

I'm working on it now.

comment:6 Changed 7 years ago by Ryan Schmidt <github@…>

Resolution: fixed
Status: acceptedclosed

In a87fe62d236d781e8a5feeb1fb2a5f6a0940a118/macports-ports:

glib2: Backport changes from glib2-devel

Closes #54346

Note: See TracTickets for help on using tickets.