[aspectc-user] Re: Segfault compiling code from SVN on Mac OS X

Stefan Marr aspectc at stefan-marr.de
Wed Dec 3 18:54:42 CET 2008


Hi Olaf,

thanks for this hint.
Works beside the fact, that I had to add an #include <limits.h> to  
SysCall.cc because a definition of PATH_MAX was missing.

Another thing with is already broken a while is the PREFIX constant in  
the Makefile. There is a space at the end, which needs to be removed  
to be able to use make install.

Even if it looks like Puma compiles well, there seems to be another  
problem.
Now I tried to build AspectC++ itself with -/AspectC++$ make  
TARGET=macosx-release SHARED=1
but here ld complains about missing symbols on linking. Actually, it  
seems like not a single symbol can be retrieved from the library:

...
   "Puma::CProject::configure(Puma::Config&)", referenced from:
       vtable for ACProject in ACProject.o
       vtable for ACProject in ac++.o
   "Puma::CCSemVisitor::run(Puma::CTree*, Puma::CStructure*)",  
referenced from:
       Transformer::phase1(Puma::Unit*, Puma::CTranslationUnit*&,  
ModelBuilder&)      in Transformer.o
       Transformer::phase2(Puma::Unit*, Puma::CTranslationUnit*,  
ModelBuilder&)      in Transformer.o
       Transformer::phase2(Puma::Unit*, Puma::CTranslationUnit*,  
ModelBuilder&)      in Transformer.o

The libPuma.a file has a size of 59MB which is almost the double of  
its counterpart build under Ubuntu.

Any ideas what could go wrong while linking?

Debug output of make:
---
Making AspectC++ for TARGET=macosx-release
   Compiler = g++ -DNDEBUG  -I../Puma/include -I/opt/local/include/ 
libxml2  -O2 -g -Wall -pipe -fno-rtti -fno-exceptions
   Linker   = g++ -O2 -g -Wall -pipe -fno-rtti -fno-exceptions  
<objects> -L../Puma/lib/macosx-release -lPuma -L/opt/local/lib -lxml2 - 
lz -lpthread -liconv -lm
---

Thanks
Stefan

On 03 Dec 2008, at 17:40, Olaf Spinczyk wrote:

