Bug 2135400

Summary: Removal of ncurses-compat-libs in Fedora 37 breaks Android builds
Product: [Fedora] Fedora Reporter: Johannes Penßel <johannesp>
Component: ncursesAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-10-17 14:15:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johannes Penßel 2022-10-17 14:03:07 UTC
Description of problem:
To build AOSP Android from source, the library libncurses.so.5 is required. This even applies to Android 13. Due to Fedora dropping the ncurses-libs-compat package for the 37 release, building AOSP has been rendered impossible.
See official AOSP documentation for reference:
https://source.android.com/docs/setup/start/initializing

Version-Release number of selected component (if applicable):
>=6.3-1.20220416

How reproducible:
always

Steps to Reproduce:
1. set up an Android build environment on Fedora 37
2. launch the build for any target

Actual results:
A few minutes in, build fails due to missing libncurses.so.5

Expected results:
With ncurses-libs-compat installed, the build should succeed

Additional info:
At the moment, the only way to successfully compile Android from source on Fedora 37 is to use a toolbox based on F36. This is obviously not a long-term solution. Please consider readding the ncurses-libs-compat package, thanks.

Comment 1 Miroslav Lichvar 2022-10-17 14:15:16 UTC

*** This bug has been marked as a duplicate of bug 2129865 ***

Comment 2 Miroslav Lichvar 2022-10-17 14:44:59 UTC
Do you know which tool from the Android build system depends on ncurses? If you run "readelf -sW $PROG | grep UND" on it, what symbols do you see? If they were all symbols from libtinfo.5, it might be sufficient to provide a symlink to libinfo.so.6.

Comment 3 Johannes Penßel 2022-10-18 09:06:54 UTC
ldd shows that Google's custom prebuilt LLVM toolchain links against libncurses.so.5 and libtinfo.so.5. Looking at the output of the command you suggested, it indeed looks like only symbols from libtinfo.so.5 are needed. After symlinking libncurses.so.5 -> libncurses.so.6 and libtinfo.so.5 -> libtinfo.so.6, the build process works flawlessly again. Sorry for the unnecessary bug report and thank you for your help!

Comment 4 Miroslav Lichvar 2022-10-18 09:16:13 UTC
Thanks. This could be useful information for others. The document you linked to needs to be updated for more recent systems.