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.

classification
Title: Cannot compile Python3.7.3 on Alt-F (ARM)
Type: compile error Stage: resolved
Components: Build Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Jarl Gullberg, iritkatriel, steve.dower, terry.reedy, vstinner
Priority: normal Keywords:

Created on 2019-05-28 15:37 by Jarl Gullberg, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
make.log Jarl Gullberg, 2019-05-28 15:37
Messages (7)
msg343796 - (view) Author: Jarl Gullberg (Jarl Gullberg) Date: 2019-05-28 15:37
I am currently trying to compile the latest stable release of Python (3.7.3 at the time of writing) on a small ARM device (a DNS-323A1 NAS), running Alt-F (a custom linux-based firmware) using GCC 4.3.3. Unfortunately, I've hit a major snag that I just can't seem to get past.

In short, the compilation goes well until the [sharedmods] stage, where it encounters an error related to readline and the module not having been compiled with -fPIC. I've included a truncated log (taken from a second make invocation after the first failed) that displays the issue.

This is the ./configure invocation I've used:
'--prefix=/usr' '--enable-shared' '--with-system-expat' '--with-system-ffi' '--with-ensurepip=yes' '--enable-optimizations' '--enable-ipv6' 'CFLAGS=-fPIC' 'CXXFLAGS=-fPIC'

Any assistance would be much appreciated.
msg344127 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-05-31 21:26
I presume you are trying to compile CPython.  Perhaps you might do better with MicroPython, designed for micro devices.  Steve, do you know anything about CPython on Arm with linux?
msg344315 - (view) Author: Jarl Gullberg (Jarl Gullberg) Date: 2019-06-02 20:50
That's correct, CPython. I'm not sure if MicroPython would fit the bill for
me, since this system is a full-blown Linux system.

On Fri, 31 May 2019 at 23:26, Terry J. Reedy <report@bugs.python.org> wrote:

>
> Terry J. Reedy <tjreedy@udel.edu> added the comment:
>
> I presume you are trying to compile CPython.  Perhaps you might do better
> with MicroPython, designed for micro devices.  Steve, do you know anything
> about CPython on Arm with linux?
>
> ----------
> nosy: +steve.dower, terry.reedy
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue37080>
> _______________________________________
>
msg344317 - (view) Author: Jarl Gullberg (Jarl Gullberg) Date: 2019-06-02 21:03
After some more testing, I can add that the same issue crops up when attempting to compile Python 2.7.16 as well.
msg402913 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2021-09-29 21:08
Jarl, I don't know if we support compiling on such devices, even though the OS is linux.  I suggest that you ask on python-list, where someone might have the experience to help you.
msg402929 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2021-09-30 01:39
> Use GCC option -fPIC for shared objects, please

Did you try that? I guess that the configure.ac block about CCSHARED="-fPIC" doesn't handle your operating system.

Try to modify manually Makefile to use "CCSHARED=-fPIC", make clean, and try make again.

I suggest starting without --enable-optimizations until you solve the build errors.
msg411406 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-23 19:09
3.7 is no longer maintained. Please create a new issue if you are having this problem with a current version (>= 3.9).
History
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81261
2022-01-23 19:09:41iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg411406

resolution: out of date
stage: resolved
2021-09-30 01:39:04vstinnersetnosy: + vstinner
messages: + msg402929
2021-09-29 21:08:35terry.reedysetmessages: + msg402913
2019-06-02 21:03:25Jarl Gullbergsetmessages: + msg344317
2019-06-02 20:50:18Jarl Gullbergsetmessages: + msg344315
2019-05-31 21:26:27terry.reedysetnosy: + terry.reedy, steve.dower
messages: + msg344127
2019-05-28 15:37:32Jarl Gullbergcreate