[aspectc-user] Building from source

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Fri Mar 10 09:41:56 CET 2006


Hi Eric,

there are two ways of compiling Puma and AspectC++:

1. compile from the "woven sources"

    => use "make compile" to compile Puma, no ag++ is needed

2. compile from the  woven sources

    => use "make" to compile Puma, ag++ is used to weave the code

The problems with linking ac++ are due to the libxml2, which references 
libpthread. If you try to link libpthread statically, you get the 
warnings below. Therefore, we configure the libxml2 on our own as 
described in AspectC++/README.

Alternatively, you can link libxml2 dynamically. However, therefore you 
would have to modify the AspectC++ Makefile. You could also use Reinhard 
Tartlers Debian packages (see downloads page).

Regards,

Olaf


Eric Schaefer wrote:
> Hello List!
> 
> I am trying to build ac-1.0pre2. First strange thing: I had to install
> the binary ac++ and ag++ to be able to compile at all, since ag++ is
> needed to compile Puma and Puma is needed to compile ac++ and ag++.
> 
> Well, with ac++ and ag++ installed I was able to compile Puma, but when
> trying to build ac++ I get:
> 
>>Linking bin/linux-release/ac++.
>>/usr/lib/libxml2.a(nanohttp.o): In function `xmlNanoHTTPConnectHost':
>>: warning: Using 'getaddrinfo' in statically linked applications
>>requires at runtime the shared libraries from the glibc version used
>>for linking
>>/usr/lib/libxml2.a(nanohttp.o): In function `xmlNanoHTTPConnectHost':
>>: warning: Using 'gethostbyname' in statically linked applications
>>requires at runtime the shared libraries from the glibc version used
>>for linking
>>/usr/lib/libxml2.a(threads.o): In function `xmlRMutexLock':
>>: undefined reference to `pthread_cond_wait'
>>collect2: ld returned 1 exit status
>>make: *** [bin/linux-release/ac++] Error 1
> 
> Seems like ld doesn't know where pthread_cond_wait() comes from, so I
> tried "LDFLAGS=-lpthread make", but ld doesn't like it either.
> 
> The machine is running Ubuntu Linux 5.10.
> 
> $ uname -a
> Linux zeus 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686 GNU/Linux
> $ ls -lF /usr/lib/libxml2*
> -rw-r--r--  1 root root 1379886 Sep  6  2005 /usr/lib/libxml2.a
> -rw-r--r--  1 root root     799 Sep  6  2005 /usr/lib/libxml2.la
> lrwxrwxrwx  1 root root      17 Mar  9 19:32 /usr/lib/libxml2.so ->
> libxml2.so.2.6.21
> lrwxrwxrwx  1 root root      17 Dec 29 19:49 /usr/lib/libxml2.so.2 ->
> libxml2.so.2.6.21
> -rw-r--r--  1 root root 1093792 Sep  6  2005 /usr/lib/libxml2.so.2.6.21
> 
> What am I doing wrong?
> 
> Regards,
> Eric
> 
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user




More information about the aspectc-user mailing list