Gcc Version Compatibility
Hey all,
What are the chances of a program that is compiled on gcc 4.7.x working on a system that has gcc 4.4.6? To put it another way, if I have software that was built using gcc 4.7.x, would it work on a SL 6.1 install? Josh |
A gcc 4.7.x compiled program may depend on libgcc_s.so.1 from gcc-4.7.x.
And if the program was compiled on an OS with a later glibc, it may depend on objects from that glibc, i.e. libc.so.6 . A way of testing : Copy the program executable to SL 6, and run $ ldd <executable> : If nothing is missing, it's OK. - |
Thank you, was thinking in that direction. I am assuming that this would also apply to a C++ program as well?
|
# 3
Any program that is compiled with gcc, g++. But why not just recompile on the target OS ? |
Long story short, our devs are using gcc 4.7.x and our production isn't.
|
You could also get around the problem by compiling with static libraries.
|
# 5
Quote:
Most programs will compile with any gcc version 3.4.6 ... 4.x.x. But there are of course exceptions. |
All times are GMT -5. The time now is 02:34 PM. |