1

My setup: Red Hat Enterprise Linux Server release 7.6 (Maipo)

I was previously having a linking problem when trying to link with a boost static library, which i had found out was caused of it being compiled with the C++17 standard with GCC 8.2 but /usr/lib64/libstdc++.so.6 pointing to libstdc++.so.6.0.19. GCC 8.2 was installed from development-toolset8 which I enabled with source /opt/rh/devtoolset-8/enable. Now my question is what is the best practice way to solve this?( i have read quite a lot on this so i have 2 solution below, more like 1 cause the other one is a glimpse of an idea)

1) I download the package and do the installation from here specifying --enable-shared --prefix=$HOME/gcc (any other options that you think might be useful? ) Do i need to uninstall the dev-toolset8 for this? Then i recompile the boost package with the flag -D_GLIBCXX_USE_CXX11_ABI=1,

2) i try to somehow compile(i have no clue how) the libstdc++.so from the /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/libstdc++.a (How do i do this? no idea?)

Similar description of my problem which seems to be a:RedHat bug

Thank you

eucristian
  • 391
  • 3
  • 17
  • I can sudjest to not compile boost with yor self, install it from -devel package. And build rpm for your application - with boost package dependecy to redistribute it. – Victor Gubin Jan 24 '19 at 23:38
  • Rpm search shows boost 1.66 is available for rhel 7.2 and abowe. – Victor Gubin Jan 24 '19 at 23:47
  • Ok. When I installed it from rpm it just had the .a and.so libraries.i would actually want to compile it with --build-type=complete to show the boost debug libraries as well Also the rpm one comes with without the c++11 standard. Any thoughts on the gcc installation? – eucristian Jan 25 '19 at 07:39

0 Answers0