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

Build LLVM 14.0.6-1 #6044

Merged
merged 5 commits into from
Jan 4, 2023
Merged

Build LLVM 14.0.6-1 #6044

merged 5 commits into from
Jan 4, 2023

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Jan 1, 2023

Rebuild LLVM for JuliaLang/julia#48057

@giordano
Copy link
Member

giordano commented Jan 2, 2023

MSAN build is failing with

[09:01:17] CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
[09:01:17]   The C compiler
[09:01:17] 
[09:01:17]     "/opt/bin/x86_64-linux-gnu-libgfortran4-cxx11-sanitize+memory/x86_64-linux-gnu-clang"
[09:01:17] 
[09:01:17]   is not able to compile a simple test program.
[09:01:17] 
[09:01:17]   It fails with the following output:
[09:01:17] 
[09:01:17]     Change Dir: /workspace/build/CMakeFiles/CMakeTmp
[09:01:17]     
[09:01:17]     Run Build Command(s):/usr/bin/ninja cmTC_bfc94 && [1/2] Building C object CMakeFiles/cmTC_bfc94.dir/testCCompiler.c.o
[09:01:17]     ninja: job failed: /opt/bin/x86_64-linux-gnu-libgfortran4-cxx11-sanitize+memory/x86_64-linux-gnu-clang --target=x86_64-linux-gnu --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/   -fno-gnu-unique -MD -MT CMakeFiles/cmTC_bfc94.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_bfc94.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_bfc94.dir/testCCompiler.c.o -c /workspace/build/CMakeFiles/CMakeTmp/testCCompiler.c
[09:01:17]     clang-12: error: unknown argument: '-fno-gnu-unique'
[09:01:17]     ninja: subcommand failed
[09:01:17]     
[09:01:17]     
[09:01:17] 
[09:01:17]   
[09:01:17] 
[09:01:17]   CMake will not be able to correctly generate this project.
[09:01:17] Call Stack (most recent call first):
[09:01:17]   CMakeLists.txt:49 (project)

CC @gbaraldi. How did this work before?

@gbaraldi
Copy link
Contributor

gbaraldi commented Jan 2, 2023

I'm not sure, that's an odd failure. It comes from the clang that we ship. Which I thought was clang14. I wonder if it's clang on linux issue and not a MSAN issue.

@giordano
Copy link
Member

giordano commented Jan 2, 2023

It's clang 13, but as far as I understand that's a GCC-only flag, so how are we getting it?

@gbaraldi
Copy link
Contributor

gbaraldi commented Jan 2, 2023

It seems we are passing it to every compiler invocation, though I don't know who is passing it.

@gbaraldi
Copy link
Contributor

gbaraldi commented Jan 2, 2023

Yggdrasil/L/LLVM/common.jl

Lines 163 to 166 in 064f152

if [[ "${target}" == *linux* || "${target}" == *mingw* ]]; then
# https://bugs.llvm.org/show_bug.cgi?id=48221
CMAKE_CXX_FLAGS+="-fno-gnu-unique"
fi
it comes from here. I don't think MSAN LLVM was ever built, I was just building it locally since it's fine.

@giordano
Copy link
Member

giordano commented Jan 2, 2023

[20:59:56] CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
[20:59:56]   The C compiler
[20:59:56] 
[20:59:56]     "/opt/bin/x86_64-linux-gnu-libgfortran4-cxx11-sanitize+memory/x86_64-linux-gnu-clang"
[20:59:56] 
[20:59:56]   is not able to compile a simple test program.
[20:59:56] 
[20:59:56]   It fails with the following output:
[20:59:56] 
[20:59:56]     Change Dir: /workspace/build/CMakeFiles/CMakeTmp
[20:59:56]     
[20:59:56]     Run Build Command(s):/usr/bin/ninja cmTC_3ccb5 && [1/2] Building C object CMakeFiles/cmTC_3ccb5.dir/testCCompiler.c.o
[20:59:56]     [2/2] Linking C executable cmTC_3ccb5
[20:59:56]     ninja: job failed: : && /opt/bin/x86_64-linux-gnu-libgfortran4-cxx11-sanitize+memory/x86_64-linux-gnu-clang --target=x86_64-linux-gnu --sysroot=/opt/x86_64-linux-gnu/x86_64-linux-gnu/sys-root/   CMakeFiles/cmTC_3ccb5.dir/testCCompiler.c.o -o cmTC_3ccb5   && :
[20:59:56]     /opt/x86_64-linux-gnu/bin/x86_64-linux-gnu-ld: cannot find /opt/x86_64-linux-musl/lib/clang/12.0.0/lib/linux/libclang_rt.msan-x86_64.a: No such file or directory
[20:59:56]     clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
[20:59:56]     ninja: subcommand failed
[20:59:56]     
[20:59:56]     
[20:59:56] 
[20:59:56]   
[20:59:56] 
[20:59:56]   CMake will not be able to correctly generate this project.
[20:59:56] Call Stack (most recent call first):
[20:59:56]   CMakeLists.txt:49 (project)

@giordano giordano force-pushed the vc/rebuild_LLVM branch 2 times, most recently from 0670d21 to 9f51cd0 Compare January 3, 2023 16:22
@giordano
Copy link
Member

giordano commented Jan 3, 2023

The MSAN build is thoroughly broken, I still don't understand how this ever worked.

@giordano
Copy link
Member

giordano commented Jan 3, 2023

MSAN was added in #5488, but that didn't trigger an actual build because it didn't edit a build_tarballs.jl file. @vchuravy any objections against reverting that PR, unless you're motivated to fix it?

@vchuravy
Copy link
Member Author

vchuravy commented Jan 3, 2023

Happy to revert.

@giordano giordano merged commit c785508 into master Jan 4, 2023
@giordano giordano deleted the vc/rebuild_LLVM branch January 4, 2023 09:07
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

Successfully merging this pull request may close these issues.

3 participants