Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#53928 closed defect (fixed)

ntpsec @0.9.7: error: POSIX clock_settime(2) is required

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: lbschenkel (Leonardo Brondani Schenkel)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: 1-61803
Port: ntpsec

Description

ntpsec builds on Sierra but fails to build on El Capitan and earlier.

https://build.macports.org/builders/ports-10.11_x86_64-builder/builds/22564

../../libntp/clockwork.c:145:2: error: POSIX clock_gettime(2) is required
#error POSIX clock_gettime(2) is required
 ^
../../libntp/clockwork.c:132:19: warning: unused parameter 'tvs' [-Wunused-parameter]
        struct timespec *tvs
                         ^
1 warning and 1 error generated.

(clock_gettime was introduced in Sierra.)

Attachments (2)

main.log (93.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 8 years ago.
main.log from my 10.8 test vm
config.log (208.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 8 years ago.
config.log from my 10.8 test vm

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by danielluke (Daniel J. Luke)

This really should be addressed upstream (but I suspect they'll be hesitant to do anything about it, since part of the point of the ntpsec project is to remove backwards compatibility that adds complexity and could hide security issues).

comment:2 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

comment:3 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

ESR has replied saying that there is a fallback already and it should build: https://gitlab.com/NTPsec/ntpsec/issues/261#note_27103442

Unfortunately I don't have access to a pre-Sierra installation in order to diagnose why the existing fallback is not triggering. Anybody up for the task?

Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

main.log from my 10.8 test vm

Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: config.log added

config.log from my 10.8 test vm

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

I've attached log files from my 10.8 test VM in case that's helpful. ESR should be able to reproduce the issue by trying to build ntpsec 0.9.6 on any Mac with OS X 10.11 or earlier.

comment:5 Changed 8 years ago by 1-61803

Cc: 1-61803 added

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

Summary: ntpsec @0.9.6: error: POSIX clock_gettime(2) is requiredntpsec @0.9.7: error: POSIX clock_settime(2) is required

The error message in 0.9.6 was wrong; the error message was corrected in 0.9.7. It's clock_settime that's missing, not clock_gettime.

comment:7 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

Resolution: wontfix
Status: newclosed

Closing, upstream stated that they won't support old macOS versions below 10.12.

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

Then please modify the port to error out early with a friendlier error message. Something like:

pre-fetch {
    if {${os.platform} eq "darwin" && ${os.major} < 16} {
        ui_error "${name} @${version} requires macOS 10.12 or greater."
        return -code error "incompatible macOS version"
    }
}

comment:9 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

Resolution: wontfixfixed

In 2afd39717cf554afa8b43761843f49268ec54c34/macports-ports:

ntpsec: prevent installation on macOS < 10.12

Upstream does not support versions of macOS older than 10.12:
https://gitlab.com/NTPsec/ntpsec/issues/261

Closes: #53928

comment:10 Changed 7 years ago by lbschenkel (Leonardo Brondani Schenkel)

Thanks for the snippet. I have included it in the Portfile.

Note: See TracTickets for help on using tickets.