Hi!<br><br>I'm trying to build llvm cvs head on Ubuntu. make command fails with this (VERBOSE=1):<br><br>llvm[1]: Building Intrinsics.gen.tmp from <a href="http://Intrinsics.td">Intrinsics.td</a><br>/home/ubuntu/llvm/obj/Debug/bin/tblgen -I /home/ubuntu/llvm/src/lib/VMCore -I/home/ubuntu/llvm/src/include -I /home/ubuntu/llvm/src/lib/Target       /home/ubuntu/llvm/src/include/llvm/Intrinsics.td -o /home/ubuntu/llvm/obj/lib/VMCore/Debug/Intrinsics.gen.tmp -gen-intrinsic
<br>*** glibc detected *** /home/ubuntu/llvm/obj/Debug/bin/tblgen: malloc(): memory corruption: 0x081f8a70 ***<br>======= Backtrace: =========<br>/lib/tls/i686/cmov/libc.so.6[0x401b81cd]<br>/lib/tls/i686/cmov/libc.so.6(malloc+0x7f)[0x401b983f]
<br>/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x400f24b7]<br>/usr/lib/libstdc++.so.6(_Znaj+0x1d)[0x400f25ed]<br>/usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE27_M_allocate_internal_bufferEv+0x3c)[0x4009558c]<br>
/usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode+0x72)[0x40099772]<br>/usr/lib/libstdc++.so.6(_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode+0xb8)[0x4009a5c8]<br>
/home/ubuntu/llvm/obj/Debug/bin/tblgen(main+0xc6)[0x818b860]<br>/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0x401668cc]<br>/home/ubuntu/llvm/obj/Debug/bin/tblgen(__gxx_personality_v0+0xc5)[0x80eaca1]<br>======= Memory map: ========
<br>08048000-081ea000 r-xp 00000000 08:01 429715     /home/ubuntu/llvm/obj/Debug/bin/tblgen<br>081ea000-081eb000 rw-p 001a2000 08:01 429715     /home/ubuntu/llvm/obj/Debug/bin/tblgen<br>081eb000-0824e000 rw-p 081eb000 00:00 0          [heap]
<br>40000000-40019000 r-xp 00000000 08:01 242581     /lib/ld-<a href="http://2.4.so">2.4.so</a><br>40019000-4001b000 rw-p 00018000 08:01 242581     /lib/ld-<a href="http://2.4.so">2.4.so</a><br>4001b000-4001d000 rw-p 4001b000 00:00 0 
<br>40029000-40038000 r-xp 00000000 08:01 278691     /lib/tls/i686/cmov/libpthread-<a href="http://2.4.so">2.4.so</a><br>40038000-4003a000 rw-p 0000f000 08:01 278691     /lib/tls/i686/cmov/libpthread-<a href="http://2.4.so">
2.4.so</a><br>4003a000-4003c000 rw-p 4003a000 00:00 0 <br>4003c000-4003e000 r-xp 00000000 08:01 278680     /lib/tls/i686/cmov/libdl-<a href="http://2.4.so">2.4.so</a><br>4003e000-40040000 rw-p 00001000 08:01 278680     /lib/tls/i686/cmov/libdl-
<a href="http://2.4.so">2.4.so</a><br>40040000-40114000 r-xp 00000000 08:01 664497     /usr/lib/libstdc++.so.6.0.8<br>40114000-40117000 r--p 000d4000 08:01 664497     /usr/lib/libstdc++.so.6.0.8<br>40117000-40119000 rw-p 000d7000 08:01 664497     /usr/lib/libstdc++.so.6.0.8
<br>40119000-40120000 rw-p 40119000 00:00 0 <br>40120000-40144000 r-xp 00000000 08:01 278681     /lib/tls/i686/cmov/libm-<a href="http://2.4.so">2.4.so</a><br>40144000-40146000 rw-p 00023000 08:01 278681     /lib/tls/i686/cmov/libm-
<a href="http://2.4.so">2.4.so</a><br>40146000-40150000 r-xp 00000000 08:01 242467     /lib/libgcc_s.so.1<br>40150000-40151000 rw-p 00009000 08:01 242467     /lib/libgcc_s.so.1<br>40151000-4027e000 r-xp 00000000 08:01 278677     /lib/tls/i686/cmov/libc-
<a href="http://2.4.so">2.4.so</a><br>4027e000-40280000 r--p 0012c000 08:01 278677     /lib/tls/i686/cmov/libc-<a href="http://2.4.so">2.4.so</a><br>40280000-40282000 rw-p 0012e000 08:01 278677     /lib/tls/i686/cmov/libc-
<a href="http://2.4.so">2.4.so</a><br>40282000-4068a000 rw-p 40282000 00:00 0 <br>40700000-40721000 rw-p 40700000 00:00 0 <br>40721000-40800000 ---p 40721000 00:00 0 <br>bfea0000-bfeb6000 rw-p bfea0000 00:00 0          [stack]
<br>ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]<br>make[1]: *** [/home/ubuntu/llvm/obj/lib/VMCore/Debug/Intrinsics.gen.tmp] Aborted (core dumped)<br>make[1]: *** Deleting file `/home/ubuntu/llvm/obj/lib/VMCore/Debug/Intrinsics.gen.tmp'
<br>make[1]: Leaving directory `/home/ubuntu/llvm/obj/lib/VMCore'<br>make: *** [all] Error 1<br><br>Bt leads through standart C++ library calls to the following line (109) in utils/TableGen/TableGen main() function:<br>
<br>Out = new std::ofstream(OutputFilename.c_str());<br><br>As for me the TableGen code seems ok (especially because a lot of people build llvm everyday). I tried to compile llvm with both gcc-3.4.6 and gcc-4.0.1 but the same error occurs.  So I think that either glibc version is buggy or  llvm  is not compatible with the latest version (
glibc-2.3.6) I use. The first case don't seem very reasonable because of what I have investigated with Google (most projects leading to similar malloc error are said by its support to be out of date). The latter is not reasonable until it turns out that everybody working on llvm head use some previous versions of glibc (a bit possible though).  Probably, some right reason remains I can't think of (some other lib is not installed/updated?).
<br><br>Any thoughts  on the issue described will be appreciated. I'll provide any information needed.<br><br>Thanks in advance.<br><br>Anton.<br clear="all"><br>-- <br>To become old and wise you need to be young and stupid first