Operating System - HP-UX
1834584 Members
3597 Online
110069 Solutions
New Discussion

link error: cma_socket, cma_close Unsatisfied symbols

 
SOLVED
Go to solution
Ben Jia
New Member

link error: cma_socket, cma_close Unsatisfied symbols

Hi, experts,
My c code is compiled OK on HPUX11. I am trying to link my c code with a library. I have a sample makefile from the company who created the library, but the makefile is for Solaris. The link part in the sample makefile contains these:
-lthread -lpthread -lsocket -lnsl -lc

I tried to link with the same options, but ld complains that thread and socket libraries not found. Then I remove these two, then ld complains this:
/usr/ccs/bin/ld: Unsatisfied symbols:
cma_socket (first referenced in ./lib/libaceclnt.a(acexport.o)) (code)
pthread_condattr_default (first referenced in ./lib/libaceclnt.a(acexport.o)) (data)
cma_sendto (first referenced in ./lib/libaceclnt.a(acexport.o)) (code)
cma_recvfrom (first referenced in ./lib/libaceclnt.a(acexport.o)) (code)
cma_close (first referenced in ./lib/libaceclnt.a(acexport.o)) (code)
pthread_mutexattr_default (first referenced in ./lib/libaceclnt.a(acexport.o)) (data)

Anyone can tell me which libray is for these symbols? Thanks in advance!
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: link error: cma_socket, cma_close Unsatisfied symbols

libcma.sl

The easy way to find this stuff is to cd to /usr/lib.

Then nm *.a *.sl > liblist
You can then vi liblist and search for symbols. The file that contains the symbols will be a few lines or a few tens of lines above.

Clay
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor
Ben Jia
New Member

Re: link error: cma_socket, cma_close Unsatisfied symbols

Hi, both,

I did get compile with the libcma.a, but I got Bus Error when run it. From the output of my program, it seems it crashs when try to initialize a socket for communication. Do you guys have any further idea?

I also noticed that I can also get compiled with libdce.a.