Discussion:
[lfs-support] expect5.45.4 compile error in lfs 8.2-systemd chapter 5.12
Clyde McKenney
2018-03-18 12:00:56 UTC
Permalink
Hello. My attempts to compile "expect5.45.4" in Chapter 5.12, LFS 8.2-systemd fail repeatedly with errors as shown below. Everything in the stable LFS 8.2-systemd book appears to compile smoothly, up to the point where expect5.45.4's configure is looking for a file "install-sh" in its $LFS/sources/expect5.45.4 directory. (An "install-sh" exists in the expect5.45.4/tclconfig subdirectory, but not in the expect5.45.4 directory.)  So far, I don't understand the configure procedure regarding this file (ie, how it's created, since it's not in the source tarball), so I'm stumped.  This prevents the build from creating the "expect" program required later on.



I am using a default install of Linux Mint 18.3 Cinnamon, linux kernel 4.13.0-37 on an Intel i5-2500 CPU @ 3.30GHz with 8Gb RAM and have a 100Gb ext4 partition set up for lfs. Version-check.sh reports all is well. While I try to learn the reason for failure, I will also try building lfs in a clean VirtualBox of another distro. I would appreciate any suggestions. 



configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting
config.status: executing default commands
chmod: cannot access './install-sh': No such file or directory
=== configuring in testsuite (/mnt/lfs/sources/expect5.45.4/testsuite)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tools' '--with-tcl=/tools/lib' '--with-tclinclude=/tools/include' --cache-file=/dev/null --srcdir=.
checking for correct TEA configuration... ok (TEA 3.9)


et cetera....then at the end:

