Le 27/01/2014 21:17, LFS Trac a écrit :
> #3482: util-linux ignores prefix to install bash completions
> ---------------------+-------------------------
> Reporter: shibata | Owner: lfs-book@…
> Type: defect | Status: new
> Priority: high | Milestone: 7.5
> Component: Book | Version: SVN
> Severity: normal | Resolution:
> Keywords: |
> ---------------------+-------------------------
>
> Comment (by shibata):
>
> From ./configure, line 22803:
>
> {{{
> # Check whether --with-bashcompletiondir was given.
> if test "${with_bashcompletiondir+set}" = set; then :
> withval=$with_bashcompletiondir;
> else
> if `$PKG_CONFIG --exists bash-completion`; then :
>
> with_bashcompletiondir=`$PKG_CONFIG --variable=completionsdir bash-
> completion`
>
> else
>
> with_bashcompletiondir=${datadir}/bash-completion/completions
>
> fi
>
> fi
>
> bashcompletiondir=$with_bashcompletiondir
>
> }}}
>
> My pkg-config has bash-completion, so the path is taken from host's pkg-
> config. Using --with-bashcompletiondir=DIR explicitly sets the path.
>
OK,
I just found another issue with util-linux, which I think is related. The
error is:
[...]
CCLD libmount.la
CC text-utils/more-more.o
CCLD more
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../x86_64-unknown-linux-gnu/bin/ld:
cannot find -ltinfo
collect2: error: ld returned 1 exit status
Makefile:5603: recipe for target 'more' failed
make[3]: *** [more] Error 1
make[3]: Leaving directory '/mnt/lfs/sources/util-linux-2.24.1'
Short story: go to conclusion.
Long story: the issue comes from (configure's log):
checking for TINFO... yes
while libtinfo is not in /tools/lib.
Now config.log has:
configure:18288: checking for TINFO
configure:18295: $PKG_CONFIG --exists --print-errors "tinfo"
configure:18298: $? = 0
configure:18312: $PKG_CONFIG --exists --print-errors "tinfo"
configure:18315: $? = 0
So it appears that configure calls $PKG_CONFIG.
Actually, above in config.log:
configure:13932: checking for pkg-config
configure:13950: found /usr/bin/pkg-config
configure:13962: result: /usr/bin/pkg-config
configure:13987: checking pkg-config is at least version 0.9.0
configure:13990: result: yes
So if pkg-config is on the host, configure uses it, and the
default PATH is /lib:/usr/lib, where it finds whatever is on the
host and not necessary in /tools.
To disable the use of pkg-config altogether, I found
that it is enough to add "PKG_CONFIG=" to the configure
invocation. Then configure does not use it, and ends up with:
checking for TINFO... no
and
Bash completions: ${datarootdir}/bash-completion/completions
Conclusion: use:
./configure --prefix=/tools \
--disable-makeinstall-chown \
--without-systemdsystemunitdir \
PKG_CONFIG=
or
./configure --prefix=/tools \
--disable-makeinstall-chown \
--without-systemdsystemunitdir \
PKG_CONFIG_LIBDIR=/tools/lib
Regards,
Pierre
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page