Jump to content
  • 0
Sign in to follow this  
dougbmorris

Can you explain x86_64-pc-linux-gnu-gcc -v versus -V in my log files?

Question

Hello,

I am trying to do the 'System resurrection'. I can chroot and do 'quickpkg --include-config y @system'. I exit the chroot, copy over the cache, and try to emerge -k to get a working toolchain, which is why I can't update my system. This command did not fix the compiler functionality: emerge -avk1 @system

So I tried piecemeal with gcc, binutils, and glibc.  I ran 'emerge -avk1 gcc' and got good results until end of output:

Locke ~ # emerge -avk1 gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[binary   R    ] sys-devel/gcc-5.4.0:5.4.0::core-kit  USE="cxx fortran (multilib) nls openmp -ada (-altivec) -doc -graphite (-hardened) (-libssp) -objc -objc++ (-sanitize) -vanilla" 0 KiB

Total: 1 package (1 reinstall, 1 binary), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]

###...[SKIPPING OUTPUT LINES]...###

--- replaced obj /etc/env.d/gcc/x86_64-pc-linux-gnu-5.4.0
--- replaced dir /etc/env.d/gcc
--- replaced dir /etc/env.d
--- replaced dir /etc
>>> Regenerating /etc/ld.so.cache...
>>> Original instance of package unmerged safely.
 * This does not appear to be a regular upgrade of gcc, so
 * gcc 5.4.0 will not be automatically enabled as the
 * default system compiler.

 * If you would like to make 5.4.0 the default system
 * compiler, then perform the following steps as root:

 * gcc-config x86_64-pc-linux-gnu-5.4.0
 * source /etc/profile

>>> sys-devel/gcc-5.4.0 merged.
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * Regenerating GNU info directory index...
 * Processed 9 info files.

!!! existing preserved libs:
>>> package: xfce-base/libxfce4ui-4.13.3
 *  - /usr/lib64/libxfce4ui-2.so.0
 *  - /usr/lib64/libxfce4ui-2.so.0.0.0
 *      used by /usr/bin/exo-desktop-item-edit (xfce-base/exo-0.11.5)
 *      used by /usr/lib64/libgarcon-gtk3-1.so.0.0.0 (xfce-base/garcon-0.6.1)
 *      used by /usr/lib64/xfce4/exo-1/exo-helper-1 (xfce-base/exo-0.11.5)
 *  - /usr/lib64/libxfce4ui-1.so.0
 *  - /usr/lib64/libxfce4ui-1.so.0.0.0
 *      used by /usr/lib64/libgarcon-gtk2-1.so.0.0.0 (xfce-base/garcon-0.6.1)
Use emerge @preserved-rebuild to rebuild packages using these libraries
Locke ~ #
Locke ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-5.4.0 *
Locke ~ #
Locke ~ # # ^ I think already there because I am repeating steps to demonstrate what happened.
Locke ~ #
Locke ~ # gcc-config x86_64-pc-linux-gnu-5.4.0
 * Switching native-compiler to x86_64-pc-linux-gnu-5.4.0 ...                                                                                           [ ok ]
Locke ~ # gcc-config -l
 [1] x86_64-pc-linux-gnu-5.4.0 *

I ran ' emerge @preserved-rebuild' and got an error that was logged by file /var/tmp/portage/xfce-base/xfconf-4.13.4/work/xfconf-4.13.4/config.log.

I ran 'emerge -avk1 binutils' and got an error that was logged by file /var/tmp/portage/sys-devel/binutils-2.29.1-r1/work/build/config.log.

The interesting parts are similar. Please notice (below after this paragraph) that there are two lines in each log file that are exactly the same except the change from -v to -V. I don't know if that is normal log output or not. Also note the call in each log file to: ../gcc-5.4.0/configure, which turns out to be a /bin/sh script per the shebang line.  The second line of script configure describes the script's purpose as: Guess values for system-dependent variables and create Makefiles.  Third line says: Generated by GNU Autoconf 2.64.

Similar part of .../xfconf-4.13.4/config.log:

configure:3770: $? = 0
configure:3759: x86_64-pc-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-5.4.0/configure --disable-libssp --enable-multilib --enable-version-specific-runtime-libs --enable-libmudflap --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5.4.0 --enable-libstdcxx-time --enable-__cxa_atexit --enable-clocale=gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-lto --without-cloog --with-bugurl=http://bugs.funtoo.org --with-pkgversion='Funtoo 5.4.0' --with-mpfr-include=/var/tmp/portage/sys-devel/gcc-5.4.0/work/gcc-5.4.0/mpfr/src --with-mpfr-lib=/var/tmp/portage/sys-devel/gcc-5.4.0/work/objdir/mpfr/src/.libs --enable-libgomp --build=x86_64-pc-linux-gnu --enable-libgomp --enable-languages=c,c++,fortran --disable-libgcj --disable-esp --disable-libsanitizer
Thread model: posix
gcc version 5.4.0 (Funtoo 5.4.0)
configure:3770: $? = 0
configure:3759: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.

Similar part of .../binutils-2.29.1-r1/work/build/config.log:

configure:4290: $? = 0
configure:4279: x86_64-pc-linux-gnu-gcc -v >&5
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-5.4.0/configure --disable-libssp --enable-multilib --enable-version-specific-runtime-libs --enable-libmudflap --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5.4.0 --enable-libstdcxx-time --enable-__cxa_atexit --enable-clocale=gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-lto --without-cloog --with-bugurl=http://bugs.funtoo.org --with-pkgversion='Funtoo 5.4.0' --with-mpfr-include=/var/tmp/portage/sys-devel/gcc-5.4.0/work/gcc-5.4.0/mpfr/src --with-mpfr-lib=/var/tmp/portage/sys-devel/gcc-5.4.0/work/objdir/mpfr/src/.libs --enable-libgomp --build=x86_64-pc-linux-gnu --enable-libgomp --enable-languages=c,c++,fortran --disable-libgcj --disable-esp --disable-libsanitizer
Thread model: posix
gcc version 5.4.0 (Funtoo 5.4.0)
configure:4290: $? = 0
configure:4279: x86_64-pc-linux-gnu-gcc -V >&5
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-V'
x86_64-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.

I notice that each call to ../gcc-5.4.0 has the option --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5.4.0 and I wonder, but doubt, the part that is 'g++-v5.4.0' would be interpreted as the end of the value with option --with-gxx-include-dir and the start of a -v option with value 5.4.0.

Thanks for reading.

config-binutils-2.29.1.log

config-xfconf-4.13.4.log

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I would use —usepkgonly or -K instead of —usepkg or -k to emerge libtool and binutils from packages you built.  Then try binutils-config -l to list and set it again with binutils-config 2 or whatever.  I’m still thinking this is a binutils problem breaking compiler/toolchain links.

Share this post


Link to post
Share on other sites
  • 0
12 hours ago, dougbmorris said:

I tried piecemeal with gcc, binutils, and glibc.  I ran 'emerge -avk1 gcc' and got good results until end of output:

Locke ~ # emerge -avk1 gcc

why don't you finish rebuilding the toolchain and start emerging @preserved-rebuild in the middle of the procedure?

Please run:

# Fixing GCC
emerge -avk1 gcc
gcc-config -l
(output of compiler profiles use the reinstalled version in the next command)
gcc-config --force x86_64-pc-linux-gnu-5.4.0
. /etc/profile

# Fixing binutils
emerge -avk1 binutils
binutils-config -l
(output of binutils profiles again use the one reinstalled from binary)
binutils-config x86_64-pc-linux-gnu-2.29.1

# Fixing glibc
emerge -avk1 glibc

now I would probably run

emerge -ave @system

after this is complete (and you didn't upgrade gcc version - so gcc-5 was also before system failure your default compiler) you can now take care of anything else that needs fixing on your box. running emerge -avuDN --with-bdeps=y @world and then if needed emerge -av @preserved-rebuild

If you also upgraded from a different major version of gcc, then you need to run (before @world and @preserved-rebuild)

revdep-rebuild --library 'libstdc++.so' -- --exclude gcc

Let us know how it went.

Share this post


Link to post
Share on other sites
  • 0

I appreciate the advice. I will continue to experiment. Doing the emerge @preserved-rebuild at that point was a variation. I don't know order like I know idiot instructions. I will experiment with -K, revdep-rebuild (I forgot about that one), and giving SSH with privileged access to box to figure things out is not something I understand, but maybe I will stumble onto what it means.

I asked a very narrow question, and perhaps you already know the question is irrelevant. I don't understand why it's irrelevant.  Both of my log files start with:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

If I run options -v and -V, I get output that fits the log files.

Locke / # gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-5.4.0/configure --disable-libssp --enable-multilib --enable-version-specific-runtime-libs --enable-libmudflap --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5.4.0 --enable-libstdcxx-time --enable-__cxa_atexit --enable-clocale=gnu --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-lto --without-cloog --with-bugurl=http://bugs.funtoo.org --with-pkgversion='Funtoo 5.4.0' --with-mpfr-include=/var/tmp/portage/sys-devel/gcc-5.4.0/work/gcc-5.4.0/mpfr/src --with-mpfr-lib=/var/tmp/portage/sys-devel/gcc-5.4.0/work/objdir/mpfr/src/.libs --enable-libgomp --build=x86_64-pc-linux-gnu --enable-libgomp --enable-languages=c,c++,fortran --disable-libgcj --disable-esp --disable-libsanitizer
Thread model: posix
gcc version 5.4.0 (Funtoo 5.4.0)
Locke / # gcc -V
gcc: error: unrecognized command line option ‘-V’
gcc: fatal error: no input files
compilation terminated.
Locke / #

My title question remains, if only for my personal edification. Why would the flag -v be rerun as uppercase -V? Is the gcc command in fact being rerun? If so, kinda weird. The only double I can think of is the 2 graphics chips I have on this Sony Vaio Series S box. I'm using the Sandy Bridge variant. Of course I will keep experimenting.

-------------------

I emerged gcc againbut with -K, did the source /etc/profile, and emerged binutils  with -K. No problems with binutils. Not sure why. Then I tried emerge -K glibc. Good call on the -K because I did not have a glibc binary. So I chroot-ed and got binaries for glibc and linux-headers (because I wanted to after I look at what the 'toolchain' is). I was able to emerge -K the glibc binary no problem. Next I try to update my @world with all the dependency trimmings and get: there are no ebuilds to satisfy ">=dev-libs/nss-3.34.1" Did ego sync, epro update, source /etc/profile, env-update, and retried emerge @world. This time I got something I got at the beginning of this journey:

...[skipped lines]...
[ebuild     U  ] gnome-base/gvfs-1.28.3-r2 [1.28.3-r1]
[ebuild     U  ] virtual/service-manager-1 [0]
[blocks B      ] dev-util/pkgconfig ("dev-util/pkgconfig" is blocking dev-util/pkgconf-1.2.2)
[blocks B      ] dev-util/pkgconf[pkg-config] ("dev-util/pkgconf[pkg-config]" is blocking dev-util/pkgconfig-0.29.2)

It's the same issue all over again. I might be able to compile a new kernel. Thanks everyone for the help. If you got an edifying answer for -V, I'd love to hear it. Otherwise, over and out. I know you got better things to do.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...