Сборка libgc не удалась в Mac OS X 10.6 Snow Leopard: ... и требует определения _XOPEN_SOURCE

Следующие шаги:

$ wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.0.tar.gz
$ tar xvfz gc-7.0.tar.gz
$ cd gc-7.0
$ ./configure
$ make

Ошибка с этой ошибкой:

In file included from mach_dep.c:163:
/usr/include/ucontext.h:42:2: error: #error ucontext routines are deprecated, 
and require _XOPEN_SOURCE to be defined

1 ответ

Решение

ucontext.h здесь включено:

$ fstr "ucontext.h" # find string ...
./mach_dep.c:163
./os_dep.c:2752

замещать ucontext.h в mach_dep.c с sys/ucontext.h,

Подробности: http://duriansoftware.com/joe/PSA%3A-avoiding-the-%22ucontext-routines-are-deprecated%22-error-on-Mac-OS-X-Snow-Leopard.html

Другие вопросы по тегам