[LLVMbugs] [Bug 11512] New: circular dependency between clangSerialization and clangFrontend

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Dec 8 14:33:11 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11512

             Bug #: 11512
           Summary: circular dependency between clangSerialization and
                    clangFrontend
           Product: Build scripts
           Version: 3.0
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: fang at csl.cornell.edu
                CC: llvmbugs at cs.uiuc.edu, ofv at wanadoo.es
    Classification: Unclassified


Hi, I'm bootstrapping LLVM/clang on powerpc-darwin8 using gcc-4.6.2, (since
g++-4.0.1 is unsupported) and have run into a circular dependency.

tools/clang/lib/Frontend/CMakeLists.txt

lists depending on clangSerialization, however during the build of
clangSerialization.dylib
[tools/clang/lib/Serialization/CMakeLists.txt]
I get:

Linking CXX shared library ../../../../lib/libclangSerialization.dylib
cd
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-1/llvm-3.0.src/build/tools/clang/lib/Serialization
&& /Volumes/Mercedes2/sw/bin/cmake -E cmake_link_script
CMakeFiles/clangSerialization.dir/link.txt --verbose=1
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-1/llvm-3.0.src/opt-bin/ccg++-4.6
 -fno-common -fPIC -fno-common -Woverloaded-virtual -Wcast-qual
-fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings -fno-rtti -O3 -DNDEBUG -mmacosx-version-min=10.4 -dynamiclib
-Wl,-headerpad_max_install_names  -L/sw/lib -o
../../../../lib/libclangParse.dylib -install_name
/Volumes/Mercedes2/sw/src/fink.build/llvm30-3.0-1/llvm-3.0.src/build/lib/libclangParse.dylib
CMakeFiles/clangParse.dir/ParseAST.cpp.o
CMakeFiles/clangParse.dir/ParseCXXInlineMethods.cpp.o
CMakeFiles/clangParse.dir/ParseDecl.cpp.o
CMakeFiles/clangParse.dir/ParseDeclCXX.cpp.o
CMakeFiles/clangParse.dir/ParseExpr.cpp.o
CMakeFiles/clangParse.dir/ParseExprCXX.cpp.o
CMakeFiles/clangParse.dir/ParseInit.cpp.o
CMakeFiles/clangParse.dir/ParseObjc.cpp.o
CMakeFiles/clangParse.dir/ParsePragma.cpp.o
CMakeFiles/clangParse.dir/ParseStmt.cpp.o
CMakeFiles/clangParse.dir/ParseTemplate.cpp.o
CMakeFiles/clangParse.dir/ParseTentative.cpp.o
CMakeFiles/clangParse.dir/Parser.cpp.o ../../../../lib/libclangBasic.dylib
../../../../lib/libclangAST.dylib ../../../../lib/libclangLex.dylib
../../../../lib/libclangSema.dylib -lpthread
../../../../lib/libclangAnalysis.dylib ../../../../lib/libclangIndex.dylib
../../../../lib/libclangAST.dylib ../../../../lib/libclangLex.dylib
../../../../lib/libclangBasic.dylib ../../../../lib/libLLVMMC.dylib
../../../../lib/libLLVMObject.dylib ../../../../lib/libLLVMCore.dylib
../../../../lib/libLLVMSupport.dylib -lpthread 
/usr/bin/ld: Undefined symbols:
clang::NormalizeDashIncludePath(llvm::StringRef, clang::FileManager&)
clang::CompilerInstance::createSema(clang::TranslationUnitKind,
clang::CodeCompleteConsumer*)
clang::CompilerInstance::setInvocation(clang::CompilerInvocation*)
clang::CompilerInstance::setASTConsumer(clang::ASTConsumer*)
clang::CompilerInstance::setDiagnostics(clang::DiagnosticsEngine*)
clang::CompilerInstance::createASTContext()
clang::CompilerInstance::createFileManager()
clang::CompilerInstance::createPreprocessor()
clang::CompilerInstance::createSourceManager(clang::FileManager&)
clang::CompilerInstance::InitializeSourceManager(llvm::StringRef)
clang::CompilerInstance::setTarget(clang::TargetInfo*)
clang::CompilerInstance::CompilerInstance()
clang::TextDiagnosticPrinter::TextDiagnosticPrinter(llvm::raw_ostream&,
clang::DiagnosticOptions const&, bool)
clang::ParseAST(clang::Sema&, bool)
collect2: ld returned 1 exit status
make[2]: *** [lib/libclangSerialization.dylib] Error 1

whose undefined symbols are defined in clangFrontend.

This work is going towards a fink package for llvm on OS X 10.4:
http://fink.cvs.sf.net/viewvc/fink/experimental/fangism/finkinfo/llvm30.info?view=log

I've already made a few cmake file modifications to get this far, seen in the
PatchScript entry of llvm30.info.

cmake options:
-DLLVM_BUILD_32_BITS:BOOL=ON
-DLLVM_TARGETS_TO_BUILD=PowerPC
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_C_FLAGS=-fno-common
-DCMAKE_CXX_FLAGS=-fno-common

-fno-common was needed for building of dylibs.  (Might be orthogonal issue.)

This issue was also raised on the cfe-dev mailing list:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-November/018755.html

Any suggestions for unraveling the circular dependency?

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list