Bug#754697: Fwd: Please package the AspectClang branch in debian

Reinhard Tartler siretart at gmail.com
Sun Jul 13 13:30:29 UTC 2014


Package: aspectc++,llvm-toolchain-3.4
X-Debbugs-CC: aspectc-developers at aspectc.org, olaf.spinczyk at tu-dortmund.de


Hi,

​​
Backround:
AspectC++ is a language extension to C++ that brings AspectJ-like AOP
features to C++. For more information, please see the upstream homepage at
http://aspectc.org

Upstream has asked me to explore the options for updating the aspectc++
package to the AspectClang
​ ​
branch,
​ ​
which
​ ​
was merged this weekend to svn HEAD:

https://svn.aspectc.org/repos/AspectC++/trunk

So far, AspectC++ has used the Puma C++ Parsing and Manipulation library.
In the last years, work has been done to port AspectC++ to using LLVM. Its
readme file gives the following instructions to building AspectC++ against
LLVM:

​​
Installation
============
1. Download LLVM 3.4 and clang 3.4 from llvm.org.
2. Unpack in the AspectC++ root.
2.1. Rename the extracted directory to llvm.
2.2. Unpack and rename clang into llvm/tools/clang.
3. Apply
*​​aspectclang-3.4.diff* in the new clang directory.
     cd llvm/tools/clang && patch -p0 <
../../../AspectC++/aspectclang-3.4.diff
4. Run in the LLVM directory: ./configure --enable-optimized
--enable-assertions --disable-terminfo --disable-clang-arcmt
--disable-clang-static-analyzer --enable-targets=x86
4.1. If you have a cross-compilation or 32 bit userland with a 64 bit
kernel add
--target=your-target to the configure line. The target argument can be
determined with:
    gcc -v 2>&1 | grep Target
   It might also be necessary to specify the name of the installed compiler
as in ...
   ./configure --enable-optimized --enable-assertions --disable-terminfo
--disable-clang-arcmt --disable-clang-static-analyzer --enable-targets=x86
--target=i486-linux-gnu CC=gcc CXX=g++
5. Run: make REQUIRES_RTTI=1
   You may add -j<Number> on a multicore machine to reduce compilation time.
6. Compile AspectC++ as usual.


For Debian, we would need to use the Debian LLVM sources instead of the
ones from
​ ​
LLVM
​ ​
upstream. The challenge here is the patch aspectclang-3.4.diff that needs
to be applied to the LLVM sources:


>> diffstat aspectclang-3.4.diff
 include/clang/Parse/Parser.h               |    8 ++++
 include/clang/Rewrite/Frontend/Rewriters.h |   11 +++++
 include/clang/Sema/Sema.h                  |   37 ++++++++++++++++++
 lib/Lex/Lexer.cpp                          |    3 +
 lib/Lex/PPLexerChange.cpp                  |    2 -
 lib/Parse/ParseDeclCXX.cpp                 |   57
+++++++++++++++++++++++++++--
 lib/Parse/Parser.cpp                       |    9 ++++
 lib/Rewrite/Frontend/InclusionRewriter.cpp |   26 +++++++++----
 lib/Sema/Sema.cpp                          |    3 +
 9 files changed, 142 insertions(+), 14 deletions(-)

​​

After several discussions with AspectC++ upstream, it seems rather unlikely
that this patch gets applied upstream any time soon. Therefore, I'm
exploring other options:

   1. Make llvm-toolchain-3.4 provide a "llvm-clang-3.4-source" binary
   package that provides the unpatched source code, so that the AspectC++
   source package can build-depend on that, copy the sources into the build
   directory and follow the rest of the instructions outline in README.LLVM
   2. Integrate AspectC++ into the llvm-toolchain package
   3. Provide a build/installation script in
   /usr/share/doc/aspectc++/build_with_clang.sh that uses 'apt-get source
   llvm-toolchain-3.4' and 'apt-get source aspectc++ to obtain the clang and
   aspectc++ sources, and implements the instructions in the README.LLVM. This
   would provide a user-local copy of ac++ with clang, and increases
   maintenance work


I'm happy to hearing
​ ​
further suggestions.

What do the debian llvm maintainers think about these options? Would you be
willing to implement option 1, that is, to provide the llvm sources in a
binary package so that aspectc++ can build-depend on it?
--
regards,
    Reinhard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20140713/a692e3be/attachment.html>


More information about the Pkg-llvm-team mailing list