Tuesday, February 24, 2009

C/C++ executable running from Cadence with interprocess communication

When starting application I get this error:

==========
Error: Can't Start VisualDRC CORE

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

/home-nis/lis/VDRC/bin/VisualDRC: /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/libstdc++.so.6)
==========

When analyzing those libs I get the below:

[gvit@alfa]<~/work> 202 # ldd -v /usr/lib/libstdc++.so.6
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib/libm.so.6 (0xb7e5d000)
libc.so.6 => /lib/libc.so.6 (0xb7d01000)
/lib/ld-linux.so.2 (0xb7f9a000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7ce2000)

Version information:
/usr/lib/libstdc++.so.6:
libm.so.6 (GLIBC_2.0) => /lib/libm.so.6
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
libgcc_s.so.1 (GCC_4.2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GLIBC_2.0) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.3) => /lib/libgcc_s.so.1
libgcc_s.so.1 (GCC_3.0) => /lib/libgcc_s.so.1
libc.so.6 (GLIBC_2.3.2) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
/lib/libm.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
/lib/libgcc_s.so.1:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2.4) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
----------------------------

[gvit@alfa]<~/work> 204 # strings /tools/Cadence/lnx/ic_5_1_41_usr6/tools/lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0

and the system /libgcc_c.so.1 show:

[gvit@alfa]<~/work> 205 # strings /lib/libgcc_s.so.1 | grep ^GCC
GCC_3.0
GCC_3.3
GCC_3.3.1
GCC_3.4
GCC_3.4.2
GCC_4.0.0
GCC_4.2.0
GCC_4.3.0
GCC_4.4.0

TEMPORARY SOLUTION:


1. The old libgcc_s.so.1 from the Cadence library can be linked to the system library.
linux# cd cadence_install_dir/tools/lib

2. Backup the Cadence libgcc_s.so.1
linux# mv libgcc_s.so.1 libgcc_s.so.1.bkp

3. Make symlink to the libgcc_s.1 from the system /lib directory
linux# ln -s /lib/libgcc_s.so.1 libgcc_s.so.1

P.S.: Need further solution

EASY SOLUTION (less modifications and not correct!)

- in .cdsinit file set this
;---
;overwriting LD_LIBRARY_PATH
printf("Old settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
printf("Overwriting LD_LIBRARY_PATH ...\n")
setShellEnvVar("LD_LIBRARY_PATH=/lib")
printf("New settings for LD_LIBRARY_PATH:\n");
getShellEnvVar("LD_LIBRARY_PATH")
;---

FINAL SOLUTION (the correct solution! yes!)

P.S.: solved after I read this: all about LD_LIBRARY_PATH

1. I made a script that call the C/C++ executable:
linux# cat > VisualDRC
#now input the below
#!/bin/sh
export LD_LIBRARY_PATH=/lib
exec ${VDRC_HOME_DIR}/bin/VisualDRC.exe $@

linux# chmod a+x VisualDRC

Enjoy, this is the correct solution

No comments:

Post a Comment