1

以下步骤:

$ 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
4

1 回答 1

3

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:-avoiding-the-%22ucontext-routines-are-deprecated%22-error-on-Mac-OS-X-Snow-Leopard.html

于 2011-08-03T16:27:05.600 回答