[aspectc-user] Problem getting started

Mark Hampton mark.hampton at certess.com
Thu Nov 24 12:28:21 CET 2005


Hi Olaf,

Thanks for the quick response.

On Thursday 24 November 2005 12:20, Olaf Spinczyk wrote:
> Hi Mark,
>
> ac++ crashes after printing "- Parsing ...". This means that probably
> some code in xyz.cpp or any of the included header files causes the
> problem. 

It compiles fine with g++

> You have lots of -I directives. Therefore, I assume that you 
> have lots of complex include files.

yes

>
> Of course, ac++ should not crash. We have to consider this as a bug. In
> order to find the reason, fix the bug, and to find a workaround quickly
> I would put all the code in xyz.cpp into comments. Then ac++ should be
> able to compile the code. After that I would step by step uncomment
> #include directives (starting with the standard C++ headers). During
> these steps I would use no aspect. In general I recommand to try to
> compile the unmodified code with ag++ or ac++ + g++ first. When this
> works you can continue with aspects.
>
> I would be happy, if one could take any software that is accepted by g++
> and compile it with ag++. However, the reality if different: A lot of
> software, even complex software, can be compiled with ag++, but very
> often we also discover parser or weaver problems when ac++ is tested
> with code from real-world projects. The situation constantly improves,
> but at the moment it is better to follow the "step by step" approach and
> report all problems and parser bugs which you discover.

I'll try to build a smaller example.

	Mark
