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

undefined reference to `cir::DominatingValue<cir::RValue>::saved_type::restore(cir::CIRGenFunction&)' #67

Closed
Kuree opened this issue Apr 29, 2023 · 4 comments

Comments

@Kuree
Copy link
Contributor

Kuree commented Apr 29, 2023

Using the latest commit 6c0d95c with gcc-11.3.

@lanza
Copy link
Member

lanza commented Apr 29, 2023

Do you have more info? I think undefined reference would be a linker error so doesn't seem related to the compiler. I just did clean builds on both Darwin and Linux and both passed check-clang-cir.

Maybe try a clean build? We've had issues with stale td generated files over time, could just be another instance of that .

@Kuree
Copy link
Contributor Author

Kuree commented Apr 29, 2023

Sorry I was not very clear about how to reproduce. Here is the easiest way to reproduce the error with docker using the latest gcc image:

$ docker run -it gcc:latest bash
// the commands below run inside the container
$ git clone https://github.com/llvm/clangir/ --depth 1
$ apt update && apt install cmake ninja-build -y
$ cd clangir
$ mkdir build
$ cmake ../llvm -GNinja -DLLVM_TARGETS_TO_BUILD="host" -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="clang;mlir;cir" -DCMAKE_BUILD_TYPE=Debug
$ ninja clang

I have tried it on different Linux machines (I doubt it matters but just in case), and they all have the same linker error. Note that if I use Release mode, the code compiles fine.

@bcardosolopes
Copy link
Member

Hi @Kuree, thanks for reporting this, I think I know what's happening here, should have a fix later today.

@bcardosolopes
Copy link
Member

Should be fixed in [CIR][NFC] Fix linking problems saved_type::restore

Please re-open if it doesn't work.

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

3 participants