> Hi Stefan,
>
> I haven't looked into MacOS for some. There might be something  
> broken. The recommended procedure is:
>
> 1. Weave Puma on your Ubuntu machine:
> make EXTENSIONS="gnuext acppext" weave
> ->This only creates the woven sources.
>
> 2. Copy the whole Puma source tree to MacOS
> make EXTENSIONS="gnuext acppext" TARGET=macosx-release compile
> -> This only compiles and does not weave again.
>
> Let's see how it works ...
>
> - Olaf
>
> Stefan Marr wrote:
>> Hi,
>>
>> I am still struggling with this problem.
>> The next thing I've tried was weaving the code on a Ubuntu 8.10  
>> where a '1.0pre4 svn'  package is available.
>> But unfortunately, now I get a segfault on linking while using the  
>> prewoven code on MacOSX:
>>
>> Copying sources not to weave...
>> Generating library header files...
>> /bin/sh: line 1: 96230 Segmentation fault      ac++ -a /Users/smarr/ 
>> Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> CCExprResolveCC.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/CCExprResolveH.ah -a /Users/smarr/Projects/ 
>> PhD/AspectC++/Puma/gen-release/step1/aspects/CExprResolveCC.ah -a / 
>> Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> CExprResolveH.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/WinIfExists.ah -a /Users/smarr/Projects/PhD/ 
>> AspectC++/Puma/gen-release/step1/aspects/WinImportHandler.ah -a / 
>> Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> WinMacros.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/WinAsm.ah -a /Users/smarr/Projects/PhD/AspectC 
>> ++/Puma/gen-release/step1/aspects/WinDeclSpecs.ah -a /Users/smarr/ 
>> Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> WinMemberExplSpec.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/ 
>> gen-release/step1/aspects/WinTypeKeywords.ah -a /Users/smarr/ 
>> Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/WinFriend.ah - 
>> a /Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/ 
>> aspects/ExtAC.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/ExtACBuilderH.ah -a /Users/smarr/Projects/PhD/ 
>> AspectC++/Puma/gen-release/step1/aspects/ExtACBuilderCC.ah -a / 
>> Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> ExtACSyntaxH.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/ExtACSyntaxCC.ah -a /Users/smarr/Projects/PhD/ 
>> AspectC++/Puma/gen-release/step1/aspects/ExtACTree.ah -a /Users/ 
>> smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> ExtACKeywords.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/gen- 
>> release/step1/aspects/ExtGnu.ah -a /Users/smarr/Projects/PhD/AspectC 
>> ++/Puma/gen-release/step1/aspects/ExtGnuCSemDeclSpecs.ah -a /Users/ 
>> smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> PragmaOnceUnitState.ah -a /Users/smarr/Projects/PhD/AspectC++/Puma/ 
>> gen-release/step1/aspects/PragmaOnce.ah -a /Users/smarr/Projects/ 
>> PhD/AspectC++/Puma/gen-release/step1/aspects/TraceSyntax.ah -a / 
>> Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step1/aspects/ 
>> CMatchSyntax.ah -DNDEBUG -I /Users/smarr/Projects/PhD/AspectC++/ 
>> Puma/gen-release/step1/inc -I /Users/smarr/Projects/PhD/AspectC++/ 
>> Puma/gen-release/step1/aspects -I /Users/smarr/Projects/PhD/AspectC+ 
>> +/Puma/gen-release/step1/src -r /Users/smarr/Projects/PhD/AspectC++/ 
>> Puma/gen-release/puma.acp --config /Users/smarr/Projects/PhD/AspectC 
>> ++/Puma/gen-release/puma.cfg --gen_size_type __SIZE_TYPE__ -i -p. - 
>> d/Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/step2
>> make[2]: *** [/Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/ 
>> step2/.inc] Error 139
>> make[1]: *** [step2] Error 2
>> make: *** [src] Error 2
>>
>>
>> Any ideas how to proceed next?
>>
>> Thanks and regards
>> Stefan
>>
>>
>> On 02 Dec 2008, at 17:04, Stefan Marr wrote:
>>
>>> Hi,
>>>
>>> I tried to compile the latest code from the SVN on Mac OS X, since  
>>> the current binaries available are already quite old :-/
>>>
>>> In the first step I installed the 1.0pre3 which is available on  
>>> the web site.
>>> Then I tried compiling the code from SVN, starting with
>>>
>>> -/Puma$ make TARGET=macosx-release
>>>
>>> Here I got an error referring to something like __attribute. So my  
>>> guess was, my GCC might be to old. (Mac OS X standard GCC is 4.01)
>>>
>>> So I installed gcc/g++ 4.3.2.
>>>
>>> Now I get a segfault while compiling:
>>>
>>> Copying sources not to weave...
>>> Calling ac++ on PreFileIncluder.cc...
>>> Calling ac++ on PreprocessorParser.cc...
>>> Calling ac++ on UnitManager.cc...
>>> Calling ac++ on CScanner.cc...
>>> Calling ac++ on CCBuilder.cc...
>>> make[2]: *** [/Users/smarr/Projects/PhD/AspectC++/Puma/gen-release/ 
>>> step2/src/CCBuilder.cc] Segmentation fault
>>> make[1]: *** [step2] Error 2
>>> make: *** [src] Error 2
>>>
>>> I would guess, that there is some bug in the public binary?
>>> ag++ 0.6  built: Mar 16 2006
>>> ac++ 1.0pre3 (Mar 16 2006)
>>>
>>> Would it be possible to either publish a new pre-release or some  
>>> new prewoven code?
>>> Or give me a hint what I could try else, please :)
>>>
>>> Thanks and regards
>>> Stefan
>>
>> _______________________________________________
>> 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