"ERROR: Could not find libclang to generate rust bindings for C/C++"
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
People
(Reporter: smaug, Unassigned)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
After bug 1526857 I get the following:
ERROR: Could not find libclang to generate rust bindings for C/C++. Please install the necessary packages, run mach bootstrap
, or use --with-libclang-path to give the path containing it.
Running ./mach bootstrap does not help
Reporter | ||
Comment 1•5 years ago
|
||
ac_add_options --with-libclang-path=/home/smaug/.mozbuild/clang/lib
in .mozconfig seems to help, but that really shouldn't be needed.
(since I don't even know if that is the right clang lib)
:mceier in irc also hit this today.
glandium, can you help?
Reporter | ||
Comment 4•5 years ago
|
||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
what is the output for /usr/lib64/ccache/clang++ -print-search-dirs
?
(Unrelated: Note that your clang is picked from /usr/lib64/ccache, which means it's ccache-wrapped, and that you're building with --with-ccache=sccache, which is going to wrap everything with sccache, so in practice, that means two levels of caching... you probably don't want that)
Reporter | ||
Comment 6•5 years ago
|
||
/usr/lib64/ccache/clang++ -print-search-dirs
programs: =/usr/bin:/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/bin
libraries: =/usr/lib64/clang/7.0.1:/usr/bin/../lib/gcc/x86_64-redhat-linux/8:/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../../../lib64:/usr/bin/../lib64:/lib/../lib64:/usr/lib/../lib64:/usr/bin/../lib/gcc/x86_64-redhat-linux/8/../../..:/usr/bin/../lib:/lib:/usr/lib
Comment 7•5 years ago
|
||
Can you attach config.log from a configure run with bug 1526857 backed out, and MOZ_CONFIGURE_TRACE
set to 1 in the environment? I'm actually surprised your setup worked before.
Comment 8•5 years ago
|
||
(and without --with-libclang-path)
Reporter | ||
Comment 9•5 years ago
|
||
That is too large file to attach (30MB). I'll send it to you
Reporter | ||
Comment 10•5 years ago
|
||
ah, looks like it compresses well.
Comment 11•5 years ago
|
||
Oh, so this is why it worked before:
- clang is picked from the system
- llvm-config is not installed on the system, so it's picked from ~/.mozbuild
- so libclang was found in ~/.mozbuild
llvm-config being found from a different clang was the main problem, and bug 1526857 fixed that by not relying on llvm-config at all. So now, it tries to find the libclang corresponding to your configured clang, which it can't find.
This means there are actually two issues hidden here:
- we should be picking clang from ~/.mozbuild on local builds. There is a bug on file for that but I can't find it right now. ISTR dmajor was involved in that, David, do you have the bug number handy?
- we can't find libclang for a system-installed clang on Fedora. That's actually something I saw while working on bug 1526857, and that was already true before, whether a system llvm-config was installed or not. But that was scope bloat.
Comment 12•5 years ago
|
||
- we should be picking clang from ~/.mozbuild on local builds. There is a
bug on file for that but I can't find it right now. ISTR dmajor was involved
in that, David, do you have the bug number handy?
Comment 13•5 years ago
|
||
Olli, can you check whether bug 1519954 fixes the issue for you? I'll leave this bug open for the remaining issue per comment 11.
Reporter | ||
Comment 14•5 years ago
|
||
Yes, it does seem to fix the issue. Thanks.
Comment 15•5 years ago
|
||
Turns out the remaining issue is bug 1413234
Updated•3 years ago
|
Updated•3 years ago
|
Description
•