Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terminfo/a/ansi': No such file or directory #3

Open
chrsoo opened this issue Feb 2, 2023 · 4 comments
Open

terminfo/a/ansi': No such file or directory #3

chrsoo opened this issue Feb 2, 2023 · 4 comments

Comments

@chrsoo
Copy link

chrsoo commented Feb 2, 2023

When building the project using a docker image, the build fails with the following error:

# make V=1
...
/usr/bin/install -c ncurses-config /src/buildroot/output/target/usr/bin/ncurses6-config
installing ncurses.pc
installing ncurses.pc
installing panel.pc
installing menu.pc
installing form.pc
make[2]: Leaving directory '/src/buildroot/output/build/ncurses-6.1/misc'
make[1]: Leaving directory '/src/buildroot/output/build/ncurses-6.1'
rm -f -rf /src/buildroot/output/target/usr/share/terminfo /src/buildroot/output/target/usr/share/tabset
/usr/bin/install -D -m 0644 /src/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/share/terminfo/a/ansi /src/buildroot/output/target/usr/share/terminfo/a/ansi
/usr/bin/install: cannot stat '/src/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/share/terminfo/a/ansi': No such file or directory
make: *** [package/pkg-generic.mk:387: /src/buildroot/output/build/ncurses-6.1/.stamp_target_installed] Error 1

Any idea on how to fix the build?

If I can make this work, I will create a PR with the Dockerfile and instructions on how to build the project on MacOS running on Apple Silicon.

Steps to Reproduce

  1. Add the following Dockerfile to the project root directory:
FROM ubuntu:latest

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential file wget cpio rsync bc subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev \
    xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip libncurses-dev u-boot-tools \
    lib32z1 lib32z1-dev lib32stdc++6 libstdc++6 && \
    rm -rf /var/lib/apt/lists/*
  1. Create the turing-pi-build image locally:
docker build --platform linux/amd64 -t turing-pi-build .
  1. Run the turing-pi-build image interactively:
docker run -it --rm --name turing-pi --platform linux/amd64 \
--mount type=bind,source=${PWD},target=/src turing-pi-build bash
  1. Change into the /src directory:
cd /src
  1. Follow the build instructions in readme.md

Additional Notes

The following apt packages are missing in the readme.md:

file wget cpio rsync bc
@0xE282B0
Copy link

0xE282B0 commented May 2, 2023

Same here, created a Dockerfile from ubuntu:22.04 (amd64) to build the firmware on Mac.

make[2]: Leaving directory '/data/buildroot/output/build/ncurses-6.1/misc'
make[1]: Leaving directory '/data/buildroot/output/build/ncurses-6.1'
rm -f -rf /data/buildroot/output/target/usr/share/terminfo /data/buildroot/output/target/usr/share/tabset
/usr/bin/install -D -m 0644 /data/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/share/terminfo/a/ansi /data/buildroot/output/target/usr/share/terminfo/a/ansi
/usr/bin/install: cannot stat '/data/buildroot/output/host/arm-buildroot-linux-gnueabi/sysroot/usr/share/terminfo/a/ansi': No such file or directory
make: *** [package/pkg-generic.mk:387: /data/buildroot/output/build/ncurses-6.1/.stamp_target_installed] Error 1

@0xE282B0
Copy link

0xE282B0 commented May 2, 2023

In the ncurses.mk is a list of terminfo files, however the filesystem looks different for me:

expected:

        a/ansi \
        d/dumb \
        l/linux \
        ...

existing path:

        61/ansi \
        64/dumb \
        6c/linux \
        ...

The folder names are not letters like a but the hex representation 61.

@chrsoo I just replaced the folder names to continue: ncurses.mk.patch

@serpent213
Copy link

Same using BuildRoot within https://github.com/nerves-project/nerves_system_br within a VSCode DevContainer. Used your patch as a quick fix.

@CodeInPolish
Copy link

CodeInPolish commented Jan 6, 2025

I stumbled upon this error too and that's because, by default, MacOS uses case-insensitive file system.
ncurses detects that and uses hexadecimal representation instead of the usual (https://github.com/mirror/ncurses/blob/87c2c84cbd2332d6d94b12a1dcaf12ad1a51a938/progs/infocmp.c#L1812).
So we have two choices:

  • reformat/reinstall the whole OS and use case-sensitive FS or patch the makefile.
  • add a case-sensitivity test inside of the buildroot's makefile for ncurses and adapt the terminfo files to install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants