0

I have written a tool in C++ which uses features. It uses std::regex to provide regex functionality.

It requires GCC (>=4.9.0) to compile the code.

This is the error message on a Ubuntu system where libstdc++6 is not installed.

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found

I am packaging this software for Ubuntu, but can not figure out which version of libstdc++6 should I put as a dependency of my program.

And what will be the dependency of this program for a general case regarding all Unix like OS that I should notify the user beforehand?

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
Jahid
  • 21,542
  • 10
  • 90
  • 108
  • Are you asking which version of GCC first supported `std::regex` (see http://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions/12665408#12665408), or which version of GCC you have linked to? And what does the last sentence mean? – Jonathan Wakely Oct 01 '15 at 18:48
  • @JonathanWakely I just want to notify the user about it's dependency i.e what they need to run it properly. Making them to install the whole gcc >=4.9 package seems not very feasible. – Jahid Oct 01 '15 at 18:51
  • So then they need the libstdc++6-4.9.x package, for some x. I don't understand what you're asking. You compiled with GCC 4.9, you linked with GCC 4.9, so your program needs the libstdc++ from (at least) GCC 4.9 ... isn't the answer just 4.9? If not, what is the question? – Jonathan Wakely Oct 01 '15 at 18:51

1 Answers1

1

I am packaging this software for Ubuntu, but can not figure out which version of libstdc++6 should I put as a dependency of my program.

The minimum dependency is the version that you linked your program with.

So if you linked with gcc-4.9.1 then they need at least libstdc++6-4.9.1

And what will be the dependency of this program for a general case regarding all Unix like OS that I should notify the user beforehand?

It needs a compiler that supports std::regex from C++11 ... but you already said that in the question.

Jonathan Wakely
  • 166,810
  • 27
  • 341
  • 521