Opened 7 years ago
Last modified 7 years ago
#1353 assigned defect
posix-semaphore egg won't build on OS X: uses deprecated API
Reported by: | Norman Gray | Owned by: | dleslie |
---|---|---|---|
Priority: | major | Milestone: | someday |
Component: | extensions | Version: | 4.12.0 |
Keywords: | posix-semaphore | Cc: | |
Estimated difficulty: | easy |
Description
Building the posix-semaphore egg fails on OS X, as it uses a deprecated API; see the log below.
This is on OS X 10.11.6, with its associated version of clang (Apple LLVM version 8.0.0 (clang-800.0.42.1)).
It appears to be only the support for unnamed semaphores (which are apparently optional in POSIX) that's deprecated; the support for named ones seems to be present.
There's a StackOverflow? discussion about the deprecation at (1) below, which points to some fairly authoritative discussion, including why the deprecation exists, at (2).
(1) http://stackoverflow.com/questions/27736618/why-are-sem-init-sem-getvalue-sem-destroy-deprecated-on-mac-os-x-and-w
(2) https://lists.apple.com/archives/darwin-kernel/2009/Apr/msg00010.html
% chicken-install posix-semaphore retrieving ... connecting to host "chicken.kitten-technologies.co.uk", port 80 ... requesting "/henrietta.cgi?name=posix-semaphore&mode=default" ... reading response ... HTTP/1.1 200 OK Date: Mon, 13 Mar 2017 23:30:47 GMT Server: Apache/2.2.31 (Unix) DAV/2 PHP/5.5.36 mod_fastcgi/2.4.6 Connection: close Transfer-Encoding: chunked Content-Type: text/plain reading chunks . reading files ... ./readme.md ./LICENSE ./posix-semaphore.release-info ./posix-semaphore.meta ./posix-semaphore.setup ./posix-semaphore.scm ./test.scm posix-semaphore located at /var/folders/7b/1fldmb290mzbgxppkpwwffx40000gn/T/temp3c46.40550/posix-semaphore checking platform for `posix-semaphore' ... checking dependencies for `posix-semaphore' ... install order: ("posix-semaphore") installing posix-semaphore:0.5.1 ... changing current directory to /var/folders/7b/1fldmb290mzbgxppkpwwffx40000gn/T/temp3c46.40550/posix-semaphore '/Data/tools/chicken-4.12/bin/csi' -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"posix-semaphore\" \"0.5.1\"))" 'posix-semaphore.setup' '/Data/tools/chicken-4.12/bin/csc' -feature compiling-extension -setup-mode -O3 -C -O3 -lpthread -s -d1 -j posix-semaphore posix-semaphore.scm posix-semaphore.c:63:11: warning: 'sem_getvalue' is deprecated [-Wdeprecated-declarations] int err = sem_getvalue(sem, &val); ^ /usr/include/sys/semaphore.h:54:5: note: 'sem_getvalue' has been explicitly marked deprecated here int sem_getvalue(sem_t * __restrict, int * __restrict) __deprecated; ^ posix-semaphore.c:92:1: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration] clock_gettime(CLOCK_REALTIME, &tm); ^ posix-semaphore.c:92:15: error: use of undeclared identifier 'CLOCK_REALTIME' clock_gettime(CLOCK_REALTIME, &tm); ^ posix-semaphore.c:95:7: warning: implicit declaration of function 'sem_timedwait' is invalid in C99 [-Wimplicit-function-declaration] CHECK(sem_timedwait(sem, &tm)) ^ posix-semaphore.c:180:7: warning: 'sem_destroy' is deprecated [-Wdeprecated-declarations] CHECK(sem_destroy(sem)) ^ /usr/include/sys/semaphore.h:53:5: note: 'sem_destroy' has been explicitly marked deprecated here int sem_destroy(sem_t *) __deprecated; ^ posix-semaphore.c:192:7: warning: 'sem_init' is deprecated [-Wdeprecated-declarations] CHECK(sem_init(sem, shared, value)) ^ /usr/include/sys/semaphore.h:55:5: note: 'sem_init' has been explicitly marked deprecated here int sem_init(sem_t *, int, unsigned int) __deprecated; ^ 5 warnings and 1 error generated. Error: shell command terminated with non-zero exit status 256: '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc' 'posix-semaphore.c' -o 'posix-semaphore.o' -c -fno-strict-aliasing -fwrapv -fno-common -DHAVE_CHICKEN_CONFIG_H -m64 -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -O3 -I/Data/tools/chicken-4.12/include/chicken Error: shell command failed with nonzero exit status 256: '/Data/tools/chicken-4.12/bin/csc' -feature compiling-extension -setup-mode -O3 -C -O3 -lpthread -s -d1 -j posix-semaphore posix-semaphore.scm Error: shell command terminated with nonzero exit code 17920 "'/Data/tools/chicken-4.12/bin/csi' -bnq -setup-mode -e \"(require-library setup...
Change History (2)
comment:1 Changed 7 years ago by
Keywords: | posix-semaphore added |
---|---|
Owner: | set to dleslie |
Status: | new → assigned |
comment:2 Changed 7 years ago by
Estimated difficulty: | → easy |
---|