Opened 6 years ago

Closed 3 weeks ago

#60650 closed defect (fixed)

osquery @4.3.0: error: use of undeclared identifier '_SC_PHYS_PAGES'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: yosemite mavericks mountainlion lion snowleopard leopard tiger Cc:
Port: osquery

Description

​osquery does not build on OS X 10.10 and earlier:

.../osquery-4.3.0/libraries/cmake/source/lzma/src/src/common/tuklib_physmem.c:146:29: error: use of undeclared identifier '_SC_PHYS_PAGES'
        const long pages = sysconf(_SC_PHYS_PAGES);
                                   ^
1 error generated.

​Here is how this problem was fixed in another port.

However it looks like the error is being encountered when building a bundled third-party lzma library. If that's true, see if you can convince osquery to use a MacPorts-provided copy of that and any other bundled libraries instead. Then we can fix this problem (if it still exists) in those ports and then everyone benefits, not just osquery.

Change History (4)

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

I added this fix generally to legacysupport.

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

That's great; thank you. Nevertheless please check the last paragraph of the ticket description before going with the legacysupport solution.

comment:4 Changed 3 weeks ago by jrjsmrtn

Resolution: → fixed
Status: assigned → closed

In ee3964dc75e00ac20da99d7b13db237ec3f5749e/macports-ports (master):

osquery: update to 5.23.1, install upstream package

Installs upstream's signed .pkg instead of building from source. The
es_process_events and es_process_file_events tables need the
EndpointSecurity Client entitlement, which Apple issues to an
organisation's Developer account, so a build on the user's machine
cannot carry it and both tables are disabled at runtime.

The shipped binary is universal, so one distfile serves x86_64 and
arm64. The three patchfiles are dropped with the source build; the
paths they used to correct are now set in osquery.flags and the example
config, since a binary cannot be patched.

Closes: #63399
Closes: #61542
Closes: #60650

Note: See TracTickets for help on using tickets.