Sponsored Content
Top Forums Programming Incompatiblity of the code due to CC compiler version mismatch. Post 302742959 by jim mcnamara on Tuesday 11th of December 2012 11:52:56 PM
Old 12-12-2012
Wow those directories are waaay to deep. Whoever did that was not afraid of PATH_MAX.

You have two different versions of middleware. While trying what I am showing you, be sure sure you find a common and correct release level of the libraries. Maybe it is: libbfunctor.so. in the 7.5.5.0.02 subdirectory -- this must match the current production version of the library.

Anyway - you have coerce the linker ld into using directory names that match what is on the problem server, even if they are not real on the compile server

Here is one way:

Library names are often symlinks. Like /usr/lib/libc.so is usually a symlink that points to the current version of libc, like maybe libc.so.4.2.1.

You need to trick the linker into using names it can find on the other box. This means two separate compiles with two makefiles, one the old way, one the new way to get around this nonsense for the problem machine. You already know the old way.

Those names are beyond absurdly long, so here is an example using sane paths.
Let's say you compile on machine A. And link to libfunctor.so which is really:
Code:
/usr/path/to/libc/libfunctor.so.1234 
# where it is a symlink
/usr/path/to/libc/libfunctor.so -> /usr/path/to/libc/libfunctor.so.1234

Now we know that
Code:
/usr/path/to

does not exist on one machine. So, on the compile machine we create a dummy directory that just has some symlinks in it.

We also know that on the problem machine the path to a libfunctor library we can use is
/opt/foo/gargle/libfunctor.so.1234 (HAS TO BE the SAME version as on the compile box).

This does not exist yet on the compile box. So. On the compile box we are going one make one via a symlink:
Code:
mkdir -p /opt/foo/gargle
ln-s /usr/path/to/libc/libfunctor.so.1234 /opt/foo/gargle/libfunctor.so.1234

Do the same for each library - I think there just two.

Change the -L command in your new makefile to point
Code:
-L /opt/foo/gargle

Run the new makefile. You can tell the compiled versions apart by running the command
Code:
ldd myprogname | grep libfunctor

Distribute the one that uses /opt/foo/gargle to the box that has /opt/foo/gargle/

You now know why installing software onto any old directory tree name on different UNIX boxes: is a pain in the butt.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

gcc compiler version?

How do you determine which version of the GNU gcc compiler is on your system? (1 Reply)
Discussion started by: Ben070371
1 Replies

2. Solaris

X Keyboard Extension version mismatch

I want to use calls from the X Keyboard Extension, but get "library version mismatch" error. First one is XkbLibraryVersion(..). This one already returns false. Then I call XkbOpenDisplay(...) which does not return a valid display; return value is XkbOD_NonXkbServer. If I open the display with... (0 Replies)
Discussion started by: hiker04
0 Replies

3. UNIX for Dummies Questions & Answers

What version is the compiler?

Hi ! we have a intel fortran compiler on our computer. How do i find out what version it is ? Thank you, dsmv. (1 Reply)
Discussion started by: dsmv
1 Replies

4. AIX

how to find out the compiler version and OS from binary file

Command to get the Compiler version(xlc/gcc) from the binary on AIX platform. I m searching for the Command, to get the Compiler(xlc/gcc) used to build the binary on AIX. I got two commands used on Linux Platform: - readelf -a <lib> | grep comment - hexdump -C -s 0x49e7b -n 1812 <lib> ... (1 Reply)
Discussion started by: Prajakta
1 Replies

5. AIX

install two different compiler version

Hi all. I have a simple question. There's a way to install under AIX system (5.3) two different compiler version, i.e. ibm xlf fortran 11 and 12? Seems that smitty doesn't allows user to change the default installation path; it only allows you to save the replaced files of the superseded... (1 Reply)
Discussion started by: poldo000
1 Replies

6. Solaris

java version mismatch for normal user and root user

:confused: I installed latest version of java ( jre 1.6) on Solaris Machine ......when I run java -version as root, shows the latest version but when I run java -version as normal user, shows the old / previous version What should I do to fix this ...should show the latest version... (3 Replies)
Discussion started by: frintocf
3 Replies

7. Programming

Choose compiler version

Hi, I'm new, here, and I'm searching for a simple solution for a simple problem. I'm working on RedHat 4.4.6-4 through a CentOS Virtual Machine and due to some reasons I must compile my C++ codes with these two different g++ versions: 4.4.6 and 4.2.2. The fact is that I should be able to... (4 Replies)
Discussion started by: Marcuss
4 Replies

8. AIX

Checking xlc compiler version

Hi, Below is output of lslpp command. bash-3.00# lslpp -L | grep xlC xlC.aix50.rte 11.1.0.1 C F XL C/C++ Runtime for AIX 5.3 xlC.cpp 9.0.0.0 C F C for AIX Preprocessor xlC.msg.en_US.cpp 9.0.0.0 C F C for AIX... (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. Linux

Linking issue due to so version number

Hi all, currently I'm facing a issue in linking a .so file. In my build machine, I've libcrypto.so.6 and there is a softlink as libcrypto.so. In my make file I'm trying to link to the lib using -L -lcrypto and it is success and created my test.exe. When I copy this test.exe to other... (4 Replies)
Discussion started by: vijkrr
4 Replies

10. Shell Programming and Scripting

Need fix for rsync Error due to version mismatch

rsync --delay-updates -F --compress --archive --rsh='/usr/bin/ssh -t -a -x' /web/admin/Transfer/data/ user1@destserver1:/tmp/testf rsync version on sender server is:3.0.9 rsync version on sender server is:3.0.6 Linux sourceserver1 3.10.0-693.17.1.el7.x86_64 #1 SMP Sun Jan 14 10:36:03 EST... (1 Reply)
Discussion started by: mohtashims
1 Replies
QD-CONFIGG(1)															     QD-CONFIGG(1)

NAME
qd-config - determine flags for compilation and linking SYNOPSIS
qd-config [options] DESCRIPTION
To link a Fortran-90 program with the C++ qd library, it is recommended to link with the C++ compiler used to generate the library. The Fortran 90 interface (along with a C-style main function calling f_main) is found in the qdmod library. The qd-config script can be used to determine which flags to pass to compile and link your programs. OPTIONS
--src Switch between source and system location. --prefix Output configured prefix value. --exec-prefix Output configured exec_prefix value. --build-flags Compiler options used during build. --build-libs Linker options used during build. --configure-args Configure arguments used for build. --cxx C++ compiler. --cflags C++ preprocessor and compiler options. --cxxflags C++ compiler options. --libs-la C++ linker options and libtool archive location. --libs C++ linker options. --fc Fortran compiler. --fcflags Fortran compiler options. --fclibs Fortran linker options. --fmainlib C++ linker options for main program written in Fortran. --version Output version. AUTHOR
This manual page was written by Daniel Leidert <daniel.leidert@wgdd.de> for the Debian project (but may be used by others). User Commands 2008-05-11 QD-CONFIGG(1)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy