1748171 Members
4269 Online
108758 Solutions
New Discussion юеВ

Re: libc.1 vs. libc.2

 
SOLVED
Go to solution
Jeff_Traigle
Honored Contributor

libc.1 vs. libc.2

One of our applications has run into a name resolution problem related to the different ways these libraries handle name resolution policies. The main problem seems to stem from the application being developed and compiled under 10.01, but run on 11.00. (My guess is that they don't want to develop on 11.00 because many customers still have 10.01 and 10.20 systems in production.) Changing the nsswitch.conf file to specify exactly what policy we want followed will work, but I'm wondering if there's anything the application developer can do to make the application behave as desired without this reconfiguration. On 11.00, libc.2, with the preferred behavior, exists and could be used, but it doesn't exist on 10.X (at least as the systems are patched). I'm guessing it's not possible, but, not being a programmer, just looking for confirmation.
--
Jeff Traigle
3 REPLIES 3
Mike Stroyan
Honored Contributor
Solution

Re: libc.1 vs. libc.2

There is no compile option or API for changing the default name lookup policy that would normally be specified by /etc/nsswitch.conf.
Programs built on 10.01 can't use libc.2. Stepping up to building on 10.20 would use libc.2.
Mike Stroyan
Honored Contributor

Re: libc.1 vs. libc.2

Oops!
That 10.20 libc.2 comment left me with a bad feeling the moment I hit the 'submit' button.
Some joker put an 11.00 built libc.2 on the 10.20 system that I was just looking at. That should not be done and should not work.

You get libc.2 if you link on 11.00 or above.
Jeff_Traigle
Honored Contributor

Re: libc.1 vs. libc.2

Yeah. After much digging around online, I found enough information from various sources that everything crystalized and made sense regarding this issue. If you build to be compatible with 10.X, you have to set up the nsswitch.conf accordingly to force it to how 11.X resolves. Thanks.
--
Jeff Traigle