cancel
Showing results for 
Search instead for 
Did you mean: 

SQLDBC and libstdc++.so.5

Former Member
0 Kudos

Hi!

Short: OS: Linux, Kernel 2.6.x, arch: x86_32/x86_64, vendor SuSE, version 10.x/SLES10, gcc 4.x, MaxDB 7.6.3.7

I tried to compile the SQLDBC example "HelloMaxDB.cpp" but ran into the problem, that libSQLDBC.so is linked against libstdc+.so.5 and my gcc version (4.1.0) builds code for libstdc.so.6. AFAIK the version of libstdc+ is bound to the gcc version.

SuSE does not provide older versions of gcc (as in 8.x/SLES8) anymore.

Is there any way to compile a program using SQLDBC under a current Linux Distro?

Here's the output of make/ldd on an SuSE 10.1-Box:

-8<-

cju@dave:~/devel/cpp/sdb/sqldbc> make

c++ -c -I/sapdb/programs/sdk/sqldbc/incl HelloMaxDB.cpp

c++ -o HelloMaxDB HelloMaxDB.o -L/sapdb/programs/lib -lSQLDBC

/usr/lib/gcc/i586-suse-linux/4.1.0/../../../../i586-suse-linux/bin/ld: warning: libstdc+.so.5, needed by /sapdb/programs/lib/libSQLDBC.so, may conflict with libstdc+.so.6

cju@dave:~/devel/cpp/sdb/sqldbc> ldd HelloMaxDB

linux-gate.so.1 => (0xffffe000)

libSQLDBC.so => /sapdb/programs/lib/libSQLDBC.so (0xb7cb5000)

libstdc+.so.6 => /usr/lib/libstdc+.so.6 (0xb7bbc000)

libm.so.6 => /lib/libm.so.6 (0xb7b97000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7b8c000)

libc.so.6 => /lib/libc.so.6 (0xb7a6b000)

libpthread.so.0 => /lib/libpthread.so.0 (0xb7a57000)

libdl.so.2 => /lib/libdl.so.2 (0xb7a53000)

librt.so.1 => /lib/librt.so.1 (0xb7a4a000)

libstdc+.so.5 => /usr/lib/libstdc+.so.5 (0xb798c000)

/lib/ld-linux.so.2 (0xb7fac000)

-8<-

Thanks!

Chris

Accepted Solutions (0)

Answers (1)

Answers (1)

lbreddemann
Active Contributor
0 Kudos

Hi Chris,

you may try to install the libstdc++.so.5 from a supplemental rpm:

[http://rpmfind.net/linux/rpm2html/search.php?query=libstdc%2B%2B.so.5&submit=Search+...&system=&arch=]

Download from [here|ftp://rpmfind.net/linux/opensuse/distribution/10.2/repo/oss/suse/i586/compat-libstdc++-5.0.7-41.i586.rpm]

Then install via:

rpm -ivh compat-libstdc++-5.0.7-41.i586.rpm

That should do the trick.

KR Lars

Former Member
0 Kudos

Hi Lars,

thanks a lot for your answer. The compat-libstdc++ is installed (otherwise MaxDB wouldn't run anyway).

My problem is that I can't cleanly compile a program which uses SQLDBC under SuSE SLES10/OpenSUSE 10.x because SuSE doesn't provide a gcc/g++ version which links against libstdc++.so.5 (e.g. gcc 3.3).

So my program will be linked against libstdc+.so.6 and libSQLDBC.so which in turn is linked to libstdc+.so.5.

Update:

Despite the fact, that gcc complains about linking the program to libstdc+.so.5 and libstdc+.so.6 the program is executable an seems to run fine.

I'll mark this thread as answered. But I would appreciate it if someone has a hint to avoid this warning:

ld: warning: libstdc+.so.5, needed by /sapdb/programs/lib/libSQLDBC.so, may conflict with libstdc+.so.6

Bye

Chris

alexander_schroeder
Participant
0 Kudos

Hello Christian,

the linker warning can not be suppressed, but it is not harmful. If no objects from libstdc+.5 cross the boundary to code using libstdc.6 (which is the fact, as SQLDBC returns no object in the interface that comes from the libstdc+.5) you may live with this mix.

Regards

Alexander Schröder