Sponsored Content
Full Discussion: Pthread compilation error
Top Forums UNIX for Dummies Questions & Answers Pthread compilation error Post 83 by Neo on Friday 13th of October 2000 01:22:56 AM
Old 10-13-2000
There are library objects which are not found. You must determine

(1) if your system has the correct objects; and
(2) if the objects are in the path of your compiler/linker.

This is not easy for a novice to do. Sounds like your package needs pthreads and it has not been installed. Check to see if you have the library. Perhaps try the ldconfig command to look at your ld path for shared objects, etc.



[Edited by Neo on 10-13-2000 at 08:20 PM]
 

10 More Discussions You Might Find Interesting

1. Programming

Regarding compilation error.

Hi All, I facing the following compilation error; when I implementing the following logic. ostrstream ostr; ostr << (( scAxsm.getRecord( i ).getField( 2 ).getShort())%12)!=0?(( scAxsm.getRecord( i ).getField( 2 ).getShort())/12+1) : (( scAxsm.getRecord( i ).getField( 2 ).getShort())/12) <<... (1 Reply)
Discussion started by: sweta
1 Replies

2. Programming

compilation error

Hi, While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of /usr/ccs/bin/as, I get the following error: /usr/ccs/bin/as: No such file or directory /usr/ccs/bin/as: error: write error on output file "<filename>.o" *** Error code 1 clearmake: Error: Build... (2 Replies)
Discussion started by: smanu
2 Replies

3. Programming

Compilation error

I am compiling a software xchm on solaris 10. First i run './configure' There is no error. But when i start compiling using 'gmake' following error shown /usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

4. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using gcc.it is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

5. HP-UX

compilation error

hello everyone, here i am attempting to compile a c++ submodule.OS is HP-UX. here i am getting the following error. ====================================== "Make: Don't know how to make compile. Stop." =================================== could you pls somebody suggest why this error is... (2 Replies)
Discussion started by: mannam srinivas
2 Replies

6. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

7. Shell Programming and Scripting

Pro*c compilation error

Hi, Recently our codes have been migrated to new server, whenever we compile any pro*c programs we receive the following errorl. please help >> make -f lib_util.mk all CC= ucbcc 4Compiling lib_util ### command line files and options (expanded): ### -xO3 -DNULL=0 -v -o lib_util.o... (1 Reply)
Discussion started by: satvd
1 Replies

8. Programming

Error with Pthread

problem solved edited, sorry (1 Reply)
Discussion started by: joey
1 Replies

9. Programming

Compilation Error

I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX. Error: ------ "gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered. "gbsizeprofile.c", line 67.10:... (2 Replies)
Discussion started by: yschd
2 Replies

10. Programming

Help with pthread error

I have written a C code and when i compile it there are 0 warnings and 0 errors, but when i try to run apears: ./client: symbol lookup error: ./client: undefined symbol: pthread_create, version GLIBC_2.1 the part of the code where i have the pthread_creat is: int serverConection(int... (5 Replies)
Discussion started by: SuperStout
5 Replies
LIBDLM(3)						     Library Functions Manual							 LIBDLM(3)

NAME
libdlm - dlm_get_fd, dlm_dispatch, dlm_pthread_init, dlm_ls_pthread_init, dlm_cleanup SYNOPSIS
#include <libdlm.h> int dlm_pthread_init(); int dlm_ls_pthread_init(dlm_lshandle_t lockspace); int dlm_pthread_cleanup(); int dlm_get_fd(void); int dlm_dispatch(int fd); link with -ldlm DESCRIPTION
libdlm provides the programmatic userspace interface to the Distributed Lock manager. It provides all the calls you need to manipulate locks & lockspaces libdlm can be used in pthread or non-pthread applications. For pthread applications simply call the following function before doing any lock operations. If you're using pthreads, remember to define _REENTRANT at the top of the program or using -D_REENTRANT on the compile line. pthreads is the normal way of using the DLM. This way you simply initialize the DLM's thread and all the AST routines will be delivered in that thread. You just call the dlm_lock() etc routines in the main line of your program. If you don't want to use pthreads or you want to handle the dlm callback ASTs yourself then you can get an FD handle to the DLM device and call dlm_dispatch() on it whenever it becomes active. That was ASTs will be delivered in the context of the thread/process that called dlm_dispatch(). int dlm_pthread_init() Creates a thread to receive all lock ASTs. The AST callback function for lock operations will be called in the context of this thread. If there is a potential for local resource access conflicts you must provide your own pthread-based locking in the AST routine. int dlm_ls_pthread_init(dlm_lshandle_t lockspace) As dlm_pthread_init but initializes a thread for the specified lockspace. int dlm_pthread_cleanup() Cleans up the default lockspace threads after use. Normally you don't need to call this, but if the locking code is in a dynamically load- able shared library this will probably be necessary. For non-pthread based applications the DLM provides a file descriptor that the program can feed into poll/select. If activity is detected on that FD then a dispatch function should be called: int dlm_get_fd() Returns a file-descriptor for the DLM suitable for passing in to poll() or select(). int dlm_dispatch(int fd) Reads from the DLM and calls any AST routines that may be needed. This routine runs in the context of the caller so no extra locking is needed to protect local resources. libdlm_lt There also exists a "light" version of the libdlm library called libdlm_lt. This is provided for those applications that do not want to use pthread functions. If you use this library it is important that your application is NOT compiled with -D_REENTRANT or linked with libpthread. EXAMPLES
Create a lockspace and start a thread to deliver its callbacks: dlm_lshandle_t ls; ls = dlm_create_lockspace("myLS", 0660); dlm_ls_pthread_init(ls); ... status = dlm_ls_lock(ls, ... ); Using poll(2) to wait for and dispatch ASTs static int poll_for_ast(dlm_lshandle_t ls) { struct pollfd pfd; pfd.fd = dlm_ls_get_fd(ls); pfd.events = POLLIN; while (!ast_called) { if (poll(&pfd, 1, 0) < 0) { perror("poll"); return -1; } dlm_dispatch(dlm_ls_get_fd(ls)); } ast_called = 0; return 0; } SEE ALSO
libdlm(3), dlm_lock(3), dlm_unlock(3), dlm_open_lockspace(3), dlm_create_lockspace(3), dlm_close_lockspace(3), dlm_release_lockspace(3) libdlm functions July 5, 2007 LIBDLM(3)
All times are GMT -4. The time now is 10:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy