[LLVMdev] building llvm head on ubuntu with glibc-2.3.6

Anton Vayvod avayvod at gmail.com
Mon Mar 5 13:20:41 PST 2007


Hi!

I'm trying to build llvm cvs head on Ubuntu. make command fails with this
(VERBOSE=1):

llvm[1]: Building Intrinsics.gen.tmp from Intrinsics.td
/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
*** glibc detected *** /home/ubuntu/llvm/obj/Debug/bin/tblgen: malloc():
memory corruption: 0x081f8a70 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0x401b81cd]
/lib/tls/i686/cmov/libc.so.6(malloc+0x7f)[0x401b983f]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0x400f24b7]
/usr/lib/libstdc++.so.6(_Znaj+0x1d)[0x400f25ed]
/usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE27_M_allocate_internal_bufferEv+0x3c)[0x4009558c]
/usr/lib/libstdc++.so.6(_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode+0x72)[0x40099772]
/usr/lib/libstdc++.so.6(_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode+0xb8)[0x4009a5c8]
/home/ubuntu/llvm/obj/Debug/bin/tblgen(main+0xc6)[0x818b860]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc)[0x401668cc]
/home/ubuntu/llvm/obj/Debug/bin/tblgen(__gxx_personality_v0+0xc5)[0x80eaca1]
======= Memory map: ========
08048000-081ea000 r-xp 00000000 08:01 429715
/home/ubuntu/llvm/obj/Debug/bin/tblgen
081ea000-081eb000 rw-p 001a2000 08:01 429715
/home/ubuntu/llvm/obj/Debug/bin/tblgen
081eb000-0824e000 rw-p 081eb000 00:00 0          [heap]
40000000-40019000 r-xp 00000000 08:01 242581     /lib/ld-2.4.so
40019000-4001b000 rw-p 00018000 08:01 242581     /lib/ld-2.4.so
4001b000-4001d000 rw-p 4001b000 00:00 0
40029000-40038000 r-xp 00000000 08:01 278691
/lib/tls/i686/cmov/libpthread-2.4.so
40038000-4003a000 rw-p 0000f000 08:01 278691
/lib/tls/i686/cmov/libpthread-2.4.so
4003a000-4003c000 rw-p 4003a000 00:00 0
4003c000-4003e000 r-xp 00000000 08:01 278680     /lib/tls/i686/cmov/libdl-
2.4.so
4003e000-40040000 rw-p 00001000 08:01 278680     /lib/tls/i686/cmov/libdl-
2.4.so
40040000-40114000 r-xp 00000000 08:01 664497     /usr/lib/libstdc++.so.6.0.8
40114000-40117000 r--p 000d4000 08:01 664497     /usr/lib/libstdc++.so.6.0.8
40117000-40119000 rw-p 000d7000 08:01 664497     /usr/lib/libstdc++.so.6.0.8
40119000-40120000 rw-p 40119000 00:00 0
40120000-40144000 r-xp 00000000 08:01 278681     /lib/tls/i686/cmov/libm-
2.4.so
40144000-40146000 rw-p 00023000 08:01 278681     /lib/tls/i686/cmov/libm-
2.4.so
40146000-40150000 r-xp 00000000 08:01 242467     /lib/libgcc_s.so.1
40150000-40151000 rw-p 00009000 08:01 242467     /lib/libgcc_s.so.1
40151000-4027e000 r-xp 00000000 08:01 278677     /lib/tls/i686/cmov/libc-
2.4.so
4027e000-40280000 r--p 0012c000 08:01 278677     /lib/tls/i686/cmov/libc-
2.4.so
40280000-40282000 rw-p 0012e000 08:01 278677     /lib/tls/i686/cmov/libc-
2.4.so
40282000-4068a000 rw-p 40282000 00:00 0
40700000-40721000 rw-p 40700000 00:00 0
40721000-40800000 ---p 40721000 00:00 0
bfea0000-bfeb6000 rw-p bfea0000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
make[1]: *** [/home/ubuntu/llvm/obj/lib/VMCore/Debug/Intrinsics.gen.tmp]
Aborted (core dumped)
make[1]: *** Deleting file
`/home/ubuntu/llvm/obj/lib/VMCore/Debug/Intrinsics.gen.tmp'
make[1]: Leaving directory `/home/ubuntu/llvm/obj/lib/VMCore'
make: *** [all] Error 1

Bt leads through standart C++ library calls to the following line (109) in
utils/TableGen/TableGen main() function:

Out = new std::ofstream(OutputFilename.c_str());

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?).

Any thoughts  on the issue described will be appreciated. I'll provide any
information needed.

Thanks in advance.

Anton.

-- 
To become old and wise you need to be young and stupid first
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070306/d958f0b8/attachment.html>


More information about the llvm-dev mailing list