[LLVMbugs] [Bug 6227] New: can't build LLVM in debug mode on Ubuntu 9.10 on x86

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Feb 3 19:14:23 PST 2010


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

           Summary: can't build LLVM in debug mode on Ubuntu 9.10 on x86
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


Argh, the message below is pretty verbose... ring bells for anyone?

In release mode the compiler builds fine and works fine.



llvm[2]: Building Debug Bytecode Archive libprofile_rt.bca (internalize)
/home/regehr/z/tmp/llvm-r95278/Debug/bin/llvm-ld
-L/home/regehr/z/tmp/llvm-gcc-r95275-install/lib
-internalize-public-api-file=/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/exported_symbols.lst
-o
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/profile_rt.internalize
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/BasicBlockTracing.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/CommonProfiling.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/EdgeProfiling.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/OptimalEdgeProfiling.bc
LinkModules ValueMap: 
 Fr: 0x8ed1338 i32* null
 To: 0x8ed1338 i32* null

 Fr: 0x8ed4d14 @ArrayCursor = internal global i32* null          ; <i32**>
[#uses=1]

 To: 0x8ed6514 @ArrayCursor = internal global i32* null          ; <i32**>
[#uses=5]


 Fr: 0x8ed6294 @ArrayStart = internal global i32* null           ; <i32**>
[#uses=1]

 To: 0x8ed2d8c @ArrayStart = internal global i32* null           ; <i32**>
[#uses=4]


 Fr: 0x8ed62dc @ArrayEnd = internal global i32* null             ; <i32**>
[#uses=1]

 To: 0x8ed2df4 @ArrayEnd = internal global i32* null             ; <i32**>
[#uses=1]


 Fr: 0x8ed6340 
declare void @write_profiling_data(i32, i32*, i32)

 To: 0x8ed2e50 
declare void @write_profiling_data(i32, i32*, i32)


 Fr: 0x8ed6390 
declare internal void @BBTraceAtExitHandler() nounwind

 To: 0x8edb8a0 
define internal void @BBTraceAtExitHandler() nounwind {
entry:
  %0 = load i32** @ArrayCursor, align 4, !dbg !6  ; <i32*> [#uses=1]
  %1 = ptrtoint i32* %0 to i32, !dbg !6           ; <i32> [#uses=1]
  %2 = load i32** @ArrayStart, align 4, !dbg !6   ; <i32*> [#uses=2]
  %3 = ptrtoint i32* %2 to i32, !dbg !6           ; <i32> [#uses=1]
  %4 = sub nsw i32 %1, %3, !dbg !6                ; <i32> [#uses=1]
  %5 = ashr i32 %4, 2                             ; <i32> [#uses=1]
  tail call void @write_profiling_data(i32 6, i32* %2, i32 %5) nounwind, !dbg
!6
  %6 = load i32** @ArrayStart, align 4, !dbg !14  ; <i32*> [#uses=2]
  store i32* %6, i32** @ArrayCursor, align 4, !dbg !14
  %7 = bitcast i32* %6 to i8*, !dbg !15           ; <i8*> [#uses=1]
  tail call void @free(i8* %7) nounwind, !dbg !15
  ret void, !dbg !16
}


 Fr: 0x8ed63e0 
declare i32 @save_arguments(i32, i8**)

 To: 0x8ed2938 
declare i32 @save_arguments(i32, i8**)


 Fr: 0x8ed6448 
declare void @free(i8* nocapture) nounwind

 To: 0x8edb820 
declare void @free(i8* nocapture) nounwind


 Fr: 0x8ed6498 
declare void @llvm_trace_basic_block(i32) nounwind

 To: 0x8edb720 
define void @llvm_trace_basic_block(i32 %BBNum) nounwind {
entry:
  %0 = load i32** @ArrayCursor, align 4, !dbg !6  ; <i32*> [#uses=2]
  store i32 %BBNum, i32* %0, align 4, !dbg !6
  %1 = getelementptr inbounds i32* %0, i32 1, !dbg !6 ; <i32*> [#uses=3]
  store i32* %1, i32** @ArrayCursor, align 4, !dbg !6
  %2 = load i32** @ArrayEnd, align 4, !dbg !11    ; <i32*> [#uses=1]
  %3 = icmp eq i32* %1, %2, !dbg !11              ; <i1> [#uses=1]
  br i1 %3, label %bb, label %return, !dbg !11

bb:                                               ; preds = %entry
  %4 = ptrtoint i32* %1 to i32, !dbg !12          ; <i32> [#uses=1]
  %5 = load i32** @ArrayStart, align 4, !dbg !12  ; <i32*> [#uses=2]
  %6 = ptrtoint i32* %5 to i32, !dbg !12          ; <i32> [#uses=1]
  %7 = sub nsw i32 %4, %6, !dbg !12               ; <i32> [#uses=1]
  %8 = ashr i32 %7, 2                             ; <i32> [#uses=1]
  tail call void @write_profiling_data(i32 6, i32* %5, i32 %8) nounwind, !dbg
!12
  %9 = load i32** @ArrayStart, align 4, !dbg !18  ; <i32*> [#uses=1]
  store i32* %9, i32** @ArrayCursor, align 4, !dbg !18
  ret void, !dbg !19

return:                                           ; preds = %entry
  ret void, !dbg !19
}


 Fr: 0x8ed6578 
declare i32 @llvm_start_basic_block_tracing(i32, i8**, i32* nocapture, i32)
nounwind

 To: 0x8ed4e20 
define i32 @llvm_start_basic_block_tracing(i32 %argc, i8** %argv, i32*
nocapture %arrayStart, i32 %numElements) nounwind {
entry:
  tail call void @llvm.dbg.value(metadata !6, i64 0, metadata !7), !dbg !18
  %0 = tail call i32 @save_arguments(i32 %argc, i8** %argv) nounwind, !dbg !19
; <i32> [#uses=1]
  tail call void @llvm.dbg.value(metadata <badref>, i64 0, metadata !20), !dbg
!19
  tail call void @llvm.dbg.value(metadata <badref>, i64 0, metadata !21), !dbg
!22
  %1 = tail call noalias i8* @malloc(i32 131072) nounwind, !dbg !23 ; <i8*>
[#uses=2]
  %2 = bitcast i8* %1 to i32*, !dbg !23           ; <i32*> [#uses=2]
  store i32* %2, i32** @ArrayStart, align 4, !dbg !23
  %3 = getelementptr inbounds i8* %1, i32 131072  ; <i8*> [#uses=1]
  %4 = bitcast i8* %3 to i32*                     ; <i32*> [#uses=1]
  store i32* %4, i32** @ArrayEnd, align 4, !dbg !24
  store i32* %2, i32** @ArrayCursor, align 4, !dbg !25
  %5 = tail call i32 @atexit(void ()* @BBTraceAtExitHandler) nounwind, !dbg !26
; <i32> [#uses=0]
  ret i32 %0, !dbg !27
}


 Fr: 0x8ed66d0 
declare noalias i8* @malloc(i32) nounwind

 To: 0x8ed2368 
declare noalias i8* @malloc(i32) nounwind


 Fr: 0x8ed6740 
declare i32 @atexit(void ()*) nounwind

 To: 0x8ed3010 
declare i32 @atexit(void ()*) nounwind


 Fr: 0x8ed67b0 
declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone

 To: 0x8ed2850 
declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone


 Fr: 0x8ed76b8 !{i32 131072}

 To: 0x8ed76b8 !{i32 131072}


 Fr: 0x8eda3b8 !{i32 459008, metadata !-1, metadata !"BufferSize", metadata
!-1, i32 52, metadata !-1} ; [ DW_TAG_auto_variable ]

 To: 0x8eda3b8 !{i32 459008, metadata !-1, metadata !"BufferSize", metadata
!-1, i32 52, metadata !-1} ; [ DW_TAG_auto_variable ]


 Fr: 0x8edb5f0 i32 %argc
 To: 0x8eda078 i32 %argc

 Fr: 0x8edb618 i8** %argv
 To: 0x8eda0a0 i8** %argv

 Fr: 0x8edb640 i32* %arrayStart
 To: 0x8eda0c8 i32* %arrayStart

 Fr: 0x8edb668 i32 %numElements
 To: 0x8eda0f0 i32 %numElements

Couldn't remap value: 0x8edb6c0 metadata <badref>
Couldn't remap value!
UNREACHABLE executed at LinkModules.cpp:419!
0  llvm-ld   0x0865bcae
1  llvm-ld   0x0865bb23
2            0x4001d400 __kernel_sigreturn + 0
3  libc.so.6 0x401cb932 abort + 386
4  llvm-ld   0x0863c938 llvm::FoldingSetNodeID::AddPointer(void const*) + 0
5  llvm-ld   0x08345de2
6  llvm-ld   0x08348ba4
7  llvm-ld   0x08348d6c
8  llvm-ld   0x08349dd6 llvm::Linker::LinkModules(llvm::Module*, llvm::Module*,
std::string*) + 1844
9  llvm-ld   0x08344174 llvm::Linker::LinkInModule(llvm::Module*, std::string*)
+ 46
10 llvm-ld   0x08343f39 llvm::Linker::LinkInFile(llvm::sys::Path const&, bool&)
+ 1355
11 llvm-ld   0x08343423
llvm::Linker::LinkInItems(std::vector<std::pair<std::string, bool>,
std::allocator<std::pair<std::string, bool> > > const&,
std::vector<std::pair<std::string, bool>, std::allocator<std::pair<std::string,
bool> > >&) + 295
12 llvm-ld   0x083167af main + 1142
13 libc.so.6 0x401b4b56 __libc_start_main + 230
14 llvm-ld   0x0830f061
Stack dump:
0.      Program arguments: /home/regehr/z/tmp/llvm-r95278/Debug/bin/llvm-ld
-L/home/regehr/z/tmp/llvm-gcc-r95275-install/lib
-internalize-public-api-file=/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/exported_symbols.lst
-o
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/profile_rt.internalize
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/BasicBlockTracing.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/CommonProfiling.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/EdgeProfiling.bc
/home/regehr/z/tmp/llvm-r95278/runtime/libprofile/Debug/OptimalEdgeProfiling.bc 
make[2]: *** [/home/regehr/z/tmp/llvm-r95278/Debug/lib/libprofile_rt.bca]
Aborted
make[2]: Leaving directory `/home/regehr/z/tmp/llvm-r95278/runtime/libprofile'
make[1]: *** [libprofile/.makeall] Error 2
make[1]: Leaving directory `/home/regehr/z/tmp/llvm-r95278/runtime'
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