after updates configure can't find devtoolset gcc
After allowing updates on centos 6.5, hp printer no longer works.
The hplip configure returns the following: [root@q hplip-3.14.10]# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether the C++ compiler works... no configure: error: in `/downloads/hplip-3.14.10': configure: error: C++ compiler cannot create executables See `config.log' for more details [root@q hplip-3.14.10]# vim config.log [root@q hplip-3.14.10]# cat config.log This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by HP Linux Imaging and Printing configure 3.14.10, which was generated by GNU Autoconf 2.68. Invocation command line was $ ./configure ## --------- ## ## Platform. ## ## --------- ## hostname = q uname -m = x86_64 uname -r = 2.6.32-504.3.3.el6.x86_64 uname -s = Linux uname -v = #1 SMP Wed Dec 17 01:55:02 UTC 2014 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = x86_64 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/lib64/qt-3.3/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /sbin PATH: /bin PATH: /usr/sbin PATH: /usr/bin PATH: ~ PATH: . PATH: /root/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:2633: checking for a BSD-compatible install configure:2701: result: /usr/bin/install -c configure:2712: checking whether build environment is sane configure:2762: result: yes configure:2903: checking for a thread-safe mkdir -p configure:2942: result: /bin/mkdir -p configure:2955: checking for gawk configure:2971: found /bin/gawk configure:2982: result: gawk configure:2993: checking whether make sets $(MAKE) configure:3015: result: yes configure:3240: checking for C++ compiler version configure:3250: /opt/centos/devtoolset-1.1/root/usr/bin/c++ --version >&5 c++ (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:3261: $? = 0 configure:3250: /opt/centos/devtoolset-1.1/root/usr/bin/c++ -v >&5 Using built-in specs. COLLECT_GCC=/opt/centos/devtoolset-1.1/root/usr/bin/c++ COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/opt/rh/devtoolset-1.1/root/usr --mandir=/opt/rh/devtoolset-1.1/root/usr/share/man --infodir=/opt/rh/devtoolset-1.1/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-ppl --with-cloog --with-mpc=/builddir/build/BUILD/gcc-4.7.2-20121015/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.7.2 20121015 (Red Hat 4.7.2-5) (GCC) configure:3261: $? = 0 configure:3250: /opt/centos/devtoolset-1.1/root/usr/bin/c++ -qversion >&5 c++: error: unrecognized command line option '-qversion' c++: fatal error: no input files compilation terminated. Other pkgs will not install either .. alpine, wireless device drivers, usb ethernet drivers and others. All get the same errors. devtoolset used to be from scientific linux, but now it has been replaced by rh devtoolset and the path /opt/centos is now a link. [lex@q ~]$ ls -la /opt/centos lrwxrwxrwx 1 root root 7 Jan 8 21:21 /opt/centos -> /opt/rh At other times I got a different error .. unrecognized command line option -V -V is not a valid gcc option either. I tried this on 3 different machines, all of which had working hp printers, and now printing is broken on all 3. All after running updates. All are at centos 6.5 level. I think if I could get the scientific devtoolset back, it might work, but installing the sl devtoolset does not install it; it says devtoolset is already installed. But it is redhat devtoolset, and that doesn't seem to work. I tried devtoolset-1.1 and devtoolset-2.x (the latest one). None of them work. I have been looking at this for 3 weeks and no printer works. Any ideas? Lex Woodrum |
Why use a home made `hplip´ ?
And why use the devtoolset-1.1 gcc / g++ -4.7.2 ? The default gcc-4.4.7 might be used ? ( # yum install gcc-c++ ). How to refresh the `devtoolset-1.1-gcc-c++´ : # yum reinstall devtoolset-1.1-gcc-c++ Package list http://linuxsoft.cern.ch/cern/devtoo...X/x86_64/RPMS/ ( You may need other reinstalls ? ) - |
Yes, I did that. I also did the same for other levels of gcc. Same error.
I had to use --nogpgcheck. yum --nogpgcheck reinstall devtoolset-1.1-gcc-c++ Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Reinstall Process Loading mirror speeds from cached hostfile * base: mirror.symnds.com * elrepo: ftp.osuosl.org * extras: mirrors.advancedhosters.com * rpmforge: mirror.nexcess.net * updates: mirror.net.cen.ct.gov Resolving Dependencies --> Running transaction check ---> Package devtoolset-1.1-gcc-c++.x86_64 0:4.7.2-5.el6 will be reinstalled --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Reinstalling: devtoolset-1.1-gcc-c++ x86_64 4.7.2-5.el6 slc6-devtoolset 6.1 M Transaction Summary ================================================================================ Reinstall 1 Package(s) Total size: 6.1 M Installed size: 15 M Is this ok [y/N]: y Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64 1/1 Verifying : devtoolset-1.1-gcc-c++-4.7.2-5.el6.x86_64 1/1 Installed: devtoolset-1.1-gcc-c++.x86_64 0:4.7.2-5.el6 Complete! [root@q hplip-3.14.10]# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether the C++ compiler works... no configure: error: in `/downloads/hplip-3.14.10': configure: error: C++ compiler cannot create executables See `config.log' for more details [root@q hplip-3.14.10]# This is not a home made hplip. I got it from the hp web site. Before the disastrous updates, it worked perfectly. |
I tried reinstalling devtoolset-1.1.
Now I get a different error. configure:3261: $? = 127 configure:3250: /opt/centos/devtoolset-1.1/root/usr/bin/c++ -v >&5 ./configure: line 3252: /opt/centos/devtoolset-1.1/root/usr/bin/c++: No such file or directory However there is an entry for gcc. ls -la /opt/centos/devtoolset-1.1/root/usr/bin/gcc -rwxr-xr-x 2 root root 575224 Jan 30 2013 /opt/centos/devtoolset-1.1/root/usr/bin/gcc |
← ref. post #4.
Quote:
Or : # yum reinstall devtoolset-1.1-gcc-c++ ... provides : /opt/rh/devtoolset-1.1/root/usr/bin/c++ /opt/rh/devtoolset-1.1/root/usr/bin/g++ # yum reinstall devtoolset-1.1-gcc ... provides : /opt/rh/devtoolset-1.1/root/usr/bin/cc /opt/rh/devtoolset-1.1/root/usr/bin/cpp /opt/rh/devtoolset-1.1/root/usr/bin/gcc - |
OK, did that. At least now I get a different error.
configure:3280: checking whether the C++ compiler works configure:3302: /opt/centos/devtoolset-1.1/root/usr/bin/c++ conftest.cpp >&5 usr/bin/ld: cannot find -lstdc++_nonshared collect2: error: ld returned 1 exit status I must not have the repo for this.. yum install lstdc++ Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirror.symnds.com * elrepo: ftp.osuosl.org * extras: mirrors.advancedhosters.com * rpmforge: mirror.nexcess.net * updates: centos.mirror.nac.net No package lstdc++ available. Error: Nothing to do |
← ref. post #6.
Quote:
I get /opt/rh/devtoolset-1.1/root/usr/bin/{ gcc, g++, c++, etc.} * Why are you still using the wrong PATH ? Please have a look into /opt/rh/devtoolset-1.1/root/usr/bin/ ! Or do : $ rpm -ql devtoolset-1.1-gcc-c++ | grep bin -lstdc++** is short for libstdc++.so or lstdc++.a . Please read post #2 → Package list → → # yum install devtoolset-1.1-libstdc++-devel → → /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.a Besides that, please always use $ yum search <package name> (or part of name), to know the available packages. Other useful commands : # find /opt/ -name libstdc++.a /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/32/libstdc++.a /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.a $ rpm -qf /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.a → → devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.x86_64 $ rpm -ql devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.x86_64 | grep libstdc++.a → → /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.a $ yum provides */libstdc++.a → → . . devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.x86_64 /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/libstdc++.a - |
Progress! I guess what must have happened is that at some point devtoolset-2 replaced devtoolset-1.1,
but not all of the packages were installed in devtoolset-2, just as you said. Per your suggestion, I went to the cern site and installed everything that I could possibly use for both devtoolset-1.1 and devtoolset-2. Another thing is that the /opt/centos is a sym link to /opt/rh, which explains the confusion about the paths. Now I can choose which toolset to use with the scl command, e.g. scl enable devtoolset-2 'bash'. Now I still get this error /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2toolset-2/root/usr/bin/ld: cannot find -lstdc++_nonshared But the file is actually there .. find / -iname "libstdc++_nonshared*" 2> /dev/null /opt/rh/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/32/libstdc++_nonshared.a /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/32/libstdc++_nonshared.a /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++_nonshared.a So I guess I need to put the directory containing the nonshared in the LD_LIBRARY_PATH when compiling. echo $LD_LIBRARY_PATH /opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2 But it looks like I still have it wrong. It is confused as to whether it's 1.1 or 2. configure:3280: checking whether the C++ compiler works configure:3302: /opt/centos/devtoolset-1.1/root/usr/bin/c++ conftest.cpp >&5 /opt/rh/devtoolset-2/root/usr/bin/ld: cannot find -lstdc++_nonshared collect2: error: ld returned 1 exit status Or is it looking for the 32 bit one? Or did I lose the environment variables when I entered a new shell? Adding it to PATH did not help either. I must be missing something simple. Same error with TS 1.1 Lex |
At last!
I used yum to remove devtoolset-1.1, then devtoolset-2, and reinstalled devtoolset-2, and all of the necessary pkgs. I removed the links /opt/centos and /opt/Centos. Then I added these lines to the beginning of the configure script: export CC=/opt/rh/devtoolset-2/root/usr/bin/gcc export CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp export CXX=/opt/rh/devtoolset-2/root/usr/bin/c++ export LIBS=/opt/rh/devtoolset-2/root/usr/lib/gcc/x86_64-redhat-linux/4.8.2/libstdc++_nonshared.a Then configure ran to completion and got yes to all of the right questions. Thank you for your helpful advice. You pointed me in the right direction so I was able to figure out the rest.. Problem solved! |
All times are GMT -5. The time now is 07:40 AM. |