Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Lutz Mader
Sorry,
I try to build it myself, after reading

> Fixed: Issue #584: monit 5.21.0 fails to compile on OS X 10.9.5

but I can't. With Mac OS X 10.6 I got

src/device/sysdep_DARWIN.c:102: warning: implicit declaration of
function ‘DADiskCreateFromVolumePath’
src/device/sysdep_DARWIN.c:102: warning: initialization makes pointer
from integer without a cast
src/device/sysdep_DARWIN.c: In function ‘_filesystemFlagsToString’:
src/device/sysdep_DARWIN.c:187: error: ‘MNT_CPROTECT’ undeclared (first
use in this function)
src/device/sysdep_DARWIN.c:187: error: (Each undeclared identifier is
reported only once
src/device/sysdep_DARWIN.c:187: error: for each function it appears in.)
make[2]: *** [src/device/sysdep_DARWIN.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I take a look to the code, but the code in "./device/sysdep_DARWIN.c"
and "./process/sysdep_DARWIN.c" doesn't fit to Mac OS X 10.6.

Perhaps you can build monit on 10.9, but I can't build monit on 10.6.

I'm so sorry,
Lutz

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

martinp@tildeslash.com
Thanks for data.

We compile it on MacOSX Server 10.6.8, the MNT_CPROTECT is defined in the /usr/include/sys/mount.h file:

$ grep -r MNT_CPROTECT /usr/include/ 2>/dev/null
/usr/include/sys/mount.h:#define MNT_CPROTECT 0x00000080 /* file system supports content protection */

If you build for 10.6 SDK, it should work fine.

If you try to build for older MacOSX SDK version (such as 10.5.x) using CFLAGS -isysroot and LDFLAGS -syslibroot, then it may fail - it seems the MNT_CPROTECT is not defined in MacOSX10.5.sdk



> On 20 Apr 2017, at 14:35, Lutz Mader <[hidden email]> wrote:
>
> Sorry,
> I try to build it myself, after reading
>
>> Fixed: Issue #584: monit 5.21.0 fails to compile on OS X 10.9.5
>
> but I can't. With Mac OS X 10.6 I got
>
> src/device/sysdep_DARWIN.c:102: warning: implicit declaration of
> function ‘DADiskCreateFromVolumePath’
> src/device/sysdep_DARWIN.c:102: warning: initialization makes pointer
> from integer without a cast
> src/device/sysdep_DARWIN.c: In function ‘_filesystemFlagsToString’:
> src/device/sysdep_DARWIN.c:187: error: ‘MNT_CPROTECT’ undeclared (first
> use in this function)
> src/device/sysdep_DARWIN.c:187: error: (Each undeclared identifier is
> reported only once
> src/device/sysdep_DARWIN.c:187: error: for each function it appears in.)
> make[2]: *** [src/device/sysdep_DARWIN.o] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> I take a look to the code, but the code in "./device/sysdep_DARWIN.c"
> and "./process/sysdep_DARWIN.c" doesn't fit to Mac OS X 10.6.
>
> Perhaps you can build monit on 10.9, but I can't build monit on 10.6.
>
> I'm so sorry,
> Lutz
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

martinp@tildeslash.com
Fixed the compilation for MacOS 10.5.x, you can test the development snapshot if you want:

wget https://bitbucket.org/tildeslash/monit/get/master.tar.gz
tar -xzf master.tar.gz
cd tildeslash*
./bootstrap
./configure
make



> On 20 Apr 2017, at 15:04, Martin Pala <[hidden email]> wrote:
>
> Thanks for data.
>
> We compile it on MacOSX Server 10.6.8, the MNT_CPROTECT is defined in the /usr/include/sys/mount.h file:
>
> $ grep -r MNT_CPROTECT /usr/include/ 2>/dev/null
> /usr/include/sys/mount.h:#define MNT_CPROTECT 0x00000080 /* file system supports content protection */
>
> If you build for 10.6 SDK, it should work fine.
>
> If you try to build for older MacOSX SDK version (such as 10.5.x) using CFLAGS -isysroot and LDFLAGS -syslibroot, then it may fail - it seems the MNT_CPROTECT is not defined in MacOSX10.5.sdk
>
>
>
>> On 20 Apr 2017, at 14:35, Lutz Mader <[hidden email]> wrote:
>>
>> Sorry,
>> I try to build it myself, after reading
>>
>>> Fixed: Issue #584: monit 5.21.0 fails to compile on OS X 10.9.5
>>
>> but I can't. With Mac OS X 10.6 I got
>>
>> src/device/sysdep_DARWIN.c:102: warning: implicit declaration of
>> function ‘DADiskCreateFromVolumePath’
>> src/device/sysdep_DARWIN.c:102: warning: initialization makes pointer
>> from integer without a cast
>> src/device/sysdep_DARWIN.c: In function ‘_filesystemFlagsToString’:
>> src/device/sysdep_DARWIN.c:187: error: ‘MNT_CPROTECT’ undeclared (first
>> use in this function)
>> src/device/sysdep_DARWIN.c:187: error: (Each undeclared identifier is
>> reported only once
>> src/device/sysdep_DARWIN.c:187: error: for each function it appears in.)
>> make[2]: *** [src/device/sysdep_DARWIN.o] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>>
>> I take a look to the code, but the code in "./device/sysdep_DARWIN.c"
>> and "./process/sysdep_DARWIN.c" doesn't fit to Mac OS X 10.6.
>>
>> Perhaps you can build monit on 10.9, but I can't build monit on 10.6.
>>
>> I'm so sorry,
>> Lutz
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Lutz Mader
In reply to this post by martinp@tildeslash.com
Hello Martion,
sorry, I use Mac OS 10.6.8 also.

> We compile it on MacOSX Server 10.6.8, the MNT_CPROTECT is defined in the /usr/include/sys/mount.h file:
>
> $ grep -r MNT_CPROTECT /usr/include/ 2>/dev/null
> /usr/include/sys/mount.h:#define MNT_CPROTECT 0x00000080 /* file system supports content protection */
>
> If you build for 10.6 SDK, it should work fine.
>
> If you try to build for older MacOSX SDK version (such as 10.5.x) using CFLAGS -isysroot and LDFLAGS -syslibroot, then it may fail - it seems the MNT_CPROTECT is not defined in MacOSX10.5.sdk

Something like -isysroot is not used. But I find SDKROOT and remote the
variable from the login shell.

I remove this.
SDKROOT=/Developer/SDKs/MacOSX10.5.sdk

I checked the /usr/include/sys/mount.h (Mac OS X 10.6.8) and I got the
following only.

-r--r--r--  1 root  wheel  15174 Jul 26  2010 /usr/include/sys/mount.h

 * Copyright (c) 2000-2008 Apple Inc. All rights reserved.

/*
 * User specifiable flags.
 *
 * Unmount uses MNT_FORCE flag.
 */
#define MNT_RDONLY      0x00000001      /* read only filesystem */
#define MNT_SYNCHRONOUS 0x00000002      /* file system written
synchronously */
#define MNT_NOEXEC      0x00000004      /* can't exec from filesystem */
#define MNT_NOSUID      0x00000008      /* don't honor setuid bits on fs */
#define MNT_NODEV       0x00000010      /* don't interpret special files */
#define MNT_UNION       0x00000020      /* union with underlying
filesystem */
#define MNT_ASYNC       0x00000040      /* file system written
asynchronously */

/*
 * NFS export related mount flags.
 */

I checked this with Mac OS X 10.10.3 and I find the missing line behind
the "MNT_ASYNC" define.

#define MNT_CPROTECT    0x00000080      /* file system supports content
protection */

But my Mac OS X 10.6.8 does not have a appropriate header file that fit.
The used gcc is version 4.2.1 (Apple Inc. build 5664).

Sorry,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Lutz Mader
In reply to this post by martinp@tildeslash.com
Hello Martin,
I try to test this as soon as possible, but unfortunately my Mac OS X
10.5.8 doesn't contain the libtoolize command.

> Fixed the compilation for MacOS 10.5.x, you can test the development snapshot if you want:
>
> wget https://bitbucket.org/tildeslash/monit/get/master.tar.gz
> tar -xzf master.tar.gz
> cd tildeslash*
> ./bootstrap
> ./configure
> make
>

I got
[PowerBook:~/Desktop/tildeslash-monit-130702fce1f3] lutz% ./bootstrap
You should add the contents of `/usr/share/aclocal/libtool.m4' to
`aclocal.m4'.
Putting files in AC_CONFIG_AUX_DIR, `config'.
./bootstrap: line 6: libtoolize: command not found
Failed bootstrapping Monit

I'll be back tomorrow,
with regards,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

martinp@tildeslash.com
Hello Lutz,

we though about the OSX 10.5.x support ... that platform is 10 years old (released in 2007) and EOL by Apple in ca. 2011. Backporting monit to EOL platform is not effective use of our resources + because of API differences, it would bloat the code with lots of conditional blocks.

Based on today's investigation, the only changes needed for monit to compile is the MNT_CPROTECT condition + you'll need to replace the CFPropertyListCreateWithStream() call in src/process/ProcessTree.c which is available since OSX 10.6.x with the deprecated CFPropertyListCreateFromStream() call that was available on 10.5.x and earlier (both functions have same arguments, so just changing "With" -> "From" in the function name should work).

We're sorry we cannot provide more help with OSX 10.5.x support, we recommend using Monit 5.19.0 on it.

Best regards,
Martin



> On 20 Apr 2017, at 18:11, Lutz Mader <[hidden email]> wrote:
>
> Hello Martin,
> I try to test this as soon as possible, but unfortunately my Mac OS X
> 10.5.8 doesn't contain the libtoolize command.
>
>> Fixed the compilation for MacOS 10.5.x, you can test the development snapshot if you want:
>>
>> wget https://bitbucket.org/tildeslash/monit/get/master.tar.gz
>> tar -xzf master.tar.gz
>> cd tildeslash*
>> ./bootstrap
>> ./configure
>> make
>>
>
> I got
> [PowerBook:~/Desktop/tildeslash-monit-130702fce1f3] lutz% ./bootstrap
> You should add the contents of `/usr/share/aclocal/libtool.m4' to
> `aclocal.m4'.
> Putting files in AC_CONFIG_AUX_DIR, `config'.
> ./bootstrap: line 6: libtoolize: command not found
> Failed bootstrapping Monit
>
> I'll be back tomorrow,
> with regards,
> Lutz
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Lutz Mader
In reply to this post by Lutz Mader
Hello Martin,
after some hours away from the keyboard everything is working well,
I'm able to build monit based on the master.tar.gz.

> Fixed the compilation for MacOS 10.5.x, you can test the development
> snapshot if you want:

I've never use "bootstrap" before, in general I use "configure" only.
The command "libtoolize" is not available but "glibtoolize" is.

nice to see,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Mac OS X 10.6 - 10.9 is not back with Monit 5.22.0

Lutz Mader
In reply to this post by martinp@tildeslash.com
Hello Martin,
I spend some time to have a look to some other test systems are based on
Mac OS X 10.6.8 also.

> We compile it on MacOSX Server 10.6.8, the MNT_CPROTECT is defined in the /usr/include/sys/mount.h file:
>
> $ grep -r MNT_CPROTECT /usr/include/ 2>/dev/null
> /usr/include/sys/mount.h:#define MNT_CPROTECT 0x00000080 /* file system supports content protection */
>
> If you build for 10.6 SDK, it should work fine.

The Mac OS X 10.6.8 systems with Xcode 3.2.6 contain the sufficient
header files (e.g. /usr/include/sys/mount.h).

#define MNT_CPROTECT    0x00000080      /* file system supports content
protection */

The Mac OS X 10.6.8 systems with Xcode 3.2.4 do not.
And for Mac OS X 10.5.8 (I use Xcode 3.1.4) an useful build environment
is not available.

Unfortunately my test system is based on Mac OS X 10.6.8 with Xcode
3.2.4, that was the reason I can't find the right header files.

Based on a Mac OS X 10.6.8 system with Xcode 3.2.6 I am able to build
Monit 5.22.0. Next week I start testing Monit 5.22.0 in the AIX (we use
AIX 7.1) playground.

Thanks for all your help,
Lutz


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general