Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NeonEmitter.cpp:249: error: ‘TGError’ was not declared in this scope #6188

Closed
bdaehlie opened this issue May 2, 2013 · 13 comments
Closed

Comments

@bdaehlie
Copy link

bdaehlie commented May 2, 2013

When building servo's copy of rust (pretty recent merge) on OS X 10.8:

llvm[5]: Compiling NeonEmitter.cpp for Release+Asserts build
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp: In function ‘void ParseTypes(llvm::Record_, std::string&, llvm::SmallVectorImplllvm::StringRef&)’:
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp:249: error: ‘TGError’ was not declared in this scope
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp: In member function ‘void::NeonEmitter::emitIntrinsic(llvm::raw_ostream&, llvm::Record_)’:
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp:1384: error: ‘TGError’ was not declared in this scope
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp: In member function ‘void::NeonEmitter::runHeader(llvm::raw_ostream&)’:
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp:1459: error: ‘TGError’ was not declared in this scope
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp:1504: error: ‘TGError’ was not declared in this scope
/Users/josh/src/mozilla/bdaehlie-servo/src/rust/src/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp:1603: error: ‘TGError’ was not declared in this scope
make[5]: *** [/Users/josh/src/mozilla/bdaehlie-servo/build/src/rust/llvm/x86_64-apple-darwin/tools/clang/utils/TableGen/Release+Asserts/NeonEmitter.o] Error 1

@bdaehlie
Copy link
Author

bdaehlie commented May 2, 2013

Seems like TGError was supposed to be in the included file "llvm/TableGen/Record.h", but it's not there.

@catamorphism
Copy link
Contributor

I've noticed that if I just type make check again after getting this error, the build system happily goes on to build Rust. It should still be fixed, though!

@utkarshkukreti
Copy link
Contributor

👍 I was getting the same error, and @catamorphism's solution worked for me too.

@catamorphism
Copy link
Contributor

This is still happening, and should be fixed. Nominating for milestone 5, production-ready. (Though hopefully it'll get fixed sooner!)

@acertain
Copy link

make check doesn't fix it for me.

@acertain
Copy link

Now make check seems to have fixed it...

@catamorphism
Copy link
Contributor

Still happening, 040ac2a

@catamorphism
Copy link
Contributor

Still an issue as of 680eb71

@pkgw
Copy link
Contributor

pkgw commented Aug 21, 2013

Turns out this is due to having stale submodules in a build tree -- fresh checkouts don't even include clang anymore.

cd ${srcdir}
rm -rf src/llvm/tools/clang
rm -rf src/llvm/projects/compiler-rt # also extraneous, also likely to be present
rm -rf .git/modules/src/llvm/modules
cd ${builddir}
rm -rf llvm/*/tools/clang
rm -rf llvm/*/projects/compiler-rt

That fixes things up for me.

@graydon
Copy link
Contributor

graydon commented Aug 22, 2013

just a bug, removing milestone/nomination.

@emberian
Copy link
Member

emberian commented Jan 6, 2014

This still happens sometimes. It's a race in one of the build systems, somewhere.

@emberian
Copy link
Member

emberian commented Jan 6, 2014

Can usually be fixed by rerunning make.

@alexcrichton
Copy link
Member

Closing, I think that LLVM has long since fixed this, or long since changed. I haven't seen this recently.

flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 20, 2020
Add --no-deps option to avoid running on path dependencies in workspaces

Since rust-lang/cargo#8758 has hit nightly, this allows us to address the second bullet point and [the concern related to `--fix`](rust-lang/cargo#8143 (comment)) in the [RUSTC_WORKSPACE_WRAPPER tracking issue](rust-lang/cargo#8143).

As a reminder stabilizing that env var will solve rust-lang#4612 (Clippy not running after `cargo check` in stable) and would allow to stabilize the `--fix` option in Clippy.

changelog: Add `--no-deps` option to avoid running on path dependencies in workspaces

Fixes rust-lang#3025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants