How to investigate and fix missing libraries and/or skipping incompatible library?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I have one secret library built for CentOS 6.5 as a package. I can't build package for CentOS 7.4, make install fails on this line:



$ gcc -static -O3 -Wno-long-long -funroll-loops -Wall -g -DLINUX testlib.c -o test-lib -L. -llsh -lstdc++

/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lc


I tried to investigate this, for example:



$ ld -lstdc++ --verbose
...
attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
attempt to open /usr/lib64/libstdc++.so failed
attempt to open /usr/lib64/libstdc++.a failed
attempt to open /usr/local/lib64/libstdc++.so failed
attempt to open /usr/local/lib64/libstdc++.a failed
attempt to open /lib64/libstdc++.so failed
attempt to open /lib64/libstdc++.a failed
attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
attempt to open /usr/local/lib/libstdc++.so failed
attempt to open /usr/local/lib/libstdc++.a failed
attempt to open /lib/libstdc++.so failed
attempt to open /lib/libstdc++.a failed
attempt to open /usr/lib/libstdc++.so failed
attempt to open /usr/lib/libstdc++.a failed
ld: cannot find -lstdc++


I take a look at some paths and found this: /usr/lib/libstdc++.so.6
I created symlink (tried to cheat this) but go another error:



$ sudo ln -s /usr/lib/libstdc++.so.6.0.19 /usr/lib/libstdc++.so

$ ld -lstdc++ --verbose
...
attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
attempt to open /usr/lib64/libstdc++.so failed
attempt to open /usr/lib64/libstdc++.a failed
attempt to open /usr/local/lib64/libstdc++.so failed
attempt to open /usr/local/lib64/libstdc++.a failed
attempt to open /lib64/libstdc++.so failed
attempt to open /lib64/libstdc++.a failed
attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
attempt to open /usr/local/lib/libstdc++.so failed
attempt to open /usr/local/lib/libstdc++.a failed
attempt to open /lib/libstdc++.so succeeded
ld: skipping incompatible /lib/libstdc++.so when searching for -lstdc++
attempt to open /lib/libstdc++.a failed
attempt to open /usr/lib/libstdc++.so succeeded
ld: skipping incompatible /usr/lib/libstdc++.so when searching for -lstdc++
attempt to open /usr/lib/libstdc++.a failed
ld: cannot find -lstdc++


CentOS 6.5:



$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)


CentOS 7.4:



$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)


Please, help to fix this. Also, looking forward to get some advice how to investigate such issues.







share|improve this question
























    up vote
    2
    down vote

    favorite












    I have one secret library built for CentOS 6.5 as a package. I can't build package for CentOS 7.4, make install fails on this line:



    $ gcc -static -O3 -Wno-long-long -funroll-loops -Wall -g -DLINUX testlib.c -o test-lib -L. -llsh -lstdc++

    /usr/bin/ld: cannot find -lstdc++
    /usr/bin/ld: cannot find -lc


    I tried to investigate this, for example:



    $ ld -lstdc++ --verbose
    ...
    attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
    attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
    attempt to open /usr/lib64/libstdc++.so failed
    attempt to open /usr/lib64/libstdc++.a failed
    attempt to open /usr/local/lib64/libstdc++.so failed
    attempt to open /usr/local/lib64/libstdc++.a failed
    attempt to open /lib64/libstdc++.so failed
    attempt to open /lib64/libstdc++.a failed
    attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
    attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
    attempt to open /usr/local/lib/libstdc++.so failed
    attempt to open /usr/local/lib/libstdc++.a failed
    attempt to open /lib/libstdc++.so failed
    attempt to open /lib/libstdc++.a failed
    attempt to open /usr/lib/libstdc++.so failed
    attempt to open /usr/lib/libstdc++.a failed
    ld: cannot find -lstdc++


    I take a look at some paths and found this: /usr/lib/libstdc++.so.6
    I created symlink (tried to cheat this) but go another error:



    $ sudo ln -s /usr/lib/libstdc++.so.6.0.19 /usr/lib/libstdc++.so

    $ ld -lstdc++ --verbose
    ...
    attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
    attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
    attempt to open /usr/lib64/libstdc++.so failed
    attempt to open /usr/lib64/libstdc++.a failed
    attempt to open /usr/local/lib64/libstdc++.so failed
    attempt to open /usr/local/lib64/libstdc++.a failed
    attempt to open /lib64/libstdc++.so failed
    attempt to open /lib64/libstdc++.a failed
    attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
    attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
    attempt to open /usr/local/lib/libstdc++.so failed
    attempt to open /usr/local/lib/libstdc++.a failed
    attempt to open /lib/libstdc++.so succeeded
    ld: skipping incompatible /lib/libstdc++.so when searching for -lstdc++
    attempt to open /lib/libstdc++.a failed
    attempt to open /usr/lib/libstdc++.so succeeded
    ld: skipping incompatible /usr/lib/libstdc++.so when searching for -lstdc++
    attempt to open /usr/lib/libstdc++.a failed
    ld: cannot find -lstdc++


    CentOS 6.5:



    $ gcc --version
    gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)


    CentOS 7.4:



    $ gcc --version
    gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)


    Please, help to fix this. Also, looking forward to get some advice how to investigate such issues.







    share|improve this question






















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I have one secret library built for CentOS 6.5 as a package. I can't build package for CentOS 7.4, make install fails on this line:



      $ gcc -static -O3 -Wno-long-long -funroll-loops -Wall -g -DLINUX testlib.c -o test-lib -L. -llsh -lstdc++

      /usr/bin/ld: cannot find -lstdc++
      /usr/bin/ld: cannot find -lc


      I tried to investigate this, for example:



      $ ld -lstdc++ --verbose
      ...
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
      attempt to open /usr/lib64/libstdc++.so failed
      attempt to open /usr/lib64/libstdc++.a failed
      attempt to open /usr/local/lib64/libstdc++.so failed
      attempt to open /usr/local/lib64/libstdc++.a failed
      attempt to open /lib64/libstdc++.so failed
      attempt to open /lib64/libstdc++.a failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
      attempt to open /usr/local/lib/libstdc++.so failed
      attempt to open /usr/local/lib/libstdc++.a failed
      attempt to open /lib/libstdc++.so failed
      attempt to open /lib/libstdc++.a failed
      attempt to open /usr/lib/libstdc++.so failed
      attempt to open /usr/lib/libstdc++.a failed
      ld: cannot find -lstdc++


      I take a look at some paths and found this: /usr/lib/libstdc++.so.6
      I created symlink (tried to cheat this) but go another error:



      $ sudo ln -s /usr/lib/libstdc++.so.6.0.19 /usr/lib/libstdc++.so

      $ ld -lstdc++ --verbose
      ...
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
      attempt to open /usr/lib64/libstdc++.so failed
      attempt to open /usr/lib64/libstdc++.a failed
      attempt to open /usr/local/lib64/libstdc++.so failed
      attempt to open /usr/local/lib64/libstdc++.a failed
      attempt to open /lib64/libstdc++.so failed
      attempt to open /lib64/libstdc++.a failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
      attempt to open /usr/local/lib/libstdc++.so failed
      attempt to open /usr/local/lib/libstdc++.a failed
      attempt to open /lib/libstdc++.so succeeded
      ld: skipping incompatible /lib/libstdc++.so when searching for -lstdc++
      attempt to open /lib/libstdc++.a failed
      attempt to open /usr/lib/libstdc++.so succeeded
      ld: skipping incompatible /usr/lib/libstdc++.so when searching for -lstdc++
      attempt to open /usr/lib/libstdc++.a failed
      ld: cannot find -lstdc++


      CentOS 6.5:



      $ gcc --version
      gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)


      CentOS 7.4:



      $ gcc --version
      gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)


      Please, help to fix this. Also, looking forward to get some advice how to investigate such issues.







      share|improve this question












      I have one secret library built for CentOS 6.5 as a package. I can't build package for CentOS 7.4, make install fails on this line:



      $ gcc -static -O3 -Wno-long-long -funroll-loops -Wall -g -DLINUX testlib.c -o test-lib -L. -llsh -lstdc++

      /usr/bin/ld: cannot find -lstdc++
      /usr/bin/ld: cannot find -lc


      I tried to investigate this, for example:



      $ ld -lstdc++ --verbose
      ...
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
      attempt to open /usr/lib64/libstdc++.so failed
      attempt to open /usr/lib64/libstdc++.a failed
      attempt to open /usr/local/lib64/libstdc++.so failed
      attempt to open /usr/local/lib64/libstdc++.a failed
      attempt to open /lib64/libstdc++.so failed
      attempt to open /lib64/libstdc++.a failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
      attempt to open /usr/local/lib/libstdc++.so failed
      attempt to open /usr/local/lib/libstdc++.a failed
      attempt to open /lib/libstdc++.so failed
      attempt to open /lib/libstdc++.a failed
      attempt to open /usr/lib/libstdc++.so failed
      attempt to open /usr/lib/libstdc++.a failed
      ld: cannot find -lstdc++


      I take a look at some paths and found this: /usr/lib/libstdc++.so.6
      I created symlink (tried to cheat this) but go another error:



      $ sudo ln -s /usr/lib/libstdc++.so.6.0.19 /usr/lib/libstdc++.so

      $ ld -lstdc++ --verbose
      ...
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib64/libstdc++.a failed
      attempt to open /usr/lib64/libstdc++.so failed
      attempt to open /usr/lib64/libstdc++.a failed
      attempt to open /usr/local/lib64/libstdc++.so failed
      attempt to open /usr/local/lib64/libstdc++.a failed
      attempt to open /lib64/libstdc++.so failed
      attempt to open /lib64/libstdc++.a failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.so failed
      attempt to open /usr/x86_64-redhat-linux/lib/libstdc++.a failed
      attempt to open /usr/local/lib/libstdc++.so failed
      attempt to open /usr/local/lib/libstdc++.a failed
      attempt to open /lib/libstdc++.so succeeded
      ld: skipping incompatible /lib/libstdc++.so when searching for -lstdc++
      attempt to open /lib/libstdc++.a failed
      attempt to open /usr/lib/libstdc++.so succeeded
      ld: skipping incompatible /usr/lib/libstdc++.so when searching for -lstdc++
      attempt to open /usr/lib/libstdc++.a failed
      ld: cannot find -lstdc++


      CentOS 6.5:



      $ gcc --version
      gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)


      CentOS 7.4:



      $ gcc --version
      gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)


      Please, help to fix this. Also, looking forward to get some advice how to investigate such issues.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 26 at 16:14









      Sergius

      3841211




      3841211




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Try to install:



          • libstdc++-static

          • glibc-static

          Starting from Redhat 7/CentOS 7, static libraries was moved to an optional package. In CentOS 6 it was a part of:



          • libstdc++-devel

          • glibc-devel





          share|improve this answer






















          • It works, could you explain why, please?
            – Sergius
            Feb 27 at 9:39

















          up vote
          0
          down vote













          You probably need the devel version of the libraries, so install:



          • libstdc++-devel-4.8.5-16.el7

          • glibc-devel-2.17-196.el7





          share|improve this answer




















          • no, both packages installed and exactly the same versions
            – Sergius
            Feb 26 at 17:38










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426725%2fhow-to-investigate-and-fix-missing-libraries-and-or-skipping-incompatible-librar%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Try to install:



          • libstdc++-static

          • glibc-static

          Starting from Redhat 7/CentOS 7, static libraries was moved to an optional package. In CentOS 6 it was a part of:



          • libstdc++-devel

          • glibc-devel





          share|improve this answer






















          • It works, could you explain why, please?
            – Sergius
            Feb 27 at 9:39














          up vote
          2
          down vote



          accepted










          Try to install:



          • libstdc++-static

          • glibc-static

          Starting from Redhat 7/CentOS 7, static libraries was moved to an optional package. In CentOS 6 it was a part of:



          • libstdc++-devel

          • glibc-devel





          share|improve this answer






















          • It works, could you explain why, please?
            – Sergius
            Feb 27 at 9:39












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Try to install:



          • libstdc++-static

          • glibc-static

          Starting from Redhat 7/CentOS 7, static libraries was moved to an optional package. In CentOS 6 it was a part of:



          • libstdc++-devel

          • glibc-devel





          share|improve this answer














          Try to install:



          • libstdc++-static

          • glibc-static

          Starting from Redhat 7/CentOS 7, static libraries was moved to an optional package. In CentOS 6 it was a part of:



          • libstdc++-devel

          • glibc-devel






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 27 at 9:58

























          answered Feb 27 at 9:28









          Mykhailo Zarai

          342




          342











          • It works, could you explain why, please?
            – Sergius
            Feb 27 at 9:39
















          • It works, could you explain why, please?
            – Sergius
            Feb 27 at 9:39















          It works, could you explain why, please?
          – Sergius
          Feb 27 at 9:39




          It works, could you explain why, please?
          – Sergius
          Feb 27 at 9:39












          up vote
          0
          down vote













          You probably need the devel version of the libraries, so install:



          • libstdc++-devel-4.8.5-16.el7

          • glibc-devel-2.17-196.el7





          share|improve this answer




















          • no, both packages installed and exactly the same versions
            – Sergius
            Feb 26 at 17:38














          up vote
          0
          down vote













          You probably need the devel version of the libraries, so install:



          • libstdc++-devel-4.8.5-16.el7

          • glibc-devel-2.17-196.el7





          share|improve this answer




















          • no, both packages installed and exactly the same versions
            – Sergius
            Feb 26 at 17:38












          up vote
          0
          down vote










          up vote
          0
          down vote









          You probably need the devel version of the libraries, so install:



          • libstdc++-devel-4.8.5-16.el7

          • glibc-devel-2.17-196.el7





          share|improve this answer












          You probably need the devel version of the libraries, so install:



          • libstdc++-devel-4.8.5-16.el7

          • glibc-devel-2.17-196.el7






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 26 at 17:12









          Patrick Mevzek

          2,0131721




          2,0131721











          • no, both packages installed and exactly the same versions
            – Sergius
            Feb 26 at 17:38
















          • no, both packages installed and exactly the same versions
            – Sergius
            Feb 26 at 17:38















          no, both packages installed and exactly the same versions
          – Sergius
          Feb 26 at 17:38




          no, both packages installed and exactly the same versions
          – Sergius
          Feb 26 at 17:38












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f426725%2fhow-to-investigate-and-fix-missing-libraries-and-or-skipping-incompatible-librar%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?