Shared libs versioning issues
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Shared libs versioning issues




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Shared libs versioning issues  
Pablo J Royo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:20 PM

Hello:

I have compiled an application on a SunFire V240 Solaris 9  machine, and
when I try to execute it on a E250 Sparc Solaris 7 machine I get this error:

ld.so.1: ./my_app: fatal: libnsl.so.1: version `SUNW_1.7' not found
(required by file ./my_app)

I suppose I must link the program in some way in Solaris 9 so that the rigth
versioning info appears in it, and then Solaris 7 machine will "see" it
correctly, but I donīt know how to doit.
Any ideas? Is any option in "ld" linker (gnu or not) to do this?

Thank you







[ Post a follow-up to this message ]



    Re: Shared libs versioning issues  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:20 PM

"Pablo J Royo" <royop@tb-solutions.com> writes:
quote:
> I have compiled an application on a SunFire V240 Solaris 9 machine, and > when I try to execute it on a E250 Sparc Solaris 7 machine I get this error:[/QUOT E] None of the UNIXes I know about support this. Solaris7-built binaries will (generally) work on Solaris9, but not vice versa. [QUOTE] > I suppose I must link the program in some way in Solaris 9 so that the rig th > versioning info appears in it, and then Solaris 7 machine will "see" it > correctly, but I donīt know how to doit.
This is possible to do, but is quite tricky and requires detailed understanding of how ELF dynamic linker and symbol versioning work. You are quite unlikely to get it working correctly. A much simpler solution is just to build on a Solaris 7 machine. If you still want to do it "the hard way", build gcc Solaris9->Solaris7 cross-compiler [details on building gcc as a cross-compiler are in gcc documentation].
quote:
> Is any option in "ld" linker (gnu or not) to do this?
No. GNU-ld will not make this any easier. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.




[ Post a follow-up to this message ]



    Re: Shared libs versioning issues  
Pablo J Royo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:20 PM

Thank you Paul

I hadnīt thought your cross-compiler option. I will check it.
Now I have used "-z noversion" option in Solaris 9 ld linker, so when I run
my program on Solaris 7 it works because there is no version checking. But
I'm not sure of its effects. I have looked for a similar option on GNU gcc
with no results.









[ Post a follow-up to this message ]



    Re: Shared libs versioning issues  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:20 PM

"Pablo J Royo" <royop@tb-solutions.com> writes:
quote:
> Now I have used "-z noversion" option in Solaris 9 ld linker, so when I ru n > my program on Solaris 7 it works because there is no version checking. But > I'm not sure of its effects.
Basically you've turned off "safety protection" and could have subtle bugs galore when using that binary on Solaris7. The effects of these bugs may not be immediately obvious, but they may bite you at the most inopportune time ;-(
quote:
> I have looked for a similar option on GNU gcc > with no results.
gcc on Solaris could be configured with GNU-ld, but I don't think that is the default. If you are using /usr/ccs/bin/ld, then -Wl,-z,noversion will pass "-z noversion" to the linker. GNU-ld doesn't appear to have a "don't record version dependencies" flag. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email.




[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:26 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register