1752751 Members
5028 Online
108789 Solutions
New Discussion

libc.a

 
Yogendra
Occasional Contributor

libc.a

Hi,
I am porting one application from 10.2 to 11i and now i need to get rid of libc.a.
Can any boidy tell me what other library i should use than libc.a.

 

 

P.S.This thread has been moved from Moved from HP-UX>General  to HP-UX>  languages- HP Forums Moderator

6 REPLIES 6
Mehdi_1
Regular Advisor

Re: libc.a

Hi

Why don't you use -lc instead.

Mehdi
Jacko_3
Advisor

Re: libc.a

HI Yogendra,

you coudl refer to the following documentation

Question
Some kernel and program files have been changed for HP-UX 11i/SuperDome
compatibility. If programs that use these files were created in earlier
versions of HP-UX, do they need to be recompiled?


Answer

Changes were made to certain kernel and program files for the HP-UX 11.10
technology release specifically to support scalable computing
architecture (SCA) on the HP V-class SCA servers. However,SCA is not
supported by the HP-UX 11i release, and all supported V-class systems
are non-SCA servers that consist of a single "locality domain".

However, programs that include these changed files must be recompiled to
make use of the new functionality provided by SCA enhancements for HP-UX
11.10.

For compatibility reasons, the HP-UX 11i release supports the Scalable
Computing Architecture (SCA) programming, process management, and memory
management features introduced at HP-UX 11.10. However, these features do
not provide any potential performance benefits.

The following library, program and kernel files have been modified for
HP-UX 11i:

Library files:

pthread libraries: libpthread.1, libpthread.a, libpthread.sl
crash dump libraries: libcrash.2, libcrash.sl
libc libraries: libc.a, libc.sl

Kernel files:

/usr/conf/gen/mapfile
/usr.conf/master.d/core-hpux
/usr/conf/wsio/eisa_cdio.h

Program (header) files:

/usr/include/sys/mpctl.h -- mpctl () system call support
/usr/include/sys/mmapl.h -- mmapl () system call support
/usr/include/sys/ipcl.h -- shmget () system call support
/usr/include/sys/pstat.h -- pstat () system call support
/usr/include/sys/unistd.h -- sysconf () system call support

Refer to the following online manual pages for information on updates to
these header files:
mpctl(2), mmap(2), shmget(2), pstat(2), sysconf(2)



May you find it useful!

cheers...
Jacko_3
Advisor

Re: libc.a

HI further my testing another workaround would be to:

aCC -g -Wl,-a,archive test.c -lsec -Wl,-a,shared -lc

hope thats helps
Laurent Menase
Honored Contributor

Re: libc.a

if you link with cc you don't need to add any
-lc option, it will be made automatically.

Moreover it is dangerous to specify -lc when linking with cc. For instance, if you specify
-lc -lpthread in that order, you will have some
side effect on gethostbyname() which will return an error with h_errno=0.

In the case you need to specify it on the link line, be sure that -lc is the last library in the list
ranganath ramachandra
Esteemed Contributor

Re: libc.a

first, why do you want to get rid of libc.a ?

i dont think there is a replacement for libc.a other than libc.sl, the shared version of the same library.

is it because you want to use the shared version ? if so see if you are forcing an archived link. you can consider linking shared instead.

if you do want an otherwise archived link, i think you will have to take care of this at the link line. if your build script does not explictly use the linker you will have to change it to do so and replace -lc or libc.a with -l:libc.sl in the link line.

(am i missing something ?)
 
--
ranga
[i work for hpe]

Accept or Kudo

ranganath ramachandra
Esteemed Contributor

Re: libc.a

again, if you want to replace it with the shared version, what jacko suggested will work, but you dont need the '-lc' at the end.
 
--
ranga
[i work for hpe]

Accept or Kudo