classification
Title: Python3 error while building on Alt-F
Type: compile error Stage:
Components: Build Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Chi Hsuan Yen, Honza Skýpala
Priority: normal Keywords:

Created on 2017-02-13 07:52 by Honza Skýpala, last changed 2017-02-13 20:12 by Honza Skýpala.

Files
File name Uploaded Description Edit
build.log Honza Skýpala, 2017-02-13 07:52 Log from build process
Messages (5)
msg287666 - (view) Author: Honza Skýpala (Honza Skýpala) Date: 2017-02-13 07:52
While trying to build Python 3.6.0 on emmbedded Linux device — D-Link DNS-320L running Alt-F firmware (Linux 3.18.28 #1 Fri Jun 17 14:44:39 WEST 2016 armv5tel GNU/Linux), it fails with

./python: can't resolve symbol 'crypt'
make: *** [sharedmods] Error 1

I can see the python executable is compiled fine in the source directory, if I try to run it, then it does work, including some quick tests (calculations, os.getcwd, random.randint -- works fine). 

I can also see that compiling the crypt modules did not report any errors and the .o file is present on the disk. I guess it is some kind of linking error?

Attaching the log from the build.
msg287667 - (view) Author: Chi Hsuan Yen (Chi Hsuan Yen) * Date: 2017-02-13 08:04
My patch at https://hg.python.org/cpython/rev/ca2f024ce7cb may help. It points out missing symbols earlier.
msg287669 - (view) Author: Honza Skýpala (Honza Skýpala) Date: 2017-02-13 09:39
Hi Chi Hsuan Yen, thanks for trying to help, unfortunately no change, still getting the same error.
msg287690 - (view) Author: Chi Hsuan Yen (Chi Hsuan Yen) * Date: 2017-02-13 13:28
That's super strange. crypt() is used in _crypt module only, and this modules is not used elsewhere in Python. A few more tests may help diagnostics

1. What's the result of ```./python -E```?
2. Does `import crypt` run fine in ./python?
3. Are there pre-installed Python on Alt-F? Uninstall them first may help
4. Is there a symbol called crypt in `nm ./python`?
msg287723 - (view) Author: Honza Skýpala (Honza Skýpala) Date: 2017-02-13 20:12
1. What's the result of ```./python -E```?

Python 3.6.0 (default, Feb 13 2017, 08:16:44)
[GCC 4.5.4 20120202 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.

2. Does `import crypt` run fine in ./python?

No, gives the error
./python: can't resolve symbol 'crypt'

3. Are there pre-installed Python on Alt-F? Uninstall them first may help

No, there is no python preinstalled (no python3, not even python2)

4. Is there a symbol called crypt in `nm ./python`?

No, `nm ./python | grep crypt` gives no results
History
Date User Action Args
2017-02-13 20:12:06Honza Skýpalasetmessages: + msg287723
2017-02-13 13:28:47Chi Hsuan Yensetmessages: + msg287690
2017-02-13 09:39:30Honza Skýpalasetmessages: + msg287669
2017-02-13 08:04:53Chi Hsuan Yensetnosy: + Chi Hsuan Yen
messages: + msg287667
2017-02-13 07:52:21Honza Skýpalacreate