conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
921 stars 1.66k forks source link

[package] <readline>/<8.2>: Need to disable examples in build #24321

Closed paigeadelethompson closed 2 weeks ago

paigeadelethompson commented 3 weeks ago

Description

Readline's make refers to an example source file that doesn't exist:

--- install ---
install: /opt/me/home/.conan2/p/b/readla0dd35098c4a2/b/src/examples/rltest2.c: No such file or directory
*** [install] Error code 71

make[1]: stopped in /opt/me/home/.conan2/p/b/readla0dd35098c4a2/b/build-release/examples
1 error

make[1]: stopped in /opt/me/home/.conan2/p/b/readla0dd35098c4a2/b/build-release/examples
--- install-pc ---
/usr/bin/install -c -m 644 /opt/me/home/.conan2/p/b/readla0dd35098c4a2/b/build-release/history.pc /opt/me/home/.conan2/p/b/readla0dd35098c4a2/p//lib/pkgconfig/history.pc

ERROR: readline/8.2: Error in package() method, line 91
    autotools.install()
    ConanException: Error 6 while executing

from: https://git.savannah.gnu.org/git/readline.git

git checkout readline-8.2
M   configure
Note: switching to 'readline-8.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at f7a382f readline-8.2 distribution sources and documentation
[me@me ~/readline]$ grep -r "rltest2.c"
./examples/Makefile.in:     rltest2.c rl-callbacktest.c hist_erasedups.c hist_purgecmd.c \
./examples/Makefile.in:rltest2.o: rltest2.c
./examples/Makefile:        rltest2.c rl-callbacktest.c hist_erasedups.c hist_purgecmd.c \
./examples/Makefile:rltest2.o: rltest2.c
[me@me ~/readline]$ find . -name "rltest2.c"
[me@me ~/readline]$ 

there's an option for disabling examples:

 ./configure --help 2>&1 | grep examples
  --disable-install-examples
                          don't install examples [[default=install]]

Maybe add that to the conanfile.py:

https://github.com/conan-io/conan-center-index/blob/master/recipes/readline/all/conanfile.py#L67

Can confirm this build error is consistent in building from source.

install: ./rltest2.c: No such file or directory
*** Error code 71

Stop.
make[1]: stopped in /opt/me/home/readline/examples
*** Error code 1 (ignored)
/usr/bin/install -c -m 644 /opt/me/home/readline/readline.pc /usr/local/lib/pkgconfig/readline.pc
/usr/bin/install -c -m 644 /opt/me/home/readline/history.pc /usr/local/lib/pkgconfig/history.pc
mv /usr/local/lib/libreadline.a /usr/local/lib/libreadline.old
/usr/bin/install -c -m 644 libreadline.a /usr/local/lib/libreadline.a
test -n "ranlib" && ranlib /usr/local/lib/libreadline.a
mv /usr/local/lib/libhistory.a /usr/local/lib/libhistory.old
/usr/bin/install -c -m 644 libhistory.a /usr/local/lib/libhistory.a
test -n "ranlib" && ranlib /usr/local/lib/libhistory.a
test -d shlib || mkdir shlib
( cd shlib ; make   all )
( cd shlib ; make   DESTDIR= install )
/bin/sh ../support/mkdirs /usr/local/lib
/bin/sh ../support/mkdirs /usr/local/bin
/bin/sh ../support/shlib-install -O freebsd14.0 -V unknown -d /usr/local/lib -b /usr/local/bin -i "/usr/bin/install -c -m 644" libhistory.so.8.2
/bin/sh ../support/shlib-install -O freebsd14.0 -V unknown -d /usr/local/lib -b /usr/local/bin -i "/usr/bin/install -c -m 644" libreadline.so.8.2
install: you may need to run ldconfig

Can't find a maintainer on github to tag. This is an old library but doesn't look like they migrated the SVN history and Chet's the only person who's made any commits for it

commit f7a382fd09319b20ef4435b9b554183b605468c1 (HEAD, tag: readline-8.2)
Author: Chet Ramey <chet.ramey@case.edu>
Date:   Mon Sep 26 11:53:27 2022 -0400

    readline-8.2 distribution sources and documentation

Package and Environment Details

Conan profile

Host profile: [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=16 os=FreeBSD

Build profile: [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=gnu17 compiler.libcxx=libc++ compiler.version=16 os=FreeBSD

Steps to reproduce

see desc.

Logs

see desc.

paigeadelethompson commented 3 weeks ago

Sent a PR but someone else will have to re-submit which is fine, I'm able to with conan export locally for now