[MacPorts] #34171: root: add cling variant

MacPorts noreply at macports.org
Mon Apr 23 11:54:50 PDT 2012


#34171: root: add cling variant
--------------------------------------+-------------------------------------
 Reporter:  Deil.Christoph@…          |       Owner:  mattiafrancescomoro@…        
     Type:  enhancement               |      Status:  new                          
 Priority:  Normal                    |   Milestone:                               
Component:  ports                     |     Version:  2.0.4                        
 Keywords:                            |        Port:  root                         
--------------------------------------+-------------------------------------

Comment(by Deil.Christoph@…):

 First thing I noticed was that my clang wasn't active:

 {{{
 $ port installed '*llvm*'
 The following ports are currently installed:
   llvm-3.0 @3.0_3
   llvm-3.0 @3.0_4 (active)
   llvm-3.1 @3.1-r153370_0
   llvm-3.1 @3.1-r153754_0+assertions
   llvm-3.1 @3.1-r154872_0+assertions (active)
   llvm_select @0.2_0 (active)
 $ port installed '*clang*'
 The following ports are currently installed:
   clang-3.1 @3.1-r151504_1+analyzer
   clang-3.1 @3.1-r153370_1+analyzer
   clang-3.1 @3.1-r153754_1+analyzer+assertions
   clang_select @0.1_0 (active)
 }}}

 So I did activate it like so:
 {{{
 sudo port activate clang-3.1 at 3.1-r153370_1+analyzer
 }}}

 Now for me ROOT configure also enables cling, but when I type make the
 first call to clang crashes like this:

 {{{
 $ ./configure --with-llvm-config=/opt/local/bin/llvm-config-mp-3.1 --with-
 clang --enable-cling --with-cc=/opt/local/bin/clang-mp-3.1 --with-
 cxx=/opt/local/bin/clang++-mp-3.1 --with-ld=/opt/local/bin/clang++-mp-3.1
 $ make
 ...
 cp /Users/deil/bin/root/root_v5.32.02.source_cling/tmva/inc/TMVA/Volume.h
 include/TMVA/Volume.h
 cp
 /Users/deil/bin/root/root_v5.32.02.source_cling/math/genetic/inc/Math/GeneticMinimizer.h
 include/Math/GeneticMinimizer.h
 /opt/local/bin/clang-mp-3.1 -O2 -m64 -pipe -Wshadow -W -Wall -fsigned-char
 -fno-common -Iinclude    -pthread -DINCLUDEDIR=\"/usr/include\"
 -DOBJSUFFIX=\".o\" -o build/rmkdepend/cppsetup.o -c
 /Users/deil/bin/root/root_v5.32.02.source_cling/build/rmkdepend/cppsetup.c
 0  libLLVM-3.1svn.dylib 0x0000000105d8b652 _ZL15PrintStackTracePv + 34
 1  libLLVM-3.1svn.dylib 0x0000000105d8bb69 _ZL13SignalHandleri + 697
 2  libsystem_c.dylib    0x00007fff8a793cfa _sigtramp + 26
 3  libsystem_c.dylib    000000000000000000 _sigtramp +
 18446603338192962336
 4  clang                0x0000000104b43419
 llvm::FoldingSet<clang::PointerType>::NodeEquals(llvm::FoldingSetImpl::Node*,
 llvm::FoldingSetNodeID const&, llvm::FoldingSetNodeID&) const + 25
 5  libLLVM-3.1svn.dylib 0x0000000105d7996a
 llvm::FoldingSetImpl::FindNodeOrInsertPos(llvm::FoldingSetNodeID const&,
 void*&) + 154
 6  clang                0x0000000104b23fee
 clang::ASTContext::getPointerType(clang::QualType) const + 110
 7  clang                0x00000001047e0cf7
 clang::Sema::BuildPointerType(clang::QualType, clang::SourceLocation,
 clang::DeclarationName) + 487
 8  clang                0x00000001047e682a
 _ZL24GetFullTypeForDeclaratorRN12_GLOBAL__N_119TypeProcessingStateEN5clang8QualTypeEPNS2_14TypeSourceInfoE
 + 2426
 9  clang                0x00000001047e3bcc
 clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) + 668
 10 clang                0x00000001045e3f69
 clang::Sema::HandleField(clang::Scope*, clang::RecordDecl*,
 clang::SourceLocation, clang::Declarator&, clang::Expr*, bool,
 clang::AccessSpecifier) + 105
 11 clang                0x00000001045e3ed5
 clang::Sema::ActOnField(clang::Scope*, clang::Decl*,
 clang::SourceLocation, clang::Declarator&, clang::Expr*) + 53
 12 clang                0x00000001044e53e5
 clang::Parser::ParseStructUnionBody(clang::SourceLocation, unsigned int,
 clang::Decl*)::CFieldCallback::invoke(clang::FieldDeclarator&) + 53
 13 clang                0x00000001044dece2
 clang::Parser::ParseStructDeclaration(clang::DeclSpec&,
 clang::Parser::FieldCallback&) + 1250
 14 clang                0x00000001044df3f6
 clang::Parser::ParseStructUnionBody(clang::SourceLocation, unsigned int,
 clang::Decl*) + 1558
 15 clang                0x00000001044ec203
 clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
 clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
 const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext) +
 5843
 16 clang                0x00000001044d9273
 clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
 clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
 clang::Parser::DeclSpecContext,
 llvm::SmallVector<clang::Parser::LateParsedAttribute*, 2u>*) + 6595
 17 clang                0x00000001044d777f
 clang::Parser::ParseSimpleDeclaration(clang::ASTOwningVector<clang::Stmt*,
 32u>&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&,
 bool, clang::Parser::ForRangeInit*) + 303
 18 clang                0x00000001044d73e5
 clang::Parser::ParseDeclaration(clang::ASTOwningVector<clang::Stmt*,
 32u>&, unsigned int, clang::SourceLocation&,
 clang::Parser::ParsedAttributesWithRange&) + 325
 19 clang                0x000000010452f743
 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
 clang::Parser::ParsingDeclSpec*) + 1747
 20 clang                0x000000010452eff1
 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) +
 321
 21 clang                0x00000001044cf355 clang::ParseAST(clang::Sema&,
 bool) + 309
 22 clang                0x00000001044984e9
 clang::CodeGenAction::ExecuteAction() + 1257
 23 clang                0x000000010428d218
 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 952
 24 clang                0x00000001042744c8
 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3144
 25 clang                0x000000010426b63d cc1_main(char const**, char
 const**, char const*, void*) + 5341
 26 clang                0x0000000104270857 main + 663
 27 clang                0x000000010426a154 start + 52
 28 clang                0x0000000000000036 start + 18446744069344943894
 Stack dump:
 0.      Program arguments: /opt/local/libexec/llvm-3.1/bin/clang -cc1
 -triple x86_64-apple-macosx10.7.0 -emit-obj -disable-free -main-file-name
 cppsetup.c -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
 -target-cpu core2 -coverage-file build/rmkdepend/cppsetup.o -resource-dir
 /opt/local/libexec/llvm-3.1/bin/../lib/clang/3.1 -D
 INCLUDEDIR="/usr/include" -D OBJSUFFIX=".o" -I include -fmodule-cache-path
 /var/folders/9v/3cf9p8mx0n1gzcsq3mw9799m0000gn/T/clang-module-cache -O2
 -Wshadow -W -Wall -fdebug-compilation-dir
 /Users/deil/bin/root/root_v5.32.02.source_cling -ferror-limit 19
 -fmessage-length 196 -pthread -stack-protector 1 -mstackrealign -fblocks
 -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-dispatch-
 method=mixed -fobjc-default-synthesize-properties -fno-common
 -fdiagnostics-show-option -fcolor-diagnostics -o
 build/rmkdepend/cppsetup.o -x c
 /Users/deil/bin/root/root_v5.32.02.source_cling/build/rmkdepend/cppsetup.c
 1.      <built-in>:105:98: current parser token ';'
 2.      <built-in>:105:9: parsing struct/union body '__va_list_tag'
 clang: error: unable to execute command: Segmentation fault: 11
 clang: error: clang frontend command failed due to signal (use -v to see
 invocation)
 clang: note: diagnostic msg: Please submit a bug report to
 http://llvm.org/bugs/ and include command line arguments and all
 diagnostic information.
 clang: note: diagnostic msg: Preprocessed source(s) and associated run
 script(s) are located at:
 clang: note: diagnostic msg:
 /var/folders/9v/3cf9p8mx0n1gzcsq3mw9799m0000gn/T/cppsetup-SPesDj.i
 clang: note: diagnostic msg:
 /var/folders/9v/3cf9p8mx0n1gzcsq3mw9799m0000gn/T/cppsetup-SPesDj.sh
 Running
 /Users/deil/bin/root/root_v5.32.02.source_cling/build/unix/compiledata.sh
 Making include/compiledata.h
 Running
 /Users/deil/bin/root/root_v5.32.02.source_cling/cint/ROOT/configcint.mk
 Making cint/cint/inc/configcint.h
 bin/rmkdepend -R -fcint/cint/src/g__cfunc.d -Y -w 1000 -- -m64 -pipe -W
 -Wall -fsigned-char -fno-common -Iinclude   -DG__REGEXP -DG__UNIX
 -DG__SHAREDLIB -DG__ROOT -DG__REDIRECTIO -DG__OSFDLL -DG__STD_EXCEPTION
 -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY
 -I/Users/deil/bin/root/root_v5.32.02.source_cling/cint/cint/inc
 -I/Users/deil/bin/root/root_v5.32.02.source_cling/cint/cint/src
 -I/Users/deil/bin/root/root_v5.32.02.source_cling/cint/cint/src/dict
 -pthread -I. --
 /Users/deil/bin/root/root_v5.32.02.source_cling/cint/cint/src/g__cfunc.c
 make: bin/rmkdepend: No such file or directory
 make: *** [cint/cint/src/g__cfunc.o] Error 1
 }}}

 Maybe now I have incompatible llvm and clang options active?
 Or is this an actual clang bug? (... a compiler shouldn't crash on any
 input ...)

 I couldn't figure out the syntax on how to use {{{port select clang}}},
 maybe that's what I need to do?

 Let me know if there is something you want me to test.

-- 
Ticket URL: <https://trac.macports.org/ticket/34171#comment:7>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list