Package: ccs
Version: 0.trunk20050206-1
Severity: serious
Tags: patch

ccs fails to build because there are undefined references when it
tries to link ccs_tool:

> gcc -Wall -I. -I../config -I../include -I../lib -Wall -O2 
> -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE `xml2-config --cflags` 
> -DCCS_RELEASE_NAME=\"DEVEL.1121908234\" -I. -I../config -I../include -I../lib 
> -o ccs_tool ccs_tool.c update.c upgrade.c old_parser.c -L../lib `xml2-config 
> --libs` -L//usr/lib -lccs -lmagma -lmagmamsg -ldl
> update.c: In function 'get_doc_version':
> update.c:44: warning: pointer targets in passing argument 1 of 
> 'xmlXPathEvalExpression' differ in signedness
> update.c:58: warning: pointer targets in passing argument 1 of 'strlen' 
> differ in signedness
> update.c:63: warning: pointer targets in passing argument 1 of 'strlen' 
> differ in signedness
> update.c:70: warning: pointer targets in passing argument 1 of 'atoi' differ 
> in signedness
> update.c: In function 'update':
> update.c:153: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> upgrade.c: In function 'upgrade_device_archive':
> upgrade.c:190: warning: dereferencing type-punned pointer will break 
> strict-aliasing rules
> /usr/lib/libmagma.a(global.o): In function `clu_connect':
> : undefined reference to `pthread_rwlock_wrlock'
...
> /usr/lib/libmagma.a(global.o): In function `clu_local_nodeid':
> : undefined reference to `pthread_rwlock_unlock'
> collect2: ld returned 1 exit status

The attached patch adds -lpthread to the link command, which fixes
this problem.

-- 
Matt
only in patch2:
unchanged:
--- ccs-0.trunk20050206.orig/ccs_tool/Makefile
+++ ccs-0.trunk20050206/ccs_tool/Makefile
@@ -25,7 +25,7 @@
 endif
 
 LDFLAGS+= -L${ccs_libdir} `xml2-config --libs` -L${libdir}
-LOADLIBES+= -lccs -lmagma -lmagmamsg -ldl
+LOADLIBES+= -lccs -lmagma -lmagmamsg -ldl -lpthread
 
 all: ccs_tool
 

Attachment: signature.asc
Description: Digital signature

Reply via email to