On Tue, Jan 21, 2014 at 09:53:03PM +0000, Enrique Larraia wrote:
> Hi all,
> 
> I'm experiencing the same issue as Louis Rine in this thread:
> 
> https://www.mail-archive.com/lfs-support@linuxfromscratch.org/msg21373.html
> 
> I'm unsure whether or not reply to the cited thread, or create one on my
> own. I apologize if this causes a duplication of the same topic :(
> 

 I think we are out of ideas on that thread, so either way will
suit :-(

> I got the following otuput error after make install of package
> libstdc++-4.8.1:
> 
>  make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/include'
> Making install in libsupc++
> make[1]: Entering directory `/mnt/lfs/sources/gcc-build/libsupc++'
> make[2]: Entering directory `/mnt/lfs/sources/gcc-build/libsupc++'
> test -z "/tools/lib" || /bin/mkdir -p "/tools/lib"
>  /bin/sh ../libtool   --mode=install /usr/bin/install -c   libsupc++.la
> '/tools/lib'
> libtool: install: /usr/bin/install -c .libs/libsupc++.lai
> /tools/lib/libsupc++.la
> libtool: install: /usr/bin/install -c .libs/libsupc++.a
> /tools/lib/libsupc++.a
> libtool: install: chmod 644 /tools/lib/libsupc++.a
> libtool: install: i686-lfs-linux-gnu-ranlib /tools/lib/libsupc++.a
> ../libtool: line 1132: i686-lfs-linux-gnu-ranlib: command not found

 From memory, Louis was using x86_64 so the problem appears to be
related to ubuntu-derived hosts, but on both architectures.

 What do 'ldd' and 'ls -l' report for
/tools/bin/i686-lfs-linux-gnu-ranlib ?  I'm expecting sensible
results (all libraries present, and file is executable), but
something unexpected is happening somewhere.

> make[2]: *** [install-toolexeclibLTLIBRARIES] Error 127
> make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/libsupc++'
> make[1]: *** [install-am] Error 2
> make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/libsupc++'
> make: *** [install-recursive] Error 1
> 
> 
> I've checked and  i686-lfs-linux-gnu-gcc-ranlib IS under /tools/bin. I'm
> building with host Ubuntu 12.04, I've checked the host requirements and are
> all OK (i think), in particular:
> -  /bin/sh points to bash not dash
> - /usr/bin/yacc -> /etc/alternatives/yacc -> /usr/bin/bison.yacc
>   with bison.yacc being the following simple script:
>    #! /bin/sh
>   exec '/usr/bin/bison' -y "$@"
> 
> .bashrc file of lfs user has $LFS variable well defined, /tools directory
> is a symlink to $LFS/tools and $PATH has first /tools/bin.
> 
 I think we were hoping that if Louis started again with /bin/sh
pointing to /bin/bash, it would fix it.  That seemed a plausible
hope, because the initial configure in the top level directory will
use its shell and it converts variables which may then be used by
configure scripts in other directories.  Dash is known to be less
powerful than bash and has often broken with constructs which work
fine in bash.  Oh well, something else must be involved.  <sigh/>

> In case you find it useful, I'm including the errors in the config.log
> after configure Libstdc++-4.8.1, located in $LFS/sources/gcc-build. Not
> sure what they mean or if they are related to the issue (yes, I untar'ed
> gcc package again to build libstdc++):
> 

 Just to confirm : you removed the original gcc-4.8.1 and gcc-build
directories before doing that ?

> lfs@tornasol:/mnt/lfs/sources/gcc-build$ cat config.log | grep -i error
> i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-V'
> i686-lfs-linux-gnu-gcc: fatal error: no input files
> i686-lfs-linux-gnu-gcc: error: unrecognized command line option '-qversion'
> i686-lfs-linux-gnu-gcc: fatal error: no input files
> i686-lfs-linux-gnu-g++: error: unrecognized command line option '-V'
> i686-lfs-linux-gnu-g++: fatal error: no input files
> i686-lfs-linux-gnu-g++: error: unrecognized command line option '-qversion'
> i686-lfs-linux-gnu-g++: fatal error: no input files
> conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
> conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
> collect2: error: ld returned 1 exit status
> | /* Override any GCC internal prototype to avoid an error.
> collect2: error: ld returned 1 exit status

 All these sorts of messages seem absolutely normal.  Configure
scripts are run by /bin/sh and most of them mainly do two things:

(i.) generate program fragments and try to compile them - this
determines if headers / libraries exist, or if certain things exist
in certain functions: that is what you see above, and is all part of
adapting the build to different systems (not just linux) or
different architectures

(ii.) they use pkg-config to find if a package exists, and how to
compile against it.

 And then, at the end of configure, they use the settings to alter
how Makefiles will be created.

> glibcxx_cv_system_error14=yes
> glibcxx_cv_system_error15=yes

 These sort of variables might be used in the creation of the
various Makefiles
> ERROR_CONSTANTS_SRCDIR='config/os/generic'
> WERROR=''
> #define HAVE_STRERROR_L 1
> #define HAVE_STRERROR_R 1
> 

 These sort of variables definitely get used in the creation of the
various Makefiles.

 Your error was
> libtool: install: chmod 644 /tools/lib/libsupc++.a
> libtool: install: i686-lfs-linux-gnu-ranlib /tools/lib/libsupc++.a
> ../libtool: line 1132: i686-lfs-linux-gnu-ranlib: command not
> found

 That appears to be using a libtool script.  I don't recall if it is
within the gcc-build directory, or the gcc-4.8.1 source - or even in
a subdirectory.  But I guess it is in the top level of gcc-build (if
I'm wrong you'll need to search for it), and perhaps created from a
file in the gcc source by using sed on variables.

 What is the first line of this libtool script ?  (I'm guessing it
will be something like #!/bin/sh or #!/bin/bash ?

 Can you paste the lines around line 1132 where it is invoking this
command ?  I'm not sure if the ranlib (i686-lfs-linux-gnu-ranlib) is
hard-coded in the libtool script [ i.e. something got processed by
the shell to create this libtool script ], or if it is using
variables.

ĸen
-- 
das eine Mal als Tragödie, dieses Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to