Why are my G++ shared libraries incompatible after switching to Opensuse 12.3?

  • Thread starter Thread starter PPeter
  • Start date Start date
  • Tags Tags
    Issues
Click For Summary

Discussion Overview

The discussion revolves around the incompatibility of shared libraries when switching from Arch Linux to Opensuse 12.3 while using the G++ compiler. Participants explore potential causes related to library paths, architecture differences, and the nature of the libraries being used.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes encountering errors related to incompatible shared libraries after switching operating systems, despite keeping the same compilation commands.
  • Another participant suggests checking the LD_LIBRARY_PATH environment variable to ensure it points to the correct directories containing the shared libraries.
  • There is a mention of potential issues arising from compiling in different modes (32-bit vs 64-bit) and the necessity for consistency between the compiled code and the libraries referenced.
  • Some participants raise the possibility of confusion between static and dynamic libraries, questioning whether the issue could stem from this distinction.
  • One participant notes that the error message indicates incompatibility rather than a complete absence of the libraries, speculating on factors such as compiler differences or architecture mismatches.
  • There is a clarification that "shared libraries" can refer to both static and dynamic libraries, with static libraries being compiled into executables and dynamic libraries linked at runtime.

Areas of Agreement / Disagreement

Participants express various hypotheses regarding the cause of the incompatibility, but no consensus is reached on a definitive solution or explanation. Multiple competing views remain regarding the nature of the libraries and the environment configuration.

Contextual Notes

Participants discuss the implications of different library types and architectures, but there are unresolved assumptions regarding the specific configurations and setups used in both operating systems.

PPeter
Messages
3
Reaction score
1
Before I switched to Opensuse 12.3, I was running Arch, and doing something like:
Code:
g++ -o test -I ./include/ -L ./lib/ -ltcod -ltcodxx ./src/main.cpp
with no problems occurring.

Now, when I try to do that (with everything kept the exact same as when on Arch), I get:
Code:
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible lib/libtcod.so when searching for -ltcod
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: cannot find -ltcod
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: skipping incompatible lib/libtcodxx.so when searching for -ltcodxx
/usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: cannot find -ltcodxx

I also tried including -Wl,-rpath=./lib/ , but it still made no difference.

Any help as to why the libraries have become incompatible all of a sudden would be greatly appreciated.
 
Technology news on Phys.org
Also, is there the possibility of an issue of static vs dynamic libraries? I seem to remember a problem along those lines when. at the office, I got switched from Red Hat 4 to Red Hat 5.
 
I guess.

By the way, the error message posted does not quite say that the library was not found, it says that what was found is not compatible...whatever that means...different compiler? different size (32 vs 64)? different something? Sorry, I am no expert on these matters.
 
The term "shared libraries" may refer to libraries that are either static OR dynamic. Static libraries are compiled right into your executable, whereas dynamic libraries are linked at runtime.
 

Similar threads

Replies
18
Views
8K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 49 ·
2
Replies
49
Views
12K