gcc \
     -pipe -O2 -fomit-frame-pointer -Wall -fPIC  \
     -Wl,--export-dynamic  \
    -o expect exp_main_exp.o \
    -L/mnt/lfs/sources/expect5.45.4 -lexpect5.45.4 \
    -L/tools/lib -ltcl8.6 \
    -ldl  -lm \
    -Wl,-rpath,/tools/lib \
    -Wl,-rpath,/tools/lib/expect5.45.4
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libutil.so.1, needed by /mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so, not found (try using -rpath or -rpath-link)
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /tools/lib/libtcl8.6.so, not found (try using -rpath or -rpath-link)
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
Makefile:391: recipe for target 'expect' failed
make: *** [expect] Error 1
gcc \
     -pipe -O2 -fomit-frame-pointer -Wall -fPIC  \
     -Wl,--export-dynamic  \
    -o expect exp_main_exp.o \
    -L/mnt/lfs/sources/expect5.45.4 -lexpect5.45.4 \
    -L/tools/lib -ltcl8.6 \
    -ldl  -lm \
    -Wl,-rpath,/tools/lib \
    -Wl,-rpath,/tools/lib/expect5.45.4
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libutil.so.1, needed by /mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so, not found (try using -rpath or -rpath-link)
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /tools/lib/libtcl8.6.so, not found (try using -rpath or -rpath-link)
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
/tools/lib/libtcl8.6.so: undefined reference to `***@GLIBC_2.2.5'
collect2: error: ld returned 1 exit status
Makefile:391: recipe for target 'expect' failed
make: *** [expect] Error 1
Ken Moffat
2018-03-18 12:49:58 UTC
Permalink
Hello. My attempts to compile "expect5.45.4" in Chapter 5.12, LFS 8.2-systemd fail repeatedly with errors as shown below. Everything in the stable LFS 8.2-systemd book appears to compile smoothly, up to the point where expect5.45.4's configure is looking for a file "install-sh" in its $LFS/sources/expect5.45.4 directory. (An "install-sh" exists in the expect5.45.4/tclconfig subdirectory, but not in the expect5.45.4 directory.)  So far, I don't understand the configure procedure regarding this file (ie, how it's created, since it's not in the source tarball), so I'm stumped.  This prevents the build from creating the "expect" program required later on.
Hi Clyde,

from the information you have posted, you have misinterpreted the
problem. An install-sh file can be referenced in many packages (I
think its use is part of the autotools system (autoconf, automake,
libtool).
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting
config.status: executing default commands
chmod: cannot access './install-sh': No such file or directory
That is not fatal.
=== configuring in testsuite (/mnt/lfs/sources/expect5.45.4/testsuite)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tools' '--with-tcl=/tools/lib' '--with-tclinclude=/tools/include' --cache-file=/dev/null --srcdir=.
checking for correct TEA configuration... ok (TEA 3.9)
gcc \
     -pipe -O2 -fomit-frame-pointer -Wall -fPIC  \
     -Wl,--export-dynamic  \
    -o expect exp_main_exp.o \
    -L/mnt/lfs/sources/expect5.45.4 -lexpect5.45.4 \
    -L/tools/lib -ltcl8.6 \
    -ldl  -lm \
    -Wl,-rpath,/tools/lib \
    -Wl,-rpath,/tools/lib/expect5.45.4
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libutil.so.1, needed by /mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so, not found (try using -rpath or -rpath-link)
/mnt/lfs/tools/bin/../lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libpthread.so.0, needed by /tools/lib/libtcl8.6.so, not found (try using -rpath or -rpath-link)
These are the errors which *are* fatal. I'll comment on the first
two, but basically after one error for a missing library all bets
are off.

The first missing file is /tools/lib/libutil.so.1 - that should have
been installed by glibc.

The second is /tools/lib/libpthread.so.0 which should also have been
installed by glibc.
OK, I'll comment on this one too, since it is almost certainly
defined in libpthread.so.

Do you have those two files ? The version .so.X* should be symbolic
links to .so files : if you have them, does file report they are
broken (i.e. pointing to something which does not exist) ?

ĸen
--
Truth, in front of her huge walk-in wardrobe, selected black leather
boots with stiletto heels for such a barefaced truth.
- Unseen Academicals
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-ma
Pierre Labastie
2018-03-18 13:22:40 UTC
Permalink
Post by Clyde McKenney
Hello. My attempts to compile "expect5.45.4" in Chapter 5.12, LFS 8.2-systemd
fail repeatedly with errors as shown below. Everything in the stable LFS
8.2-systemd book appears to compile smoothly, up to the point where
expect5.45.4's configure is looking for a file "install-sh" in its
$LFS/sources/expect5.45.4 directory. (An "install-sh" exists in the
expect5.45.4/tclconfig subdirectory, but not in the expect5.45.4 directory.) 
So far, I don't understand the configure procedure regarding this file (ie,
how it's created, since it's not in the source tarball), so I'm stumped.  This
prevents the build from creating the "expect" program required later on.
That's not a problem with install-sh, see below...
Post by Clyde McKenney
[...]
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING: 'Makefile.in' seems to ignore the --datarootdir setting
config.status: executing default commands
chmod: cannot access './install-sh': No such file or directory
I have that in my logs, too, and the build succeeded, so I do not think it is
related to failure you see later.
Post by Clyde McKenney
=== configuring in testsuite (/mnt/lfs/sources/expect5.45.4/testsuite)
configure: running /bin/sh ./configure --disable-option-checking
'--prefix=/tools' '--with-tcl=/tools/lib' '--with-tclinclude=/tools/include'
--cache-file=/dev/null --srcdir=.
checking for correct TEA configuration... ok (TEA 3.9)
gcc \
     -pipe -O2 -fomit-frame-pointer -Wall -fPIC  \
     -Wl,--export-dynamic  \
    -o expect exp_main_exp.o \
    -L/mnt/lfs/sources/expect5.45.4 -lexpect5.45.4 \
    -L/tools/lib -ltcl8.6 \
    -ldl  -lm \
    -Wl,-rpath,/tools/lib \
    -Wl,-rpath,/tools/lib/expect5.45.4
warning: libutil.so.1, needed by
/mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so, not found (try using -rpath
or -rpath-link)
libutil.so.1 (a library installed by glibc) is not found.
Post by Clyde McKenney
warning: libpthread.so.0, needed by /tools/lib/libtcl8.6.so, not found (try
using -rpath or -rpath-link)
libpthread.so.0 (a library installed by glibc too) is not found either.
Post by Clyde McKenney
/mnt/lfs/sources/expect5.45.4/libexpect5.45.4.so: undefined reference to
/tools/lib/libtcl8.6.so: undefined reference to
The linker does not find the above references. That's what prevents expect to
be successfully generated. All those references are defined in the above, not
found, libraries... The question is now: why arent those libraries found...

First: check that they exist in /tools/lib. If they don't, something is wrong
with the installation of glibc. You'd better start afresh.

Second: if they exist there, double check that the lfs partition is mounted,
and that the lfs user environment is correctly set.

Third: well, if all the above is OK, there's nothing obvious. You may want to
run the gcc command adding the -v and -Wl,-verbose switches, to see where the
compiler is looking for libraries.
Post by Clyde McKenney
collect2: error: ld returned 1 exit status
Makefile:391: recipe for target 'expect' failed
make: *** [expect] Error 1
[...]
HTH

Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posti
Loading...