Compile error Bind 9.16.1 on MacOS 10.14.6

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compile error Bind 9.16.1 on MacOS 10.14.6

Larry Stone
I’ve been building Bind from source for a number of years on Macintoshes. Made my first attempt at Bind 9.16.1 today. After navigating the new dependency for libuv and getting a good configure, I tried make and errored at:

gcc  -include /Users/larry/ServerAppsNoBackup/bind-9.16.1/config.h -I/Users/larry/ServerAppsNoBackup/bind-9.16.1 -I../../.. -I./include -I./../pthreads/include -I../include -I./../include -I./.. -I/usr/local/ssl/include       -g -O2 -Qunused-arguments -pthread -I/usr/local/include -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing  -c time.c
time.c:117:6: warning: implicit declaration of function 'clock_gettime' is
     invalid in C99 [-Wimplicit-function-declaration]
       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
           ^
time.c:117:20: error: use of undeclared identifier 'CLOCK_REALTIME'
       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
                         ^
time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
#define CLOCKSOURCE CLOCK_REALTIME
                   ^
time.c:151:20: error: use of undeclared identifier 'CLOCK_REALTIME'
       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
                         ^
time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
#define CLOCKSOURCE CLOCK_REALTIME
                   ^
1 warning and 2 errors generated.
make[3]: *** [time.o] Error 1
make[2]: *** [subdirs] Error 1
make[1]: *** [subdirs] Error 1
make: *** [subdirs] Error 1

Searching has turned up nothing for me.

--
Larry Stone
[hidden email]









--
Larry Stone
[hidden email]





_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile error Bind 9.16.1 on MacOS 10.14.6

Ondřej Surý
Hi Larry,

it seems like your macOS SDK is incomplete or something like this.

Both clock_gettime() and CLOCK_REALTIME are available since Mac OSX 10.12.

Please make sure you have up-to-date Xcode and matching Command Line Utils for Xcode.

Ondrej
--
Ondřej Surý
[hidden email]

> On 24 Mar 2020, at 21:23, Larry Stone <[hidden email]> wrote:
>
> I’ve been building Bind from source for a number of years on Macintoshes. Made my first attempt at Bind 9.16.1 today. After navigating the new dependency for libuv and getting a good configure, I tried make and errored at:
>
> gcc  -include /Users/larry/ServerAppsNoBackup/bind-9.16.1/config.h -I/Users/larry/ServerAppsNoBackup/bind-9.16.1 -I../../.. -I./include -I./../pthreads/include -I../include -I./../include -I./.. -I/usr/local/ssl/include       -g -O2 -Qunused-arguments -pthread -I/usr/local/include -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing  -c time.c
> time.c:117:6: warning: implicit declaration of function 'clock_gettime' is
>     invalid in C99 [-Wimplicit-function-declaration]
>       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>           ^
> time.c:117:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>                         ^
> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
> #define CLOCKSOURCE CLOCK_REALTIME
>                   ^
> time.c:151:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>       if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>                         ^
> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
> #define CLOCKSOURCE CLOCK_REALTIME
>                   ^
> 1 warning and 2 errors generated.
> make[3]: *** [time.o] Error 1
> make[2]: *** [subdirs] Error 1
> make[1]: *** [subdirs] Error 1
> make: *** [subdirs] Error 1
>
> Searching has turned up nothing for me.
>
> --
> Larry Stone
> [hidden email]
>
>
>
>
>
>
>
>
>
> --
> Larry Stone
> [hidden email]
>
>
>
>
>
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compile error Bind 9.16.1 on MacOS 10.14.6

Larry Stone
Thanks, Ondrej. It took some doing but got the latest Xcode for my version of MacOS installed (multi GB so long time to download, then a long time to expand). Bind 9.16.1 the built and is now running on my “test” system (it’s my laptop but I use it to test stuff before it goes on my server (but not running MacOS Server) Macintosh).

For anyone else having this issue, Apple does not make it easy to get older versions of Xcode. The App Store will only offer the latest which is for Catalina (MacOS 10.15.x). I haven’t upgraded yet so it took some time to find how to get an older version from the Apple Developers website.

And honestly, I hadn’t realized how out of date my version of Xcode was as I only use the command line tools and everything had been working fine until today. Something to add to the MacOS upgrade checklist.

--
Larry Stone
[hidden email]





