yan12125 / python3-android

Python 3 cross-compilation tools for Android.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu WSL Error building Ncurses

canewsin opened this issue · comments

#20 related

make[1]: Entering directory '/home/pramukesh/Documents/python3-android-old/src/ncurses-snapshots/misc'
DESTDIR=/home/pramukesh/Documents/python3-android-old/build/sysroot \
prefix=/usr \
exec_prefix=/usr \
bindir=/usr/bin \
top_srcdir=.. \
srcdir=. \
datadir=/usr/share \
ticdir=/usr/share/terminfo \
source=terminfo.tmp \
cross_compiling=yes \
/bin/sh ./run_tic.sh
** Building terminfo database, please wait...
Running tic to install /home/pramukesh/Documents/python3-android-old/build/sysroot/usr/share/terminfo ...

        You may see messages regarding extended capabilities, e.g., AX.
        These are extended terminal capabilities which are compiled
        using
                tic -x
        If you have ncurses 4.2 applications, you should read the INSTALL
        document, and install the terminfo without the -x option.

"terminfo.tmp", line 1115, col 36, terminal 'fbterm': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4800, col 36, terminal 'xterm+256color': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4819, col 36, terminal 'xterm+256setaf': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4863, col 25, terminal 'xterm+direct2': limiting value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 4863, col 40, terminal 'xterm+direct2': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4878, col 25, terminal 'xterm+direct': limiting value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 4878, col 40, terminal 'xterm+direct': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4900, col 25, terminal 'xterm+indirect': limiting value of `colors' from 0x1000000 to 0x7fff
"terminfo.tmp", line 4900, col 40, terminal 'xterm+indirect': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 7634, col 36, terminal 'dvtm-256color': limiting value of `pairs' from 0x10000 to 0x7fff
"terminfo.tmp", line 4790, terminal 'xterm-16color': error writing /home/pramukesh/Documents/python3-android-old/build/sysroot/usr/share/terminfo/x/xterm-16color
? tic could not build /home/pramukesh/Documents/python3-android-old/build/sysroot/usr/share/terminfo
Makefile:92: recipe for target 'install.data' failed
make[1]: *** [install.data] Error 1
make[1]: Leaving directory '/home/pramukesh/Documents/python3-android-old/src/ncurses-snapshots/misc'
Makefile:117: recipe for target 'install' failed
make: *** [install] Error 2
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pramukesh/Documents/python3-android-old/pybuild/__main__.py", line 3, in <module>
    main()
  File "/home/pramukesh/Documents/python3-android-old/pybuild/main.py", line 52, in main
    build_package('python')
  File "/home/pramukesh/Documents/python3-android-old/pybuild/main.py", line 36, in build_package
    build_package(dep)
  File "/home/pramukesh/Documents/python3-android-old/pybuild/main.py", line 36, in build_package
    build_package(dep)
  File "/home/pramukesh/Documents/python3-android-old/pybuild/main.py", line 44, in build_package
    pkg.build()
  File "/home/pramukesh/Documents/python3-android-old/pybuild/packages/ncurses.py", line 38, in build
    self.run(['make', 'install', f'DESTDIR={self.destdir()}'])
  File "/home/pramukesh/Documents/python3-android-old/pybuild/package.py", line 88, in run
    self.source.run_in_source_dir(cmd, *args, **kwargs)
  File "/home/pramukesh/Documents/python3-android-old/pybuild/source.py", line 52, in run_in_source_dir
    return run_in_dir(cmd, self.source_dir, env, mode)
  File "/home/pramukesh/Documents/python3-android-old/pybuild/util.py", line 65, in run_in_dir
    check_call(cmd, cwd=cwd, env=real_env)
  File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', 'install', 'DESTDIR=/home/pramukesh/Documents/python3-android-old/build/sysroot']' returned non-zero exit status 2.

i was using python3.8 if that matters

Thanks for the report. This is the same issue as #20, and you need to install ncurses 6.1.20190121 or newer on the building machine to correctly build this project. Alternatively, you can also remove 'ncurses' and 'readline' from pybuild/env.py if you don't need advanced features in command-line interfaces within Python.

i was using python3.8 if that matters

python3.9 will be better. There are some more details in https://github.com/yan12125/python3-android#prerequisites (Linux-specific, though).

How to Build Native Modules of Python like Gevent ?

i mean modules with c code

Unfortunately, currently there is no simple way. See #9 for previous discussions.