This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author laheller
Recipients Alex.Willmer, laheller
Date 2021-05-27.11:51:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622116302.56.0.159914345765.issue44245@roundup.psfhosted.org>
In-reply-to
Content
Trying to cross-compile CPython 3.8 using Android NDK toolchain with _socket module enabled. Build fails at:

../Modules/socketmodule.c:6739:5: error: invalid use of undefined type 'struct if_nameindex'
     for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) {
     ^
../Modules/socketmodule.c:6739:19: error: dereferencing pointer to incomplete type
     for (i = 0; ni[i].if_index != 0 && i < INT_MAX; i++) {
                   ^
../Modules/socketmodule.c:6753:17: error: invalid use of undefined type 'struct if_nameindex'
                 ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
                 ^
../Modules/socketmodule.c:6753:19: error: dereferencing pointer to incomplete type
                 ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
                   ^
../Modules/socketmodule.c:6753:17: error: invalid use of undefined type 'struct if_nameindex'
                 ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
                 ^
../Modules/socketmodule.c:6753:62: error: dereferencing pointer to incomplete type
                 ni[i].if_index, PyUnicode_DecodeFSDefault, ni[i].if_name);
                                                              ^

Without _socket module, the cross-compilation works well. Also the result python3 build transferred to my Android device and tested in Terminal app works well. However without _socket module for example the command:
"python3 -m ensurepip"
obviously fails because of missing _socket module.
History
Date User Action Args
2021-05-27 11:51:42lahellersetrecipients: + laheller, Alex.Willmer
2021-05-27 11:51:42lahellersetmessageid: <1622116302.56.0.159914345765.issue44245@roundup.psfhosted.org>
2021-05-27 11:51:42lahellerlinkissue44245 messages
2021-05-27 11:51:42lahellercreate