Author Nan Zhang
Recipients Nan Zhang
Date 2017-05-15.02:55:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-05-15 02:55:39Nan Zhangsetrecipients: + Nan Zhang
2017-05-15 02:55:39Nan Zhangsetmessageid: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za>
2017-05-15 02:55:39Nan Zhanglinkissue30367 messages
2017-05-15 02:55:37Nan Zhangcreate