Skip to content

compiling libstd with -Z extra-debug-info results in "intrinsics.rs:402:8: 402:38 warning: debuginfo: Could not find namespace node for function. This is a bug! ..." #9190

Closed
@glycerine

Description

@glycerine

On Ubuntu 12.04/amd64, gcc 4.7.2, when I'm trying to build rust with -Z debug-info on stage1 and -Z extra-debug-info on stage2, libstd will not compile, and possibly points out a compiler bug if the error message is to be believed.

me@host:/usr/cn/rust/debug-build/rust$ make VERBOSE=1 
cfg: build triple x86_64-unknown-linux-gnu
cfg: host triples x86_64-unknown-linux-gnu
cfg: target triples x86_64-unknown-linux-gnu
cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE)
cfg: enabling more debugging (CFG_ENABLE_DEBUG)
cfg: host for x86_64-unknown-linux-gnu is x86_64
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu
cfg: disabling C++ optimization (CFG_DISABLE_OPTIMIZE_CXX)
cfg: using ccache gcc
cfg: enabling valgrind (CFG_ENABLE_VALGRIND)
cfg: no llnextgen found, omitting grammar-verification
cfg: disabling doc build (CFG_DISABLE_DOCS)
x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1   --cfg debug -Z no-debug-borrows -Z debug-info --target=x86_64-unknown-linux-gnu  --cfg rustpkg -o x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustpkg /usr/cn/rust/debug-build/rust/src/driver/driver.rs
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "Warning: removing previous" \'librustpkg-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustpkg.so x86_64-unknown-linux-gnu/stage2/lib/librustpkg.so
Info: now are following matches for librustpkg-*.so libraries:
cp -R x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustpkg-*.so  x86_64-unknown-linux-gnu/stage2/lib
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustpkg x86_64-unknown-linux-gnu/stage2/bin/rustpkg
x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1   --cfg debug -Z no-debug-borrows -Z debug-info --target=x86_64-unknown-linux-gnu  --cfg rustdoc -o x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustdoc /usr/cn/rust/debug-build/rust/src/driver/driver.rs
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "Warning: removing previous" \'librustdoc-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustdoc.so x86_64-unknown-linux-gnu/stage2/lib/librustdoc.so
Info: now are following matches for librustdoc-*.so libraries:
cp -R x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustdoc-*.so  x86_64-unknown-linux-gnu/stage2/lib
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rustdoc x86_64-unknown-linux-gnu/stage2/bin/rustdoc
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "Warning: removing previous" \'librust-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1   --cfg debug -Z no-debug-borrows -Z debug-info --target=x86_64-unknown-linux-gnu  -D warnings --out-dir x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib /usr/cn/rust/debug-build/rust/src/librust/rust.rs && touch x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librust.so
Info: now are following matches for librust-*.so libraries:
librust-28ac9d9c3782cf3d-0.8-pre.so
x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1   --cfg debug -Z no-debug-borrows -Z debug-info --target=x86_64-unknown-linux-gnu  --cfg rust -o x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rust /usr/cn/rust/debug-build/rust/src/driver/driver.rs
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "Warning: removing previous" \'librust-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librust.so x86_64-unknown-linux-gnu/stage2/lib/librust.so
Info: now are following matches for librust-*.so libraries:
cp -R x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librust-*.so  x86_64-unknown-linux-gnu/stage2/lib
cp x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/bin/rust x86_64-unknown-linux-gnu/stage2/bin/rust
MATCHES=""; if [ -n "$MATCHES" ] ; then echo "Warning: removing previous" \'libstd-*.so\' "libraries:" $MATCHES; rm $MATCHES ; fi
x86_64-unknown-linux-gnu/stage2/bin/rustc --cfg stage2   --cfg debug -Z no-debug-borrows -Z extra-debug-info --target=x86_64-unknown-linux-gnu  -D warnings --out-dir x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib /usr/cn/rust/debug-build/rust/src/libstd/std.rs && touch x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so
/usr/cn/rust/debug-build/rust/src/libstd/std.rs:1:0: 1:0 note: debuginfo for trait NYI
/usr/cn/rust/debug-build/rust/src/libstd/std.rs:1 // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
                                                  ^
/usr/cn/rust/debug-build/rust/src/libstd/unstable/intrinsics.rs:402:8: 402:38 warning: debuginfo: Could not find namespace node for function. This is a bug! Try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
/usr/cn/rust/debug-build/rust/src/libstd/unstable/intrinsics.rs:402     pub fn get_tydesc<T>() -> *TyDesc;
                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/cn/rust/debug-build/rust/src/libstd/repr.rs:628:12: 628:13 note: debuginfo for trait NYI
/usr/cn/rust/debug-build/rust/src/libstd/repr.rs:628         let u = ReprVisitor(ptr, writer);
                                                                 ^
error: internal compiler error: node_id_to_type: no type for node `local (id=154768, name=td)`
make: *** [x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so] Error 101
me@host:/usr/cn/rust/debug-build/rust$ export RUST_LOG=rustc=1
me@host:/usr/cn/rust/debug-build/rust$ x86_64-unknown-linux-gnu/stage2/bin/rustc --cfg stage2   --cfg debug -Z no-debug-borrows -Z extra-debug-info --target=x86_64-unknown-linux-gnu  -D warnings --out-dir x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib /usr/cn/rust/debug-build/rust/src/libstd/std.rs && touch x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libstd.so
/usr/cn/rust/debug-build/rust/src/libstd/std.rs:1:0: 1:0 note: debuginfo for trait NYI
/usr/cn/rust/debug-build/rust/src/libstd/std.rs:1 // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
                                                  ^
/usr/cn/rust/debug-build/rust/src/libstd/unstable/intrinsics.rs:402:8: 402:38 warning: debuginfo: Could not find namespace node for function. This is a bug! Try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
/usr/cn/rust/debug-build/rust/src/libstd/unstable/intrinsics.rs:402     pub fn get_tydesc<T>() -> *TyDesc;
                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/cn/rust/debug-build/rust/src/libstd/repr.rs:628:12: 628:13 note: debuginfo for trait NYI
/usr/cn/rust/debug-build/rust/src/libstd/repr.rs:628         let u = ReprVisitor(ptr, writer);
                                                                 ^
error: internal compiler error: node_id_to_type: no type for node `local (id=154768, name=td)`
task <unnamed> failed at 'explicit failure', /usr/cn/rust/debug-build/rust/src/libsyntax/diagnostic.rs:95
task <unnamed> failed at 'explicit failure', /usr/cn/rust/debug-build/rust/src/librustc/rustc.rs:377
me@host:/usr/cn/rust/debug-build/rust$ grep extra-debug-info Makefile
  RUSTFLAGS_STAGE2 += -Z no-debug-borrows -Z extra-debug-info
me@host:/usr/cn/rust/debug-build/rust$ grep debug-info Makefile
  RUSTFLAGS_STAGE1 += -Z no-debug-borrows -Z debug-info
  RUSTFLAGS_STAGE2 += -Z no-debug-borrows -Z extra-debug-info
me@host:/usr/cn/rust/debug-build/rust$ 
me@host:/usr/cn/rust/debug-build/rust$ gcc --version
gcc (GCC) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

me@host:/usr/cn/rust/debug-build/rust$ uname -a
Linux i7 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 18:32:41 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
me@host:/usr/cn/rust/debug-build/rust$

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions