[aspectc-user] compiling ac++ sources: pthreads problem

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Jan 29 12:54:53 CET 2004


Hi,

shyam sunder wrote:
> Hi,
> 
> I tried compiling the ac++ 0.7.2 sources and I got the
> following error:
> 
> ---------------------------
> Linking ac++.
> g++2 -o ac++  -fno-rtti -fno-exceptions -O6
> -Wno-deprecated -I../Puma/include `xml2-config
> --cflags`  -pipe  ObjFiles/ac++.o ObjFiles/ACConfig.o
> ObjFiles/ACWeaver.o ObjFiles/AdviceInfo.o
> ObjFiles/AdviceRepo.o ObjFiles/AspectInfo.o
> ObjFiles/AspectRepo.o ObjFiles/CodeWeaver.o
> ObjFiles/FileRepo.o ObjFiles/IncludeExpander.o
> ObjFiles/IntroductionInfo.o ObjFiles/JoinPoint.o
> ObjFiles/JoinPointLoc.o ObjFiles/JoinPointPlan.o
> ObjFiles/JoinPointRepo.o ObjFiles/JPAdvice.o
> ObjFiles/LineDirectiveMgr.o
> ObjFiles/MemberProtections.o ObjFiles/Naming.o
> ObjFiles/OrderPlannerImpl.o ObjFiles/Plan.o
> ObjFiles/PointCut.o ObjFiles/PointCutContext.o
> ObjFiles/PointCutEvaluator.o ObjFiles/PointCutExpr.o
> ObjFiles/PointCutInfo.o ObjFiles/RepoPosKey.o
> ObjFiles/Repository.o ObjFiles/RepoXMLNode.o
> ObjFiles/ThisJoinPoint.o ObjFiles/TrackerDog.o
> ObjFiles/Transformer.o ObjFiles/WeaverBase.o
> -L../Puma/lib -Wl,-Bstatic -lPuma `xml2-config --libs`
>   -Wl,-Bdynamic
> /usr/bin/ld: cannot find -lpthread
> collect2: ld returned 1 exit status
> make: *** [ac++] Error 1
> 
> ----------------------------------
> 
> My platform is Madrake 9.2 with g++ 2.95.3 being used
> as g++2.
> 
> The original compiler on the distro is 3.3.1
> 
> Can somebody throw some light on this?
> 
> Thanks.
> Shyam
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user

We had similar problems with Debian and Suse Linux systems. To solve the 
problem we had to link the pthread library dynamically (in front of 
-Wl,-Bstatic):

g++ -Wno-deprecated -I ~/oldheaders/for-g++ -o ac++  -fno-rtti 
-fno-exceptions -O6 -Wno-deprecated -I../Puma/include `xml2-config 
--cflags`  -pipe  ObjFiles/ac++.o ObjFiles/ACConfig.o 
ObjFiles/ACWeaver.o ObjFiles/AdviceInfo.o ObjFiles/AdviceRepo.o 
ObjFiles/AspectInfo.o ObjFiles/AspectRepo.o ObjFiles/Binding.o 
ObjFiles/CFlow.o ObjFiles/CodeWeaver.o ObjFiles/Condition.o 
ObjFiles/FileRepo.o ObjFiles/IncludeExpander.o 
ObjFiles/IntroductionInfo.o ObjFiles/JoinPoint.o ObjFiles/JoinPointLoc.o 
ObjFiles/JoinPointPlan.o ObjFiles/JoinPointRepo.o ObjFiles/JPAdvice.o 
ObjFiles/LineDirectiveMgr.o ObjFiles/MemberProtections.o 
ObjFiles/Naming.o ObjFiles/OrderPlannerImpl.o ObjFiles/Plan.o 
ObjFiles/PointCut.o ObjFiles/PointCutContext.o 
ObjFiles/PointCutEvaluator.o ObjFiles/PointCutExpr.o 
ObjFiles/PointCutInfo.o ObjFiles/RepoPosKey.o ObjFiles/Repository.o 
ObjFiles/RepoXMLNode.o ObjFiles/ThisJoinPoint.o ObjFiles/TrackerDog.o 
ObjFiles/Transformer.o ObjFiles/WeaverBase.o -lpthread -L../Puma/lib 
-Wl,-Bstatic -lPuma `xml2-config --libs`   -Wl,-Bdynamic

I hope this also helps in your case.

BTW: maybe you should wait for 0.8pre1 which will be published today or 
tomorrow. This problem is already fixed there.

Regards,

Olaf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3142 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20040129/13d560bc/attachment.bin>


More information about the aspectc-user mailing list