New submission from Nan Zhang: up vote 0 down vote favorite I am trying to build CPython3.6 from GitHub statically with the Documentation below:
https://wiki.python.org/moin/BuildStatically Changed *shared* to *static* And only uncommented the module "testcapimodule" in Modules/Setup file: _testcapi _testcapimodule.c # Python C API test module And ran with 'make LINKFORSHARED=" "' However I got errors that: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -I. -I./Include -DPy_BUILD_CORE -c ./Modules/_testcapimodule.c -o Modules/_testcapimodule.o ./Modules/_testcapimodule.c: In function ‘test_datetime_capi’: ./Modules/_testcapimodule.c:2191:9: error: ‘PyDateTimeAPI’ undeclared (first use in this function) if (PyDateTimeAPI) { ^ ./Modules/_testcapimodule.c:2191:9: note: each undeclared identifier is reported only once for each function it appears in ./Modules/_testcapimodule.c:2203:5: error: ‘PyDateTime_IMPORT’ undeclared (first use in this function) PyDateTime_IMPORT; ^ ./Modules/_testcapimodule.c:2208:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ make: *** [Modules/_testcapimodule.o] Error 1 But when I build Cpython3.6 with *shared*, it can succeed. ---------- components: Build messages: 293664 nosy: Nan Zhang priority: normal severity: normal status: open title: Cannot build CPython3.6 with module “testcapimodule” statically type: compile error versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30367> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com