[aspectc-user] Problem getting started
Olaf Spinczyk
Olaf.Spinczyk at informatik.uni-erlangen.de
Thu Nov 24 12:20:35 CET 2005
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. You have lots of -I directives. Therefore, I assume that you
have lots of complex include files.
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.
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
>
>
More information about the aspectc-user
mailing list