Hi,
I'm trying to build skalibs on OS X (10.8.4, GNU bash, version
3.2.48(1)-release
(x86_64-apple-darwin12)).
I've had to apply the following two patches:
The first changes /bin/sh to /bin/bash so that "echo -n" works as
intended
(with /bin/sh, the "-n" is not interpreted as an argument).
It also changes "exec ./compile tryclockrt.c" to "./compile
tryclockrt.c; :".
Without that change, the build fails:
exec ./compile tryclockrt.c
tryclockrt.c: In function 'main':
tryclockrt.c:9:3: warning: implicit declaration of function
'clock_gettime'
[-Wimplicit-function-declaration]
if (clock_gettime(CLOCK_REALTIME, &ts) < 0) return 111 ;
^
tryclockrt.c:9:21: error: 'CLOCK_REALTIME' undeclared (first use in
this
function)
if (clock_gettime(CLOCK_REALTIME, &ts) < 0) return 111 ;
^
tryclockrt.c:9:21: note: each undeclared identifier is reported only
once
for each function it appears in
make[1]: *** [hasclockrt.h] Error 1
The second patch changes some gcc and ld args for Mac OS X:
$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc.
build
5658) (LLVM build 2336.11.00)
$ ld -v
_at_(#)PROGRAM:ld PROJECT:ld64-136
configured to support archs: armv6 armv7 armv7s i386 x86_64
LTO support using: LLVM version 3.2svn, from Apple Clang 4.2 (build
425.0.28)
(And FYI, once I've got skalibs, execline and s6 seem to build just
fine on OS X,
at least statically linked versions).
--
Patrick Mahoney
Received on Mon Apr 07 2014 - 22:13:59 UTC