Open b9Joker108 opened 3 days ago
Not sure if the build is supported or not. Does building 3.12 work on this environment?
I haven't tried 3.12. In the main part of the chroot I have 3.10.14 and in a Python Virtual Environment I have: 3.11.8.
I was just endeavouring to install 3.13.0 with pyenv
to give the new REPL a go!
cc @mhsmith as the Android expert
Ah by the way thank you for your thorough report. It's 3 AM here but I see that the issue could be related to curses which I recently worked on.
I am not sure it's possible to make the REPL work without curses but I'll check tomorrow. In the meantime, I can also ask @pablogsal whether he has some insight on this matter.
I am not in any hurry. I was just curious to try the new REPL. Just progress when convenient. FYI, this is the build.log: https://we.tl/t-TK2vGFmZy0
Thanks for the report. The build log link appears to be time-limited, so I've attached the file below. You can attach any file to a GitHub issue by dragging it into the comment box, or clicking the link below the box.
The most relevant messages are:
gcc -D_DEFAULT_SOURCE -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fno-semantic-interposition -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -fvisibility=hidden -fprofile-generate -I../Include/internal -I../Include/internal/mimalloc -IObjects -IInclude -IPython -I. -I../Include -fPIC -c ../Modules/_cursesmodule.c -o Modules/_cursesmodule.o
../Modules/_cursesmodule.c: In function ‘_curses_window_addch_impl’:
../Modules/_cursesmodule.c:761:9: warning: implicit declaration of function ‘setcchar’; did you mean ‘getchar’? [-Wimplicit-function-declaration]
761 | setcchar(&wcval, wstr, attr, PAIR_NUMBER(attr), NULL);
| ^~~~~~~~
| getchar
../Modules/_cursesmodule.c:763:19: warning: implicit declaration of function ‘mvwadd_wch’; did you mean ‘mvwaddch’? [-Wimplicit-function-declaration]
763 | rtn = mvwadd_wch(self->win,y,x, &wcval);
| ^~~~~~~~~~
| mvwaddch
../Modules/_cursesmodule.c:765:19: warning: implicit declaration of function ‘wadd_wch’; did you mean ‘waddch’? [-Wimplicit-function-declaration]
765 | rtn = wadd_wch(self->win, &wcval);
| ^~~~~~~~
| waddch
Modified Makefile to remove
-Werror
and fiximplicit-function-declaration
This is an error for a good reason, so I suggest you revert that. Hiding it will only move the problem to a more confusing place.
In this case it probably means the curses headers aren't on the include path. I haven't tried to build Python for Android with curses before, so I don't know how the configure script discovers the library, but looking at the configure output might give you some hints.
gcc -shared -fno-semantic-interposition -fprofile-generate Modules/_cursesmodule.o -lncursesw -ltinfo -o Modules/_curses.cpython-313-aarch64-linux-gnu.so
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libtinfo.a(lib_tputs.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_nc_outch_sp' which may bind externally can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libtinfo.a(lib_tputs.o): in function `delay_output_sp':
(.text+0x1e4): dangerous relocation: unsupported relocation
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/libtinfo.a(lib_tputs.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_nc_putchar_sp' which may bind externally can not be used when making a shared object; recompile with -fPIC
I see you attempted to build libtinfo with -fPIC
, but you should check its own build log to make sure the flag was actually used.
Not being familiar with this chroot arrangement, it also isn't obvious to me whether the libtinfo you're linking against is actually the one you built.
I am a noob. I am still learning. I read what you wrote, but I have had enough screentime today. I will progress it tomorrow.
I am not sure it's possible to make the REPL work without curses but I'll check tomorrow. In the meantime, I can also ask @pablogsal whether he has some insight on this matter.
Not at the time but we think it's possible but requires us to reimplement a bunch of stuff to prepare the terminal and although possible, we need to weight how maintainable that is taking into account all the platforms we support
😅😅😅😅😅
@python/organization-owners Could you take care of the spam above? thank you!
Bug report
Bug description:
Environment:
Steps and Issues Encountered:
Install Dependencies:
apt-get install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev libc6-dev libffi-dev
Configure and Compile libtinfo:
libtinfo
viaapt-get source libtinfo-dev
.-fPIC
flag using:libtinfo
.Configure and Compile Python 3.13.0:
build
directory, ran the configuration script with optimizations:Makefile
to remove-Werror
and fiximplicit-function-declaration
:libtinfo
linkage errors.Revisit
libtinfo
:libtinfo
recompile were correctly followed.Considered Alternative Approaches:
libtinfo
with./configure --without-curses
, but concerned about compromised functionality.Current Status:
libtinfo
.Termux Info
Logs:
TBP
CPython versions tested on:
3.13
Operating systems tested on:
Linux