>
> Best regards,
>
> Olaf
>
> Mark Hampton wrote:
> > Hi,
> >
> > I'm trying to experiment with AspectC++ and get the following seg fault
> > when running ag++
> >
> > I am trying to use the trace aspect which comes as an example with
> > aspectc++
> >
> > Any help much appreciated.
> >
> > 	Mark
> >
> >
> > make[2]: Entering directory
> > `/home/markh/proj/xyz/solution/wqp/main_line/src/xyz'
> > ../tools/aspectc++/ac-1.0pre1/ag++ -v 9 -p ../aspects/ -p .. --Xcompiler
> > -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -W -g
> > -DSVN_REVISION= -g -O0 -D_REENTRANT  -Dghy_USER_DEFINED_BASE_CLASS
> > -DNDEBUG -Dry_THREAD_SUPPORT -Dry_SHARED -Dry_TABLET_SUPPORT
> > -Dry_NO_DEBUG -I/usr/lib/ry3/mkspecs/default -I.-I../xyz -I../TCL
> > -I../datamodel -I../database -I../log -I../misc -I../ghy/vhdl
> > -I../ghy/containers -I../ghy/util -I../qualification/progress
> > -I../qualification/simulators -I../qualification/common -I../werReport
> > -I../DB/build_unix -Itcl/include -I../libedit/include -I../flexlm/include
> > -I/usr/include
> > -I/usr/lib/ry3/include -I.ui/ -I.moc/ -o .obj/xyz.o xyz.cpp
> > *
> > *
> > * AG++ Configuration:
> > *   Create puma.config: 1
> > *   Aspect C++ weaver:  ../tools/aspectc++/ac-1.0pre1/ac++
> > *   C++ compiler:       g++
> > *   Files:               xyz.cpp
> > *   Options (G++):       -v -c -pipe -O2 -march=i586 -mcpu=i686
> > -fmessage-length=0 -Wall -W -g -DSVN_REVISION= -g -O0 -D_REENTRANT
> > -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG -Dry_THREAD_SUPPORT -Dry_SHARED
> > -Dry_TABLET_SUPPORT -Dry_NO_DEBUG -I"/usr/lib/ry3/mkspecs/default" -I"."
> > -I"../xyz" -I"../TCL" -I"../datamodel" -I"../database" -I"../log"
> > -I"../misc" -I"../ghy/vhdl" -I"../ghy/containers" -I"../ghy/util"
> > -I"../qualification/progress" -I"../qualification/simulators"
> > -I"../qualification/common" -I"../werReport" -I"../DB/build_unix"
> > -I"tcl/include" -I"../libedit/include" -I"../flexlm/include"
> > -I"/usr/include" -I"/usr/lib/ry3/include" -I".ui/" -I".moc/" -I"."
> > *   Options (AC++):      -v9 -p"../aspects/" -p".." -DSVN_REVISION=
> > -D_REENTRANT -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG -Dry_THREAD_SUPPORT
> > -Dry_SHARED -Dry_TABLET_SUPPORT -Dry_NO_DEBUG
> > -I"/usr/lib/ry3/mkspecs/default" -I"." -I"../xyz" -I"../TCL"
> > -I"../datamodel" -I"../database" -I"../log" -I"../misc" -I"../ghy/vhdl"
> > -I"../ghy/containers" -I"../ghy/util" -I"../qualification/progress"
> > -I"../qualification/simulators" -I"../qualification/common"
> > -I"../werReport" -I"../DB/build_unix" -I"tcl/include"
> > -I"../libedit/include" -I"../flexlm/include" -I"/usr/include"
> > -I"/usr/lib/ry3/include" -I".ui/" -I".moc/"
> > *   Options (total):     -v9 -v -p"../aspects/" -p".." -c -pipe -O2
> > -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -W -g -DSVN_REVISION= -g
> > -O0 -D_REENTRANT -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG
> > -Dry_THREAD_SUPPORT -Dry_SHARED -Dry_TABLET_SUPPORT -Dry_NO_DEBUG
> > -I"/usr/lib/ry3/mkspecs/default" -I"." -I"../xyz" -I"../TCL"
> > -I"../datamodel" -I"../database" -I"../log" -I"../misc" -I"../ghy/vhdl"
> > -I"../ghy/containers" -I"../ghy/util" -I"../qualification/progress"
> > -I"../qualification/simulators" -I"../qualification/common"
> > -I"../werReport" -I"../DB/build_unix" -I"tcl/include"
> > -I"../libedit/include" -I"../flexlm/include" -I"/usr/include"
> > -I"/usr/lib/ry3/include" -I".ui/" -I".moc/" xyz.cpp -I"."
> > *   Weave: 1 Compile: 1 Link: 0
> > *
> > *
> > * Generating Puma configuration file
> >   - Parsing output of g++ compiler
> >   - Executing: "g++"  -v -c -pipe -O2 -march=i586 -mcpu=i686
> > -fmessage-length=0 -Wall -W -g -DSVN_REVISION= -g -O0 -D_REENTRANT
> > -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG -Dry_THREAD_SUPPORT -Dry_SHARED
> > -Dry_TABLET_SUPPORT -Dry_NO_DEBUG -I"/usr/lib/ry3/mkspecs/default" -I"."
> > -I"../xyz" -I"../TCL" -I"../datamodel"-I"../database" -I"../log"
> > -I"../misc" -I"../ghy/vhdl" -I"../ghy/containers" -I"../ghy/util"
> > -I"../qualification/progress" -I"../qualification/simulators"
> > -I"../qualification/common" -I"../werReport" -I"../DB/build_unix"
> > -I"tcl/include" -I"../libedit/include" -I"../flexlm/include"
> > -I"/usr/include" -I"/usr/lib/ry3/include" -I".ui/" -I".moc/" -I"." -E -dM
> > -v -x c++ "/dev/null" 2>xyz.cpp.err.out 1>xyz.cpp.std.out
> >   - Exit: Success
> >   - removing temporary file: xyz.cpp.std.out
> >   - removing temporary file: xyz.cpp.err.out
> >   - Writing puma configuration file
> > * Weaving
> >   - Executing: "../tools/aspectc++/ac-1.0pre1/ac++" --config
> > "puma.config" -v9 -p"../aspects/" -p".." -DSVN_REVISION= -D_REENTRANT
> > -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG -Dry_THREAD_SUPPORT -Dry_SHARED
> > -Dry_TABLET_SUPPORT -Dry_NO_DEBUG -I"/usr/lib/ry3/mkspecs/default" -I"."
> > -I"../xyz" -I"../TCL" -I"../datamodel" -I"../database" -I"../log"
> > -I"../misc" -I"../ghy/vhdl" -I"../ghy/containers" -I"../ghy/util"
> > -I"../qualification/progress" -I"../qualification/simulators"
> > -I"../qualification/common" -I"../werReport" -I"../DB/build_unix"
> > -I"tcl/include" -I"../libedit/include" -I"../flexlm/include"
> > -I"/usr/include" -I"/usr/lib/ry3/include" -I".ui/" -I".moc/" -c "xyz.cpp"
> > -o ".obj/xyz.acc" * Running ac++ 1.0pre1
> > * Handling Translation Unit `xyz.cpp'.
> >   - Path "xyz.cpp"
> >   - Inserting namespace AC
> >   - Parsing ...
> > /usr/include/linux/compiler.h:69: warning: Redefinition of macro
> > `__attribute_used__'
> > /usr/include/sys/cdefs.h:192: previous definition here
> > /usr/include/linux/compiler.h:87: warning: Redefinition of macro
> > `__attribute_pure__'
> > /usr/include/sys/cdefs.h:183: previous definition here
> > error: Execution failed: "../tools/aspectc++/ac-1.0pre1/ac++" --config
> > "puma.config"  -v9 -p"../aspects/" -p".." -DSVN_REVISION= -D_REENTRANT
> > -Dghy_USER_DEFINED_BASE_CLASS -DNDEBUG -Dry_THREAD_SUPPORT -Dry_SHARED
> > -Dry_TABLET_SUPPORT -Dry_NO_DEBUG -I"/usr/lib/ry3/mkspecs/default" -I"."
> > -I"../xyz" -I"../TCL" -I"../datamodel" -I"../database" -I"../log"
> > -I"../misc" -I"../ghy/vhdl" -I"../ghy/containers" -I"../ghy/util"
> > -I"../qualification/progress" -I"../qualification/simulators"
> > -I"../qualification/common" -I"../werReport" -I"../DB/build_unix"
> > -I"tcl/include" -I"../libedit/include" -I"../flexlm/include"
> > -I"/usr/include" -I"/usr/lib/ry3/include" -I".ui/" -I".moc/" -c "xyz.cpp"
> > -o ".obj/xyz.acc" - Exitcode: 11 (should be 0 )
> > make[2]: *** [.obj/xyz.o] Error 1
> > make[2]: Leaving directory
> > `/home/markh/proj/xyz/solution/wqp/main_line/src/xyz'
> > make[1]: *** [sub-xyz] Error 2
> > make[1]: Leaving directory
> > `/home/markh/proj/xyz/solution/wqp/main_line/src' make: *** [xyz] Error 2

-- 
Mark.Hampton at Certess.com
Co-fondateur
Tél: +33 4 76 89 29 19
Fax: +33 4 76 43 03 57
Le Xenon
340 rue de l'eygala
Centr'Alp
38430 Moirans
France

This e-mail message is intended for the addressee(s) only and may contain
confidential and or privileged information.  If you are not the intended
recipient of this e-mail message, you should not read, copy, forward or
otherwise distribute or further disclose the information in it. If you have
received this e-mail message in error, please contact Certess SA at
telephone number +33 4 76 43 98 46, fax number +33 4 76 43 03 03 or contact
the originator of this e-mail message via e-mail and delete all copies of
this message from your computer or network, thank you.




More information about the aspectc-user mailing list