Sponsored Content
Operating Systems HP-UX sem_open(), -lrt and creating a library Post 302094912 by apadha on Thursday 2nd of November 2006 01:06:21 AM
Old 11-02-2006
sem_open(), -lrt and creating a library

I am on HP-UX delta B.11.11

I am using sem_open() and compiling/linking the library by specifying -lrt.

Then, I am creating library like below:

ar cr $libdir/liboscfe.a `cat fe.libs.$$ com.libs.$$`
ranlib $libdir/liboscfe.a

Now, I am compiling another utility sch2db which requires this library liboscfe.a as below:

aCC -D_REENTRANT -mt -g0 +DA2.0W +DS2.0 +Z -I/rr/h -Wl,+s /rr/lib//liboscfe.a -Wl,-a,default -lpthread -lm -o /rr/dbg//bin/sch2db

Compilation of sch2db requires library liboscfe.a, but I do not want to use -lrt flag here. Without -lrt I am getting errors given below:
......
ld: Unsatisfied symbol "sem_open" in file /rr/lib//liboscfe.a[vsllcr.o]
ld: Unsatisfied symbol "sem_close" in file /rr/lib//liboscfe.a[vsllcr.o]
ld: Unsatisfied symbol "sem_post" in file /rr/lib//liboscfe.a[vsllcr.o]
ld: Unsatisfied symbol "sem_wait" in file /rr/lib//liboscfe.a[vsllcr.o]
4 errors.

Could anybody please suggest a solution?

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sem_open problem

I can't compile these codes with g++. my system is linux (kernel is 2.4.0 ). When I try to compile this program with g++ -o semw semw.cpp It always tells me that sem_open sem_close,sem_post do not exist.But I have checked semaphore.h,I can not find any problems. Anyone can compile these codes... (2 Replies)
Discussion started by: lance
2 Replies

2. Linux

load error while creating shared library

Hi, I am trying to create shared library. When i run the script to build the library i get these errors ld: warning: option -o appears more than once, first setting taken ld: fatal: file libgc.so.0: open failed: No such file or directory ld: fatal: File processing errors. No output written... (0 Replies)
Discussion started by: masg1
0 Replies

3. Shell Programming and Scripting

find command nonrecurslu listing ls -lrt

---------------------------------------------------------------------- I have tried find . type -f -exec ls -lrt {} \; but it listed files recursively ,I need only that dir files not internal dir file. --------------------------------------------------------------------- (8 Replies)
Discussion started by: RahulJoshi
8 Replies

4. UNIX for Dummies Questions & Answers

" ls -lrt " not working ! --- Need a insight from a expert .

Hi ! All This might be a silly question.. to experts in unix. but defintely its a interesting question and I want to know the root cause. Here is the problem.... I have a Linux OS box. It has diff files systems. When I go to a DIR like this /RootDIR/NFS/myDIR and give ls -lart .. it... (4 Replies)
Discussion started by: dashok.83
4 Replies

5. UNIX for Dummies Questions & Answers

using ls -lrt instead of ls

I have a requirement in which I shud use ls -lrt instead of ls command because when we use ls command we get an error..the script part where i get error is given below for SAPRESPONSEFILES in `ls $SAPRESPONSEGOFILE | sed "s/go/dat/g"` basically the script processes the files of format... (11 Replies)
Discussion started by: praviper
11 Replies

6. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

7. Shell Programming and Scripting

Problems with ls -lrt

I am doing ls -lrt and it does not respond and have to close the xterm ls works ok (4 Replies)
Discussion started by: kristinu
4 Replies

8. Shell Programming and Scripting

want to concatenate multiple files based on the rest of ls -lrt

uadm@4132> ls -lrt -rw------- 1 uadm uadm 3811819 Jun 6 04:08 data_log-2010.05.30-10:04:08.txt -rw------- 1 uadm uadm 716246 Jun 13 01:38 data_log-2010.06.06-10:04:08.txt -rw------- 1 uadm uadm 996 Jun 13 04:00 data_log-2010.06.06-10:04:22.txt -rw------- 1 uadm uadm 7471 Jun 20 02:03... (5 Replies)
Discussion started by: mail2sant
5 Replies

9. Linux

./configure problem for libsf library due to apparently missing libdb library.

Hello, ./configure script fails to configure libsf. Please check the following last few lines of configure script error. checking for db1/db.h... no checking for db.h... yes checking for dbopen in -ldb1... no configure: error: No libdb? No libsf. But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies

10. UNIX for Dummies Questions & Answers

What does total no. of files in ls -lrt o/p means?

when we fire ls -lrt command we see o/p as total 16 drwx------ 9 root root 8192 May 8 2002 lost+found drwxr-xr-x 2 root root 512 Jun 14 2002 TT_DB drwxrwxr-x 2 root root 512 Jul 31 2002 mail here total no. of files is always greater than... (4 Replies)
Discussion started by: Jcpratap
4 Replies
librt(3LIB)							Interface Libraries						       librt(3LIB)

NAME
librt, libposix4 - POSIX.1b Realtime Extensions library SYNOPSIS
cc [ flag... ] file... -lrt [ library... ] DESCRIPTION
Functions in this library provide most of the interfaces specified by the POSIX.1b Realtime Extension. See standards(5). Specifically, this includes the interfaces defined under the Asynchronous I/O, Message Passing, Process Scheduling, Realtime Signals Extension, Sema- phores, Shared Memory Objects, Synchronized I/O, and Timers options. The interfaces defined under the Memory Mapped Files, Process Memory Locking, and Range Memory Locking options are provided in libc(3LIB). See the man pages for the individual interfaces in section 3RT for information on required headers. The name libposix4 is maintained for backward compatibility and should be avoided. librt is the preferred name for this library. INTERFACES
The shared objects librt.so.1 and libposix4.so.1 provide the public interfaces defined below. See intro(3) for additional information on shared object interfaces. aio_cancel aio_error aio_fsync aio_read aio_return aio_suspend aio_waitn aio_write clock_getres clock_gettime clock_nanosleep clock_settime close fdatasync fork lio_listio mq_close mq_getattr mq_notify mq_open mq_receive mq_reltimedreceive_np mq_reltimedsend_np mq_send mq_setattr mq_timedreceive mq_timedsend mq_unlink nanosleep sched_get_priority_max sched_get_priority_min sched_getparam sched_getscheduler sched_rr_get_interval sched_setparam sched_setscheduler sched_yield sem_close sem_destroy sem_getvalue sem_init sem_open sem_post sem_reltimedwait_np sem_timedwait sem_trywait sem_unlink sem_wait shm_open shm_unlink sigqueue sigtimedwait sigwaitinfo timer_create timer_delete timer_getoverrun timer_gettime timer_settime The following interfaces are unique to the 32-bit version of this library: aio_cancel64 aio_error64 aio_fsync64 aio_read64 aio_return64 aio_suspend64 aio_waitn64 aio_write64 lio_listio64 FILES
/lib/librt.so.1 shared object /lib/64/librt.so.1 64-bit shared object file /lib/libposix4.so.1 shared object /lib/64/libposix4.so.1 64-bit shared object file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsl (32-bit) | +-----------------------------+-----------------------------+ | |SUNWcslx (64-bit) | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
pvs(1), intro(3), libc(3LIB), attributes(5), standards(5) SunOS 5.10 24 Mar 2004 librt(3LIB)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy