I am porting C code to Reliant Unix 5.45 and I ran into compile errors related to POSIX threads. It appears that I have an old version of Posix threads, because I fixed the compile error by changing the 2nd parameter of pthread_mutex_init from NULL to pthread_mutexattr_default:
to:
Now, when I link, I get many errors:
cc -Rmsg_wrap -Kthread,signed,PIC -DSINIX -DRELUNIX54 cbmaint.o -o cbmaint -L. -lvst -lcb63 -lm -lloc -lqutil -L. -lloc -lcb63 -lm -lqutil
ld: ./libloc.so: warning: attempted multiple inclusion of file
ld: ./libcb63.so: warning: attempted multiple inclusion of file
ld: ./libqutil.so: warning: attempted multiple inclusion of file
Undefined first referenced
symbol in file
__nr_creat /lib/libcma.so
__nr_pipe /lib/libcma.so
__nr_fcntl /lib/libcma.so
doscan_mutex /lib/libcma.so
__nr_poll /lib/libcma.so
sprint_mutex /lib/libcma.so
__nr_ioctl /lib/libcma.so
__nr_getpmsg /lib/libcma.so
_iob_mutex /lib/libcma.so
__nr_creat64 /lib/libcma.so
libc_mutex /lib/libcma.so
__nr_writev /lib/libcma.so
__nr_readv /lib/libcma.so
__nr_setitimer /lib/libcma.so
__nr_close /lib/libcma.so
__nr_sigismember /lib/libcma.so
set_pthread_symb /opt/CDS++/lib/pthr_dce_c.o
__ree_system /lib/libcma.so
rtld_mutex /lib/libcma.so
__nr_sigaction /lib/libcma.so
libc_r_init /opt/CDS++/lib/pthr_dce_c.o
__nr_write /lib/libcma.so
__nr_open64 /lib/libcma.so
__nr_read /lib/libcma.so
__nr_sigaddset /lib/libcma.so
__nr_sigprocmask /lib/libcma.so
fpalloc_mutex /lib/libcma.so
__ree_popen /lib/libcma.so
__nr_fork /lib/libcma.so
__nr_execve /lib/libcma.so
__nr_dup /lib/libcma.so
__nr_open /lib/libcma.so
malloc_mutex /lib/libcma.so
__nr_getmsg /lib/libcma.so
__nr_putpmsg /lib/libcma.so
__nr_putmsg /lib/libcma.so
Does anyone know why I'm getting these link errors? If I get the latest version of POSIX threads, will these errors go away? Where do I download POSIX thread libraries?
Thanks
Code:
pthread_mutex_init (pLock, NULL)
to:
Code:
pthread_mutex_init (pLock, pthread_mutexattr_default)
Now, when I link, I get many errors:
cc -Rmsg_wrap -Kthread,signed,PIC -DSINIX -DRELUNIX54 cbmaint.o -o cbmaint -L. -lvst -lcb63 -lm -lloc -lqutil -L. -lloc -lcb63 -lm -lqutil
ld: ./libloc.so: warning: attempted multiple inclusion of file
ld: ./libcb63.so: warning: attempted multiple inclusion of file
ld: ./libqutil.so: warning: attempted multiple inclusion of file
Undefined first referenced
symbol in file
__nr_creat /lib/libcma.so
__nr_pipe /lib/libcma.so
__nr_fcntl /lib/libcma.so
doscan_mutex /lib/libcma.so
__nr_poll /lib/libcma.so
sprint_mutex /lib/libcma.so
__nr_ioctl /lib/libcma.so
__nr_getpmsg /lib/libcma.so
_iob_mutex /lib/libcma.so
__nr_creat64 /lib/libcma.so
libc_mutex /lib/libcma.so
__nr_writev /lib/libcma.so
__nr_readv /lib/libcma.so
__nr_setitimer /lib/libcma.so
__nr_close /lib/libcma.so
__nr_sigismember /lib/libcma.so
set_pthread_symb /opt/CDS++/lib/pthr_dce_c.o
__ree_system /lib/libcma.so
rtld_mutex /lib/libcma.so
__nr_sigaction /lib/libcma.so
libc_r_init /opt/CDS++/lib/pthr_dce_c.o
__nr_write /lib/libcma.so
__nr_open64 /lib/libcma.so
__nr_read /lib/libcma.so
__nr_sigaddset /lib/libcma.so
__nr_sigprocmask /lib/libcma.so
fpalloc_mutex /lib/libcma.so
__ree_popen /lib/libcma.so
__nr_fork /lib/libcma.so
__nr_execve /lib/libcma.so
__nr_dup /lib/libcma.so
__nr_open /lib/libcma.so
malloc_mutex /lib/libcma.so
__nr_getmsg /lib/libcma.so
__nr_putpmsg /lib/libcma.so
__nr_putmsg /lib/libcma.so
Does anyone know why I'm getting these link errors? If I get the latest version of POSIX threads, will these errors go away? Where do I download POSIX thread libraries?
Thanks