Sponsored Content
Top Forums Programming Incompatiblity of the code due to CC compiler version mismatch. Post 302743131 by jim mcnamara on Wednesday 12th of December 2012 07:00:42 AM
Old 12-12-2012
I know this is confusing. Giving you an example did not work. These are your requirements:
(try requirement 1a first)
1. All machines need to have exactly the pathnames to libraries
1a: Or all binaries have to know how to find the libraries
2. The actual names you set up have to exist everywhere.


You achieve 1a a single way:
LD_LIBRARY_PATH variable that shows how to find the library you want. This has to be in the environment variable set up for any user that runs the code: .profile, .bashrc, etc.

Example LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/path/to/library:${LD_LIBRARY_PATH}

"/path/to/library" is an example do not use it.

I can not know which if that jumble of output for libfunctorxxxxxx is where the correct library is. I AM GUESSING.

You will select the path that exists on the machine the process runs on
if
Code:
/export/build/nwwls/devspace/cm/delivered/prospect/prospect_core/Patches/8.0.7/P6/backup/pm/lib/ln/rwav/libfunctor2312d10g.so

exists:
Code:
export LD_LIBRARY_PATH=/export/build/nwwls/devspace/cm/delivered/prospect/prospect_core/Patches/8.0.7/P6/backup/pm/lib/ln/rwav/:${LD_LIBRARY_PATH}

if
Code:
/u04/net/rtp-netapp1/vol/build/nwwls/devspace/cm/delivered/MIDDLEWARE/middleware_cpp/prospect_core/8.0.7.10.01/server/pm/lib/tp/libfunctor2312d10g.so

then
Code:
export LD_LIBRARY_PATH=/u04/net/rtp-netapp1/vol/build/nwwls/devspace/cm/delivered/MIDDLEWARE/middleware_cpp/prospect_core/8.0.7.10.01/server/pm/lib/tp/:${LD_LIBRARY_PATH}

You do this on all 3 machines. You validate this by setting LD_LIBRARY_PATH, and executing the command
Code:
ldd example_program_name

where example_program_name is the name of your compiled code file
Keep twiddling the LD_LIBRARY_PATH until all libraries show in the ldd output.




You achieve #1 two possible ways
Way #1. Add symbolic links as paths on the production box to match development
-- this requires no change in compilation

Way #2: Add symbolic links (extra set of paths to libraries) on development, AND
change the link statement to follow the new symbolic path.
-- requires that you change compilation -- you have two make files
 

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
Env(3)							User Contributed Perl Documentation						    Env(3)

NAME
Env - perl module that imports environment variables as scalars or arrays SYNOPSIS
use Env; use Env qw(PATH HOME TERM); use Env qw($SHELL @LD_LIBRARY_PATH); DESCRIPTION
Perl maintains environment variables in a special hash named %ENV. For when this access method is inconvenient, the Perl module "Env" allows environment variables to be treated as scalar or array variables. The "Env::import()" function ties environment variables with suitable names to global Perl variables with the same names. By default it ties all existing environment variables ("keys %ENV") to scalars. If the "import" function receives arguments, it takes them to be a list of variables to tie; it's okay if they don't yet exist. The scalar type prefix '$' is inferred for any element of this list not prefixed by '$' or '@'. Arrays are implemented in terms of "split" and "join", using $Config::Config{path_sep} as the delimiter. After an environment variable is tied, merely use it like a normal variable. You may access its value @path = split(/:/, $PATH); print join(" ", @LD_LIBRARY_PATH), " "; or modify it $PATH .= ":."; push @LD_LIBRARY_PATH, $dir; however you'd like. Bear in mind, however, that each access to a tied array variable requires splitting the environment variable's string anew. The code: use Env qw(@PATH); push @PATH, '.'; is equivalent to: use Env qw(PATH); $PATH .= ":."; except that if $ENV{PATH} started out empty, the second approach leaves it with the (odd) value "":."", but the first approach leaves it with ""."". To remove a tied environment variable from the environment, assign it the undefined value undef $PATH; undef @LD_LIBRARY_PATH; LIMITATIONS
On VMS systems, arrays tied to environment variables are read-only. Attempting to change anything will cause a warning. AUTHOR
Chip Salzenberg <chip@fin.uucp> and Gregor N. Purdy <gregor@focusresearch.com> perl v5.16.3 2013-03-02 Env(3)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy