[LLVMbugs] [Bug 14382] New: fPIC error for LTOCodeGenerator.o (SUSE Linux Enterprise Server 10 SP4 (x86_64))

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 19 10:28:03 PST 2012


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

             Bug #: 14382
           Summary: fPIC error for LTOCodeGenerator.o (SUSE Linux
                    Enterprise Server 10 SP4 (x86_64))
           Product: Build scripts
           Version: trunk
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Makefiles
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: peeter.joot at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Get build error in link stage building clang from the trunk as described in:

http://clang.llvm.org/get_started.html

Build output claims that the object in question (LTOCodeGenerator.o) is built
with PIC options, but the linker disagrees:

llvm[2]: Compiling LTOCodeGenerator.cpp for Debug+Asserts build (PIC)
/home/hotellnx99/peeterj/tmp/clang/llvm/include/llvm/ADT/DenseMap.h: In copy
constructor 'llvm::DenseMap<KeyT, ValueT, KeyInfoT>::DenseMap(const
llvm::DenseMap<KeyT, ValueT, KeyInfoT>&) [with KeyT = unsigned int, ValueT =
llvm::PointerAlignElem, KeyInfoT = llvm::DenseMapInfo<unsigned int>]':
/home/hotellnx99/peeterj/tmp/clang/llvm/include/llvm/DataLayout.h:177:  
instantiated from here
/home/hotellnx99/peeterj/tmp/clang/llvm/include/llvm/ADT/DenseMap.h:534:
warning: base class 'class llvm::DenseMapBase<llvm::DenseMap<unsigned int,
llvm::PointerAlignElem, llvm::DenseMapInfo<unsigned int> >, unsigned int,
llvm::PointerAlignElem, llvm::DenseMapInfo<unsigned int> >' should be
explicitly initialized in the copy constructor
llvm[2]: Linking Debug+Asserts Shared Library libLTO.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
/home/hotellnx99/peeterj/tmp/clang/build/tools/lto/Debug+Asserts/LTOCodeGenerator.o:
relocation R_X86_64_PC32 against `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::c_str() const@@GLIBCXX_3.4' can
not be used when making a shared object; recompile with -fPIC
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make[2]: ***
[/home/hotellnx99/peeterj/tmp/clang/build/Debug+Asserts/lib/libLTO.so] Error 1
make[2]: Leaving directory `/home/hotellnx99/peeterj/tmp/clang/build/tools/lto'
make[1]: *** [lto/.makeall] Error 2
make[1]: Leaving directory `/home/hotellnx99/peeterj/tmp/clang/build/tools'
make: *** [all] Error 1

-- 
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