libc.1 vs. libc.2 (93 Views)
Reply
Honored Contributor
Jeff_Traigle
Posts: 1,354
Registered: ‎03-04-2004
Message 1 of 4 (93 Views)
Accepted Solution

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
Honored Contributor
Mike Stroyan
Posts: 888
Registered: ‎11-22-1996
Message 2 of 4 (93 Views)

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.
Honored Contributor
Mike Stroyan
Posts: 888
Registered: ‎11-22-1996
Message 3 of 4 (93 Views)

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.
Honored Contributor
Jeff_Traigle
Posts: 1,354
Registered: ‎03-04-2004
Message 4 of 4 (93 Views)

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
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.