Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#52385 closed defect (fixed)

hexchat: build failure on <10.10

Reported by: Ionic (Mihai Moldovan) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: hexchat

Description (last modified by Ionic (Mihai Moldovan))

The default-enabled sysinfo plugin uses an API that is only available on 10.10+ for getting the fine-grained OS X version number.

We'll need to patch this around to support older releases as well.

This goes after #52384.

Just for review, if this looks good to you, I can commit it myself.

The suggested patch has already been merged upstream, c.f. Hexchat Github PR #1821.

Attachments (1)

hexchat-fix-sysinfo-plugin-on-10.9-and-lower.patch (1.5 KB) - added by Ionic (Mihai Moldovan) 4 years ago.

Download all attachments as: .zip

Change History (14)

Changed 4 years ago by Ionic (Mihai Moldovan)

comment:1 Changed 4 years ago by Ionic (Mihai Moldovan)

Description: modified (diff)

comment:2 Changed 4 years ago by Ionic (Mihai Moldovan)

Description: modified (diff)

comment:3 Changed 4 years ago by ken-cunningham-webuse

that's weird.

I installed this on 10.4 Tiger (of all things) a few weeks ago. @2.10.2_2 +ssl without any modifications.

It works fine.

comment:4 Changed 4 years ago by Ionic (Mihai Moldovan)

This is for 2.12.1. :)

hexchat was updated recently. 2.10.2 is not affected by that problem yet.

Last edited 4 years ago by Ionic (Mihai Moldovan) (previous) (diff)

comment:5 Changed 4 years ago by ken-cunningham-webuse

aha. thanks. That's what I love about MacPorts. Problems get fixed before I even knew they were there. Magic.

comment:6 Changed 4 years ago by Ionic (Mihai Moldovan)

Just looked it up. More specifically, that version was also affected, BUT the sysinfo plugin wasn't built on OS X by default in 2.10.2, but only if libpci 3.0.0 or higher was installed (which probably could be classified as a bug, since libpci is not at all available on OS X, and was later changed.)

2.12.0 explicitly enabled it if OS X is detected or libpci 3.0.0 or higher is installed.

Last edited 4 years ago by Ionic (Mihai Moldovan) (previous) (diff)

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

Upstream: https://github.com/hexchat/hexchat/issues/1657

To simplifiy this, we could use operatingSystemVersionString (available on OS X >= 10.2). The only difference seems to be that this would also include the build number, but this is only the fallback anyway.

comment:8 Changed 4 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

Fixed in r153195.

comment:9 Changed 4 years ago by Ionic (Mihai Moldovan)

operatingSystemVersionString is probably the better route to go, because it's not deprecated and in the end we want a human-readable string anyway. We'd have to convert it to a C string and put it under our control, though.

comment:10 Changed 4 years ago by ken-cunningham-webuse

Hi ,

The patch gets applied, but unfortunately doesn't fix the build on 10.6. It appears that the availability guard is not working correctly on this system at least.

:info:build /bin/sh ../../libtool  --tag=CC   --mode=compile /opt/local/bin/clang-mp-3.7 -DHAVE_CONFIG_H -I. -I../..  -I../../src/common -I./shared  -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include  -pipe -Os -arch x86_64 -funsigned-char -fstack-protector-strong -fPIE -fPIC -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -Wno-missing-field-initializers -Wno-unused-result -Werror=format-security -Werror=init-self -Werror=declaration-after-statement -Werror=missing-include-dirs -Werror=date-time -Werror=implicit-function-declaration -Werror=pointer-arith -c -o shared/df.lo shared/df.c
:info:build /bin/sh ../../libtool    --mode=compile /opt/local/bin/clang-mp-3.7 -DHAVE_CONFIG_H -I. -I../..  -I../../src/common -I./shared  -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include  -pipe -Os -arch x86_64 -c -o osx/backend.lo osx/backend.m
:info:build libtool: compile:  /opt/local/bin/clang-mp-3.7 -DHAVE_CONFIG_H -I. -I../.. -I../../src/common -I./shared -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -arch x86_64 -c osx/backend.m  -fno-common -DPIC -o osx/.libs/backend.o
:info:build libtool: compile:  /opt/local/bin/clang-mp-3.7 -DHAVE_CONFIG_H -I. -I../.. -I../../src/common -I./shared -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include -pipe -Os -arch x86_64 -funsigned-char -fstack-protector-strong -fPIC -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter -Wno-sign-compare -Wno-pointer-sign -Wno-missing-field-initializers -Wno-unused-result -Werror=format-security -Werror=init-self -Werror=declaration-after-statement -Werror=missing-include-dirs -Werror=date-time -Werror=implicit-function-declaration -Werror=pointer-arith -c shared/df.c  -fno-common -DPIC -o shared/.libs/df.o
:info:build osx/backend.m:93:2: error: use of undeclared identifier 'NSOperatingSystemVersion'; did you mean 'kNSLMinSystemVersion'?
:info:build         NSOperatingSystemVersion version = [info operatingSystemVersion];
:info:build         ^~~~~~~~~~~~~~~~~~~~~~~~
:info:build         kNSLMinSystemVersion
Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

comment:11 Changed 4 years ago by ken-cunningham-webuse

this comment was just wrong, and I deleted it.

Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)

comment:12 Changed 4 years ago by Ionic (Mihai Moldovan)

I think the problem is the MAC_OS_X_VERSION_10_9 macro, which is not defined on your OS.

Can you change MAC_OS_X_VERSION_10_9 to 1090 in the patchfile, clean and retry to upgrade hexchat? If that works, that's the best I will be able to do...

comment:13 Changed 4 years ago by ken-cunningham-webuse

That fixed it. Thanks. K

Last edited 4 years ago by ken-cunningham-webuse (previous) (diff)
Note: See TracTickets for help on using tickets.