> On Mar 24, 2020, at 3:29 PM, Ondřej Surý <[hidden email]> wrote:
>
> Hi Larry,
>
> it seems like your macOS SDK is incomplete or something like this.
>
> Both clock_gettime() and CLOCK_REALTIME are available since Mac OSX 10.12.
>
> Please make sure you have up-to-date Xcode and matching Command Line Utils for Xcode.
>
> Ondrej
> --
> Ondřej Surý
> [hidden email]
>
>> On 24 Mar 2020, at 21:23, Larry Stone <[hidden email]> wrote:
>>
>> I’ve been building Bind from source for a number of years on Macintoshes. Made my first attempt at Bind 9.16.1 today. After navigating the new dependency for libuv and getting a good configure, I tried make and errored at:
>>
>> gcc  -include /Users/larry/ServerAppsNoBackup/bind-9.16.1/config.h -I/Users/larry/ServerAppsNoBackup/bind-9.16.1 -I../../.. -I./include -I./../pthreads/include -I../include -I./../include -I./.. -I/usr/local/ssl/include       -g -O2 -Qunused-arguments -pthread -I/usr/local/include -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing  -c time.c
>> time.c:117:6: warning: implicit declaration of function 'clock_gettime' is
>>    invalid in C99 [-Wimplicit-function-declaration]
>>      if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>          ^
>> time.c:117:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>      if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>                        ^
>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>> #define CLOCKSOURCE CLOCK_REALTIME
>>                  ^
>> time.c:151:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>      if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>                        ^
>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>> #define CLOCKSOURCE CLOCK_REALTIME
>>                  ^
>> 1 warning and 2 errors generated.
>> make[3]: *** [time.o] Error 1
>> make[2]: *** [subdirs] Error 1
>> make[1]: *** [subdirs] Error 1
>> make: *** [subdirs] Error 1
>>
>> Searching has turned up nothing for me.
>>
>> --
>> Larry Stone
>> [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> Larry Stone
>> [hidden email]
>>
>>
>>
>>
>>
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>
>> bind-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/bind-users
>

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile error Bind 9.16.1 on MacOS 10.14.6

Mark Andrews
You shouldn't need all of Xcode to build BIND 9.  Just the command line tools.
That said Xcode or the Command Line tools should be upgraded with each OS upgrade.

From BIND9’s README

macOS

Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or,
if you have Xcode already installed, you can run xcode-select --install.
(Note that an Apple ID may be required to access the download page.)

Mark


> On 25 Mar 2020, at 09:08, Larry Stone <[hidden email]> wrote:
>
> Thanks, Ondrej. It took some doing but got the latest Xcode for my version of MacOS installed (multi GB so long time to download, then a long time to expand). Bind 9.16.1 the built and is now running on my “test” system (it’s my laptop but I use it to test stuff before it goes on my server (but not running MacOS Server) Macintosh).
>
> For anyone else having this issue, Apple does not make it easy to get older versions of Xcode. The App Store will only offer the latest which is for Catalina (MacOS 10.15.x). I haven’t upgraded yet so it took some time to find how to get an older version from the Apple Developers website.
>
> And honestly, I hadn’t realized how out of date my version of Xcode was as I only use the command line tools and everything had been working fine until today. Something to add to the MacOS upgrade checklist.
>
> --
> Larry Stone
> [hidden email]
>
>
>
>
>
>> On Mar 24, 2020, at 3:29 PM, Ondřej Surý <[hidden email]> wrote:
>>
>> Hi Larry,
>>
>> it seems like your macOS SDK is incomplete or something like this.
>>
>> Both clock_gettime() and CLOCK_REALTIME are available since Mac OSX 10.12.
>>
>> Please make sure you have up-to-date Xcode and matching Command Line Utils for Xcode.
>>
>> Ondrej
>> --
>> Ondřej Surý
>> [hidden email]
>>
>>> On 24 Mar 2020, at 21:23, Larry Stone <[hidden email]> wrote:
>>>
>>> I’ve been building Bind from source for a number of years on Macintoshes. Made my first attempt at Bind 9.16.1 today. After navigating the new dependency for libuv and getting a good configure, I tried make and errored at:
>>>
>>> gcc  -include /Users/larry/ServerAppsNoBackup/bind-9.16.1/config.h -I/Users/larry/ServerAppsNoBackup/bind-9.16.1 -I../../.. -I./include -I./../pthreads/include -I../include -I./../include -I./.. -I/usr/local/ssl/include       -g -O2 -Qunused-arguments -pthread -I/usr/local/include -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing  -c time.c
>>> time.c:117:6: warning: implicit declaration of function 'clock_gettime' is
>>>   invalid in C99 [-Wimplicit-function-declaration]
>>>     if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>         ^
>>> time.c:117:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>>     if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>                       ^
>>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>>> #define CLOCKSOURCE CLOCK_REALTIME
>>>                 ^
>>> time.c:151:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>>     if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>                       ^
>>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>>> #define CLOCKSOURCE CLOCK_REALTIME
>>>                 ^
>>> 1 warning and 2 errors generated.
>>> make[3]: *** [time.o] Error 1
>>> make[2]: *** [subdirs] Error 1
>>> make[1]: *** [subdirs] Error 1
>>> make: *** [subdirs] Error 1
>>>
>>> Searching has turned up nothing for me.
>>>
>>> --
>>> Larry Stone
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Larry Stone
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>>
>>> bind-users mailing list
>>> [hidden email]
>>> https://lists.isc.org/mailman/listinfo/bind-users
>>
>
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>
> bind-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/bind-users

--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: [hidden email]

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users
Reply | Threaded
Open this post in threaded view
|

Re: Compile error Bind 9.16.1 on MacOS 10.14.6

Larry Stone
Mark, that’s what I always thought until today. But after Ondrej’s reply, although I already had the command line tools installed and had updated them with each major MacOS update, I did a Xcode-select --install which reinstalled them. Still no good on the bind compile. So did a full update of Xcode to the latest for my MacOS version and then bind built fine. But my Xcode was very, very old - version 7. Current is 11.x (11.3.1 for MacOS Mojave, 11.4 for Catalina).

--
Larry Stone
[hidden email]





> On Mar 24, 2020, at 5:40 PM, Mark Andrews <[hidden email]> wrote:
>
> You shouldn't need all of Xcode to build BIND 9.  Just the command line tools.
> That said Xcode or the Command Line tools should be upgraded with each OS upgrade.
>
> From BIND9’s README
>
> macOS
>
> Building on macOS assumes that the "Command Tools for Xcode" is installed.
> This can be downloaded from https://developer.apple.com/download/more/ or,
> if you have Xcode already installed, you can run xcode-select --install.
> (Note that an Apple ID may be required to access the download page.)
>
> Mark
>
>
>> On 25 Mar 2020, at 09:08, Larry Stone <[hidden email]> wrote:
>>
>> Thanks, Ondrej. It took some doing but got the latest Xcode for my version of MacOS installed (multi GB so long time to download, then a long time to expand). Bind 9.16.1 the built and is now running on my “test” system (it’s my laptop but I use it to test stuff before it goes on my server (but not running MacOS Server) Macintosh).
>>
>> For anyone else having this issue, Apple does not make it easy to get older versions of Xcode. The App Store will only offer the latest which is for Catalina (MacOS 10.15.x). I haven’t upgraded yet so it took some time to find how to get an older version from the Apple Developers website.
>>
>> And honestly, I hadn’t realized how out of date my version of Xcode was as I only use the command line tools and everything had been working fine until today. Something to add to the MacOS upgrade checklist.
>>
>> --
>> Larry Stone
>> [hidden email]
>>
>>
>>
>>
>>
>>> On Mar 24, 2020, at 3:29 PM, Ondřej Surý <[hidden email]> wrote:
>>>
>>> Hi Larry,
>>>
>>> it seems like your macOS SDK is incomplete or something like this.
>>>
>>> Both clock_gettime() and CLOCK_REALTIME are available since Mac OSX 10.12.
>>>
>>> Please make sure you have up-to-date Xcode and matching Command Line Utils for Xcode.
>>>
>>> Ondrej
>>> --
>>> Ondřej Surý
>>> [hidden email]
>>>
>>>> On 24 Mar 2020, at 21:23, Larry Stone <[hidden email]> wrote:
>>>>
>>>> I’ve been building Bind from source for a number of years on Macintoshes. Made my first attempt at Bind 9.16.1 today. After navigating the new dependency for libuv and getting a good configure, I tried make and errored at:
>>>>
>>>> gcc  -include /Users/larry/ServerAppsNoBackup/bind-9.16.1/config.h -I/Users/larry/ServerAppsNoBackup/bind-9.16.1 -I../../.. -I./include -I./../pthreads/include -I../include -I./../include -I./.. -I/usr/local/ssl/include       -g -O2 -Qunused-arguments -pthread -I/usr/local/include -fPIC  -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -Wno-missing-field-initializers -fno-strict-aliasing  -c time.c
>>>> time.c:117:6: warning: implicit declaration of function 'clock_gettime' is
>>>>  invalid in C99 [-Wimplicit-function-declaration]
>>>>    if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>>        ^
>>>> time.c:117:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>>>    if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>>                      ^
>>>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>>>> #define CLOCKSOURCE CLOCK_REALTIME
>>>>                ^
>>>> time.c:151:20: error: use of undeclared identifier 'CLOCK_REALTIME'
>>>>    if (clock_gettime(CLOCKSOURCE, &ts) == -1) {
>>>>                      ^
>>>> time.c:42:21: note: expanded from macro 'CLOCKSOURCE'
>>>> #define CLOCKSOURCE CLOCK_REALTIME
>>>>                ^
>>>> 1 warning and 2 errors generated.
>>>> make[3]: *** [time.o] Error 1
>>>> make[2]: *** [subdirs] Error 1
>>>> make[1]: *** [subdirs] Error 1
>>>> make: *** [subdirs] Error 1
>>>>
>>>> Searching has turned up nothing for me.
>>>>
>>>> --
>>>> Larry Stone
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Larry Stone
>>>> [hidden email]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>>>
>>>> bind-users mailing list
>>>> [hidden email]
>>>> https://lists.isc.org/mailman/listinfo/bind-users
>>>
>>
>> _______________________________________________
>> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
>>
>> bind-users mailing list
>> [hidden email]
>> https://lists.isc.org/mailman/listinfo/bind-users
>
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742              INTERNET: [hidden email]
>

_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list

bind-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/bind-users